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 ClassInfo
private static ThreadLocal
<Map<Class, Type>> private String
private static ThreadLocal
<Map<String, Type>> private boolean
private Type
private static final Type
private static final Type
private static final Type
private static final Type
private static final Type
private static final Type
private static final Type
private static final Type
private static final Type
private static final Type
private static final Type
private static final Type
private static final Type
private static final Type
private String
private String
private String
private int
private Type.Sort
private Class
<?> private int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Type
static Type
_boolean()
static Type
_byte()
static Type
_char()
static Type
Return a codegen Type representing a class with the given name.static Type
_Class()
static Type
static Type
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()
Return the type that is the binary promotion of this type and Type t.private static boolean
classIsStandard
(Class cls) static final void
This method is only intended for internal use.boolean
Class
<?> int
hashCode()
boolean
Return true iff there is a primitive narrowing conversion from Type t to this type.boolean
Return true iff there is a primitive widening conversion from Type t to this type.boolean
Return true iff there is a reference narrowing conversion from Type t to this type.boolean
Return true iff there is a reference widening conversion from Type t to this type.boolean
isArray()
boolean
Return true iff there is an assignment conversion from Type t to this type.boolean
Return true iff there is a casting conversion from Type t to this type.private boolean
boolean
Return true iff one of the following statements is true: this.equals( t ) .boolean
isNumber()
boolean
private boolean
isSubclass
(Type t) private int
name()
private boolean
noMethodConflicts
(Type t1, Type t2) private boolean
returnTypeCollision
(Set<MethodInfo> set1, Set<MethodInfo> set2) int
size()
Number of 32 bit words occupied by this type if primitive, or 0 if non-primitive.toString()
static Type
Return 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
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
-
classIsStandard
-
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. -
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
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).
-