Class Type
java.lang.Object
org.glassfish.pfl.dynamic.codegen.spi.Type
Representation of Types (no generic support) used for
codegen API.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ClassInfoprivate static ThreadLocal<Map<Class, Type>> private Stringprivate static ThreadLocal<Map<String, Type>> private booleanprivate Typeprivate static final Typeprivate static final Typeprivate static final Typeprivate static final Typeprivate static final Typeprivate static final Typeprivate static final Typeprivate static final Typeprivate static final Typeprivate static final Typeprivate static final Typeprivate static final Typeprivate static final Typeprivate static final Typeprivate Stringprivate Stringprivate Stringprivate intprivate Type.Sortprivate Class<?> private int -
Constructor Summary
Constructors -
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.private static booleanclassIsStandard(Class cls) 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.private booleanbooleanReturn true iff one of the following statements is true: this.equals( t ) .booleanisNumber()booleanprivate booleanisSubclass(Type t) private intname()private booleannoMethodConflicts(Type t1, Type t2) private booleanreturnTypeCollision(Set<MethodInfo> set1, Set<MethodInfo> set2) 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.
-
Field Details
-
name
-
packageName
-
className
-
signature
-
size
private int size -
sort
-
isNumber
private boolean isNumber -
wideningNumber
private int wideningNumber -
memberType
-
classInfo
-
typeClass
-
classMap
-
classNameMap
-
ptcToType
-
myVoid
-
myNull
-
myBoolean
-
myByte
-
myChar
-
myShort
-
myInt
-
myLong
-
myFloat
-
myDouble
-
myObject
-
myString
-
myClass
-
myCloneable
-
-
Constructor Details
-
Type
-
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
-
_classGenerator
-
classIsStandard
-
type
-
_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
-
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. -
returnTypeCollision
-
noMethodConflicts
-
isSubclass
-
isInterface
private boolean isInterface() -
modifiers
private int modifiers() -
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
-
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).
-