|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.codemodel.JType
com.sun.codemodel.JPrimitiveType
public final class JPrimitiveType
Java built-in primitive types.
Method Summary | |
---|---|
JClass |
array()
Create an array type from this type. |
java.lang.String |
fullName()
Gets the full name of the type |
void |
generate(JFormatter f)
|
JClass |
getWrapperClass()
Obtains the wrapper class for this primitive type. |
boolean |
isPrimitive()
Tell whether or not this is a built-in primitive type, such as int or void. |
java.lang.String |
name()
Gets the name of this type. |
JCodeModel |
owner()
Gets the owner code model object. |
JExpression |
unwrap(JExpression exp)
Do the opposite of the wrap method. |
JExpression |
wrap(JExpression exp)
Wraps an expression of this type to the corresponding wrapper class. |
Methods inherited from class com.sun.codemodel.JType |
---|
binaryName, elementType, isArray, isReference, parse, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public JCodeModel owner()
JType
owner
in class JType
public java.lang.String fullName()
JType
fullName
in class JType
public java.lang.String name()
JType
name
in class JType
public boolean isPrimitive()
JType
isPrimitive
in class JType
public JClass array()
JType
array
in class JType
public JClass getWrapperClass()
public JExpression wrap(JExpression exp)
new Float(x)
for the paramter x.
REVISIT: it's not clear how this method works for VOID.
public JExpression unwrap(JExpression exp)
public void generate(JFormatter f)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |