public abstract class Type extends Object implements Generable, Comparable<Type>
PrimitiveType
) or
a reference type (TypeReference
).Constructor and Description |
---|
Type() |
Modifier and Type | Method and Description |
---|---|
abstract TypeReference |
array()
Create an array type of this type.
|
String |
binaryName()
Gets the binary name of the type.
|
abstract TypeReference |
boxify()
If this class is a primitive type, return the boxed class.
|
int |
compareTo(Type o)
Compare two JTypes by FQCN, giving sorting precedence to types
that belong to packages java and javax over all others.
|
GeneratedExpression |
dotclass() |
Type |
elementType()
If this is an array, returns the component type of the array.
|
boolean |
equals(Object oth) |
Type |
erasure()
Returns the erasure of this type.
|
abstract String |
fullName()
Gets the full name of the type.
|
int |
hashCode() |
boolean |
isArray()
Tell whether or not this is an array type.
|
boolean |
isPrimitive()
Tell whether or not this is a built-in primitive type, such as int or void.
|
boolean |
isReference()
Returns true if this is a referenced type.
|
abstract String |
name()
Gets the name of this type.
|
abstract CodeModel |
owner()
Gets the owner code model object.
|
static PrimitiveType |
parse(CodeModel codeModel,
String typeName)
Obtains a reference to the primitive type object from a type name.
|
String |
toString() |
abstract Type |
unboxify()
If this class is a wrapper type for a primitive, return the primitive type.
|
public static PrimitiveType parse(CodeModel codeModel, String typeName)
public abstract CodeModel owner()
public abstract String fullName()
public String binaryName()
public abstract String name()
public abstract TypeReference array()
TypeReference
representing the array type
whose element type is this typepublic boolean isArray()
public boolean isPrimitive()
public abstract TypeReference boxify()
public abstract Type unboxify()
public Type erasure()
public final boolean isReference()
public Type elementType()
public int compareTo(Type o)
compareTo
in interface Comparable<Type>
public final GeneratedExpression dotclass()
Copyright © 2010–2015 MuleSoft, Inc.. All rights reserved.