|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mule.devkit.model.code.Type
org.mule.devkit.model.code.PrimitiveType
public final class PrimitiveType
Java built-in primitive types.
Instances of this class can be obtained as constants ofCodeModel,
such as CodeModel.BOOLEAN.
| Method Summary | |
|---|---|
TypeReference |
array()
Create an array type of this type. |
TypeReference |
boxify()
Obtains the wrapper class for this primitive type. |
String |
fullName()
Gets the full name of the type. |
void |
generate(Formatter f)
|
TypeReference |
getWrapperClass()
Deprecated. Use boxify(). |
boolean |
isPrimitive()
Tell whether or not this is a built-in primitive type, such as int or void. |
String |
name()
Gets the name of this type. |
CodeModel |
owner()
Gets the owner code model object. |
Type |
unboxify()
Deprecated. calling this method from PrimitiveType
would be meaningless, since it's always guaranteed to
return this. |
GeneratedExpression |
unwrap(GeneratedExpression exp)
Do the opposite of the wrap method. |
GeneratedExpression |
wrap(GeneratedExpression exp)
Wraps an expression of this type to the corresponding wrapper class. |
| Methods inherited from class org.mule.devkit.model.code.Type |
|---|
binaryName, compareTo, dotclass, elementType, equals, erasure, hashCode, isArray, isReference, parse, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public CodeModel owner()
Type
owner in class Typepublic String fullName()
Type
fullName in class Typepublic String name()
Type
name in class Typepublic boolean isPrimitive()
Type
isPrimitive in class Typepublic TypeReference array()
Type
array in class TypeTypeReference representing the array type
whose element type is this typepublic TypeReference boxify()
boxify in class Typepublic Type unboxify()
PrimitiveType
would be meaningless, since it's always guaranteed to
return this.
Type
unboxify in class Typepublic TypeReference getWrapperClass()
boxify().
public GeneratedExpression wrap(GeneratedExpression exp)
new Float(x) for the paramter x.
REVISIT: it's not clear how this method works for VOID.
public GeneratedExpression unwrap(GeneratedExpression exp)
public void generate(Formatter f)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||