| Package | Description |
|---|---|
| org.mule.devkit.model.code |
Library for generating Java source code
|
| org.mule.devkit.model.code.builders |
| Modifier and Type | Class and Description |
|---|---|
class |
GeneratedClass
A generated Java class/interface/enum/....
|
class |
NullType
Special class object that represents the type of "null".
|
class |
PrimitiveType
Java built-in primitive types.
|
class |
TypeReference
Represents a Java reference type, such as a class, an interface,
an enum, an array type, a parameterized type.
|
class |
TypeVariable
Type variable used to declare generics.
|
| Modifier and Type | Method and Description |
|---|---|
Type |
CodeModel._ref(Class<?> c) |
Type |
Type.elementType()
If this is an array, returns the component type of the array.
|
Type |
Type.erasure()
Returns the erasure of this type.
|
Type[] |
GeneratedMethod.listParamTypes()
Returns all the parameter types in an array.
|
Type |
GeneratedMethod.listVarParamType()
Returns the varags parameter type.
|
Type |
CodeModel.parseType(String name)
Obtains a type object from a type name.
|
Type |
CodeModel.ref(String fullyQualifiedClassName)
Obtains a reference to an existing class from its fully-qualified
class name.
|
Type |
CodeModel.ref(TypeMirror typeMirror) |
Type |
GeneratedVariable.type()
Return the type of this variable.
|
Type |
GeneratedMethod.type()
Returns the return type.
|
Type |
GeneratedVariable.type(Type newType)
Sets the type of this variable.
|
Type |
TypeReference.unboxify() |
abstract Type |
Type.unboxify()
If this class is a wrapper type for a primitive, return the primitive type.
|
Type |
PrimitiveType.unboxify()
Deprecated.
calling this method from
PrimitiveType
would be meaningless, since it's always guaranteed to
return this. |
| Modifier and Type | Method and Description |
|---|---|
static GeneratedExpression |
Op._instanceof(GeneratedExpression left,
Type right) |
GeneratedExpression |
GeneratedExpression._instanceof(Type right)
Returns "[this] instanceof [right]"
|
GeneratedExpression |
AbstractExpression._instanceof(Type right) |
static GeneratedInvocation |
ExpressionFactory._new(Type t) |
static GeneratedCast |
ExpressionFactory.cast(Type type,
GeneratedExpression expr) |
int |
Type.compareTo(Type o)
Compare two JTypes by FQCN, giving sorting precedence to types
that belong to packages java and javax over all others.
|
GeneratedVariable |
GeneratedBlock.decl(int mods,
Type type,
String name,
GeneratedExpression init)
Adds a local variable declaration to this block
|
GeneratedVariable |
GeneratedBlock.decl(Type type,
String name)
Adds a local variable declaration to this block
|
GeneratedVariable |
GeneratedBlock.decl(Type type,
String name,
GeneratedExpression init)
Adds a local variable declaration to this block
|
static GeneratedExpression |
ExpressionFactory.dotclass(Type cl) |
GeneratedField |
GeneratedClass.field(int mods,
Type type,
String name)
Adds a field to the list of field members of this DefinedClass.
|
GeneratedField |
GeneratedClass.field(int mods,
Type type,
String name,
GeneratedExpression init)
Adds a field to the list of field members of this DefinedClass.
|
GeneratedForEach |
GeneratedBlock.forEach(Type varType,
String name,
GeneratedExpression collection)
Creates an enhanced For statement based on j2se 1.5 JLS
and add it to this block
|
GeneratedMethod |
GeneratedClass.getConstructor(Type[] argTypes)
Looks for a method that has the specified method signature
and return it.
|
GeneratedMethod |
GeneratedClass.getMethod(String name,
Type[] argTypes)
Looks for a method that has the specified method signature
and return it.
|
boolean |
GeneratedMethod.hasSignature(Type[] argTypes)
Returns true if the method has the specified signature.
|
GeneratedVariable |
GeneratedForLoop.init(int mods,
Type type,
String var,
GeneratedExpression e) |
GeneratedVariable |
GeneratedForLoop.init(Type type,
String var,
GeneratedExpression e) |
GeneratedMethod |
GeneratedClass.method(int mods,
Type type,
String name)
Add a method to the list of method members of this DefinedClass instance.
|
TypeReference |
TypeReference.narrow(Type type) |
static GeneratedArray |
ExpressionFactory.newArray(Type type) |
static GeneratedArray |
ExpressionFactory.newArray(Type type,
GeneratedExpression size)
Generates
new T[size]. |
static GeneratedArray |
ExpressionFactory.newArray(Type type,
int size)
Generates
new T[size]. |
GeneratedVariable |
GeneratedMethod.param(int mods,
Type type,
String name)
Add the specified variable to the list of parameters
for this method signature.
|
GeneratedAnnotationUse |
GeneratedAnnotationUse.param(String name,
Type type)
Adds a member value pair to this annotation based on the
type represented by the given Type
|
AnnotationArrayMember |
AnnotationArrayMember.param(Type type) |
GeneratedVariable |
GeneratedMethod.param(Type type,
String name) |
Formatter |
Formatter.t(Type type) |
Type |
GeneratedVariable.type(Type newType)
Sets the type of this variable.
|
void |
GeneratedMethod.type(Type t)
Overrides the return type.
|
GeneratedVariable |
GeneratedMethod.varParam(Type type,
String name)
Add the specified variable argument to the list of parameters
for this method signature.
|
| Constructor and Description |
|---|
GeneratedForEach(Type vartype,
String variable,
GeneratedExpression collection) |
| Modifier and Type | Method and Description |
|---|---|
FieldBuilder |
FieldBuilder.type(Type typeRef) |
Copyright © 2010–2015 MuleSoft, Inc.. All rights reserved.