Class Type
java.lang.Object
org.glassfish.pfl.dynamic.codegen.spi.Type
Representation of Types (no generic support) used for
codegen API.
- Author:
- Ken Cavanaugh
-
Method Summary
Modifier and TypeMethodDescriptionstatic Typestatic Type_boolean()static Type_byte()static Type_char()static TypeReturn a codegen Type representing a class with the given name.static Type_Class()static Typestatic Typestatic 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()Return the type that is the binary promotion of this type and Type t.static final voidThis method is only intended for internal use.booleanClass<?> inthashCode()booleanReturn true iff there is a primitive narrowing conversion from Type t to this type.booleanReturn true iff there is a primitive widening conversion from Type t to this type.booleanReturn true iff there is a reference narrowing conversion from Type t to this type.booleanReturn true iff there is a reference widening conversion from Type t to this type.booleanisArray()booleanReturn true iff there is an assignment conversion from Type t to this type.booleanReturn true iff there is a casting conversion from Type t to this type.booleanReturn true iff one of the following statements is true: this.equals( t ) .booleanisNumber()booleanname()intsize()Number of 32 bit words occupied by this type if primitive, or 0 if non-primitive.toString()static TypeReturn the codegen Type that corresponds to the Java (non-generic) Type represented by cls.Return the type that is a unary promotion of this type.
-
Method Details
-
clearCaches
public static final void clearCaches()This method is only intended for internal use. It is public because the implementation that needs this is in a different package. -
_array
-
_class
Return a codegen Type representing a class with the given name. This is not bound to a specific Class object until/unless getTypeClass is called. -
_classGenerator
-
type
Return the codegen Type that corresponds to the Java (non-generic) Type represented by cls. -
_void
-
_null
-
_boolean
-
_byte
-
_char
-
_short
-
_int
-
_long
-
_float
-
_double
-
_Object
-
_String
-
_Class
-
_Cloneable
-
isPrimitive
public boolean isPrimitive() -
isArray
public boolean isArray() -
memberType
-
size
public int size()Number of 32 bit words occupied by this type if primitive, or 0 if non-primitive. -
signature
-
name
-
packageName
-
className
-
isNumber
public boolean isNumber() -
getTypeClass
-
classInfo
-
hashCode
public int hashCode() -
toString
-
equals
-
hasPrimitiveNarrowingConversionFrom
Return true iff there is a primitive narrowing conversion from Type t to this type. -
hasPrimitiveWideningConversionFrom
Return true iff there is a primitive widening conversion from Type t to this type. -
hasReferenceNarrowingConversionFrom
Return true iff there is a reference narrowing conversion from Type t to this type. -
hasReferenceWideningConversionFrom
Return true iff there is a reference widening conversion from Type t to this type. -
isAssignmentConvertibleFrom
Return true iff there is an assignment conversion from Type t to this type. -
isCastingConvertibleFrom
Return true iff there is a casting conversion from Type t to this type. -
unaryPromotion
Return the type that is a unary promotion of this type. -
binaryPromotion
Return the type that is the binary promotion of this type and Type t. -
isMethodInvocationConvertibleFrom
Return true iff one of the following statements is true:- this.equals( t ) .
- There is a widening primitive conversion from Type t to this Type (see JLS 5.1.2).
- There is a widening reference conversion from Type t to this Type (see JLS 5.1.4).
-