JPrimitiveType) or
a reference type (JClass).
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public abstract JClass | |
| public String | Returns: Name like "Foo$Bar", "int", "java.lang.String", "java.io.File[]". Never null.Gets the binary name of the type. |
| public abstract JClass | |
| public int | compareTo(JType o)
Implements java. Compare two JTypes by FQCN, giving sorting precedence to types that belong to packages java and javax over all others. |
| public JType | |
| public JType | |
| public abstract String | Returns: Strings like "int", "java.lang.String", "java.io.File[]". Never null.Gets the full name of the type. |
| public boolean | |
| public boolean | |
| public final boolean | |
| public abstract String | |
| public abstract JCodeModel | |
| public static JPrimitiveType | parse(JCodeModel codeModel, String typeName)
Obtains a reference to the primitive type object from a type name. |
| public String | |
| public abstract JType |
| JType | back to summary |
|---|---|
| protected JType() | |
| array | back to summary |
|---|---|
| public abstract JClass array() Create an array type of this type. This method is undefined for primitive void type, which doesn't have any corresponding array representation. | |
| binaryName | back to summary |
|---|---|
| public String binaryName() Gets the binary name of the type. See http://java.sun.com/docs/books/jls/third_edition/html/binaryComp.html#44909
| |
| boxify | back to summary |
|---|---|
| public abstract JClass boxify() If this class is a primitive type, return the boxed class.
Otherwise return For example, for "int", this method returns "java.lang.Integer". | |
| compareTo | back to summary |
|---|---|
| public int compareTo(JType o) Implements java. Compare two JTypes by FQCN, giving sorting precedence to types that belong to packages java and javax over all others. This method is used to sort generated import statments in a conventional way for readability.
| |
| elementType | back to summary |
|---|---|
| public JType elementType() If this is an array, returns the component type of the array. (T of T[]) | |
| erasure | back to summary |
|---|---|
| public JType erasure() Returns the erasure of this type. | |
| fullName | back to summary |
|---|---|
| public abstract String fullName() Gets the full name of the type. See http://java.sun.com/docs/books/jls/second_edition/html/names.doc.html#25430 for the details.
| |
| isArray | back to summary |
|---|---|
| public boolean isArray() Tell whether or not this is an array type. | |
| isPrimitive | back to summary |
|---|---|
| public boolean isPrimitive() Tell whether or not this is a built-in primitive type, such as int or void. | |
| isReference | back to summary |
|---|---|
| public final boolean isReference() Returns true if this is a referenced type. | |
| name | back to summary |
|---|---|
| public abstract String name() Gets the name of this type.
| |
| owner | back to summary |
|---|---|
| public abstract JCodeModel owner() Gets the owner code model object. | |
| parse | back to summary |
|---|---|
| public static JPrimitiveType parse(JCodeModel codeModel, String typeName) Obtains a reference to the primitive type object from a type name. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| unboxify | back to summary |
|---|---|
| public abstract JType unboxify() If this class is a wrapper type for a primitive, return the primitive type.
Otherwise return For example, for "java.lang.Integer", this method returns "int". | |