JCodeModel,
such as JCodeModel#BOOLEAN.
| Modifier and Type | Field and Description |
|---|---|
| private JClass | |
| private final JCodeModel | |
| private final String | |
| private final JClass | wrapperClass
Corresponding wrapper class. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public JClass | |
| public JClass | boxify()
Implements abstract com. Obtains the wrapper class for this primitive type. |
| public String | |
| public void | |
| public JClass | |
| public boolean | isPrimitive()
Overrides com. Tell whether or not this is a built-in primitive type, such as int or void. |
| public String | |
| public JCodeModel | |
| public JType | unboxify()
Implements abstract com.
Deprecated
If this class is a wrapper type for a primitive, return the primitive type. |
| public JExpression | |
| public JExpression |
| arrayClass | back to summary |
|---|---|
| private JClass arrayClass | |
| owner | back to summary |
|---|---|
| private final JCodeModel owner | |
| typeName | back to summary |
|---|---|
| private final String typeName | |
| wrapperClass | back to summary |
|---|---|
| private final JClass wrapperClass Corresponding wrapper class. For example, this would be "java.lang.Short" for short. | |
| JPrimitiveType | back to summary |
|---|---|
| pack-priv JPrimitiveType(JCodeModel owner, String typeName, Class<?> wrapper) | |
| array | back to summary |
|---|---|
| public JClass array() Implements abstract com. Doc from com. Create an array type of this type. This method is undefined for primitive void type, which doesn't have any corresponding array representation.
| |
| boxify | back to summary |
|---|---|
| public JClass boxify() Implements abstract com. Obtains the wrapper class for this primitive type. For example, this method returns a reference to java.lang.Integer if this object represents int.
| |
| fullName | back to summary |
|---|---|
| public String fullName() Implements abstract com. Doc from com. 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.
| |
| generate | back to summary |
|---|---|
| public void generate(JFormatter f) Implements com.
| |
| getWrapperClass | back to summary |
|---|---|
| public JClass getWrapperClass()
Deprecated Use
| |
| isPrimitive | back to summary |
|---|---|
| public boolean isPrimitive() Overrides com. Doc from com. Tell whether or not this is a built-in primitive type, such as int or void.
| |
| name | back to summary |
|---|---|
| public String name() Implements abstract com. Doc from com. Gets the name of this type.
| |
| owner | back to summary |
|---|---|
| public JCodeModel owner() Implements abstract com. Doc from com. Gets the owner code model object.
| |
| unboxify | back to summary |
|---|---|
| public JType unboxify() Implements abstract com. Doc from com. Deprecated
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".
| |
| unwrap | back to summary |
|---|---|
| public JExpression unwrap(JExpression exp) Do the opposite of the wrap method. Revisit it's not clear how this method works for VOID. | |
| wrap | back to summary |
|---|---|
| public JExpression wrap(JExpression exp) Wraps an expression of this type to the corresponding wrapper class.
For example, if this class represents "float", this method will return
the expression Revisit it's not clear how this method works for VOID. | |