@Immutable public class Type extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static Type |
_array(Type memberType) |
static Type |
_boolean() |
static Type |
_byte() |
static Type |
_char() |
static Type |
_Class() |
static Type |
_class(java.lang.String name)
Return a codegen Type representing a class with the given name.
|
static Type |
_classGenerator(ClassGenerator cg) |
static Type |
_Cloneable() |
static Type |
_double() |
static Type |
_float() |
static Type |
_int() |
static Type |
_long() |
static Type |
_null() |
static Type |
_Object() |
static Type |
_short() |
static Type |
_String() |
static Type |
_void() |
Type |
binaryPromotion(Type t)
Return the type that is the binary promotion of this
type and Type t.
|
ClassInfo |
classInfo() |
java.lang.String |
className() |
static void |
clearCaches()
This method is only intended for internal use.
|
boolean |
equals(java.lang.Object obj) |
java.lang.Class<?> |
getTypeClass() |
int |
hashCode() |
boolean |
hasPrimitiveNarrowingConversionFrom(Type t)
Return true iff there is a primitive narrowing conversion
from Type t to this type.
|
boolean |
hasPrimitiveWideningConversionFrom(Type t)
Return true iff there is a primitive widening conversion
from Type t to this type.
|
boolean |
hasReferenceNarrowingConversionFrom(Type t)
Return true iff there is a reference narrowing conversion
from Type t to this type.
|
boolean |
hasReferenceWideningConversionFrom(Type t)
Return true iff there is a reference widening conversion
from Type t to this type.
|
boolean |
isArray() |
boolean |
isAssignmentConvertibleFrom(Type t)
Return true iff there is an assignment conversion from
Type t to this type.
|
boolean |
isCastingConvertibleFrom(Type t)
Return true iff there is a casting conversion from
Type t to this type.
|
boolean |
isMethodInvocationConvertibleFrom(Type t)
Return true iff one of the following statements is true:
this.equals( t ) .
|
boolean |
isNumber() |
boolean |
isPrimitive() |
Type |
memberType() |
java.lang.String |
name() |
java.lang.String |
packageName() |
java.lang.String |
signature() |
int |
size()
Number of 32 bit words occupied by this type
if primitive, or 0 if non-primitive.
|
java.lang.String |
toString() |
static Type |
type(java.lang.Class cls)
Return the codegen Type that corresponds to the Java (non-generic)
Type represented by cls.
|
Type |
unaryPromotion()
Return the type that is a unary promotion of this
type.
|
public static final void clearCaches()
public static Type _class(java.lang.String name)
public static Type _classGenerator(ClassGenerator cg)
public static Type type(java.lang.Class cls)
public static Type _void()
public static Type _null()
public static Type _boolean()
public static Type _byte()
public static Type _char()
public static Type _short()
public static Type _int()
public static Type _long()
public static Type _float()
public static Type _double()
public static Type _Object()
public static Type _String()
public static Type _Class()
public static Type _Cloneable()
public boolean isPrimitive()
public boolean isArray()
public Type memberType()
public int size()
public java.lang.String signature()
public java.lang.String name()
public java.lang.String packageName()
public java.lang.String className()
public boolean isNumber()
public java.lang.Class<?> getTypeClass()
public ClassInfo classInfo()
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public boolean hasPrimitiveNarrowingConversionFrom(Type t)
public boolean hasPrimitiveWideningConversionFrom(Type t)
public boolean hasReferenceNarrowingConversionFrom(Type t)
public boolean hasReferenceWideningConversionFrom(Type t)
public boolean isAssignmentConvertibleFrom(Type t)
public boolean isCastingConvertibleFrom(Type t)
public Type unaryPromotion()
public Type binaryPromotion(Type t)
public boolean isMethodInvocationConvertibleFrom(Type t)