Package | Description |
---|---|
com.helger.jcodemodel |
Library for generating Java source code.
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractJClass
Represents a Java reference type, such as a class, an interface, an enum, an
array type, a parameterized type.
|
class |
AbstractJClassContainer<CLASSTYPE extends AbstractJClassContainer<CLASSTYPE>>
A generated Java class/interface/enum/annotation
This class models a declaration, and since a declaration can be always used as a reference, it inherits AbstractJClass . |
class |
JAnonymousClass
Anonymous class quick hack.
|
class |
JArrayClass
Array class.
|
class |
JDefinedClass
A generated Java class/interface/enum/....
|
class |
JDirectClass
A special
AbstractJClass that represents an unknown class (except its
name.) |
class |
JErrorClass
A special
AbstractJClass that represents an error class. |
class |
JNarrowedClass
Represents X<Y>.
|
class |
JNullType
Special class object that represents the type of "null".
|
class |
JPrimitiveType
Java built-in primitive types.
|
class |
JTypeVar
Type variable used to declare generics.
|
class |
JTypeVarClass
A special type variable that is used inside
JInvocation objects if
the parameter type is an AbstractJClass |
class |
JTypeWildcard
Represents a wildcard type like "?
|
Modifier and Type | Method and Description |
---|---|
AbstractJType |
JCodeModel._ref(Class<?> c)
Like
JCodeModel.ref(Class) but also handling primitive types! |
AbstractJType |
JTypeWildcard.declarable() |
AbstractJType |
AbstractJType.declarable() |
AbstractJType |
JArrayClass.elementType() |
AbstractJType |
AbstractJType.elementType()
If this is an array, returns the component type of the array (T of T[]).
|
AbstractJType |
AbstractJType.erasure() |
AbstractJType[] |
JMethod.listParamTypes()
Returns all the parameter types in an array.
|
AbstractJType |
JMethod.listVarParamType()
Returns the varags parameter type.
|
AbstractJType |
JCodeModel.parseType(String name)
Obtains a type object from a type name.
|
AbstractJType |
JVar.type()
Return the type of this variable.
|
AbstractJType |
JMethod.type() |
AbstractJType |
JLambdaParam.type() |
AbstractJType |
JLambdaMethodRef.type() |
AbstractJType |
JForEach.type() |
AbstractJType |
JCast.type() |
AbstractJType |
JArray.type() |
AbstractJType |
JVar.type(AbstractJType aNewType)
Sets the type of this variable.
|
AbstractJType |
JPrimitiveType.unboxify()
Deprecated.
calling this method from
JPrimitiveType would be
meaningless, since it's always guaranteed to return
this. |
abstract AbstractJType |
AbstractJType.unboxify()
If this class is a wrapper type for a primitive, return the primitive type.
|
AbstractJType |
AbstractJClass.unboxify() |
Modifier and Type | Method and Description |
---|---|
IJExpression |
IJExpression._instanceof(AbstractJType right) |
JOpBinary |
AbstractJExpressionImpl._instanceof(AbstractJType right) |
static JOpBinary |
JOp._instanceof(IJExpression left,
AbstractJType right) |
static JInvocation |
JExpr._new(AbstractJType t) |
JInvocation |
JBlock._new(AbstractJType t) |
JLambdaParam |
JLambda.addParam(AbstractJType aType,
String sName)
Add a parameter with a type name.
|
static JCast |
JExpr.cast(AbstractJType type,
IJExpression expr) |
JVar |
JBlock.decl(AbstractJType type,
String name)
Adds a local variable declaration to this block.
|
JVar |
JBlock.decl(AbstractJType type,
String name,
IJExpression init)
Adds a local variable declaration to this block.
|
JVar |
JBlock.decl(int mods,
AbstractJType type,
String name)
Adds a local variable declaration to this block.
|
JVar |
JBlock.decl(int mods,
AbstractJType type,
String name,
IJExpression init)
Adds a local variable declaration to this block.
|
JFieldVar |
JDefinedClass.field(int mods,
AbstractJType type,
String name)
Adds a field to the list of field members of this JDefinedClass.
|
JFieldVar |
JDefinedClass.field(int mods,
AbstractJType type,
String name,
IJExpression init)
Adds a field to the list of field members of this JDefinedClass.
|
JForEach |
JBlock.forEach(AbstractJType aVarType,
String sName,
IJExpression aCollection)
Creates an enhanced For statement based on j2se 1.5 JLS and add it to this
block
|
JMethod |
JDefinedClass.getConstructor(AbstractJType[] aArgTypes)
Looks for a method that has the specified method signature and return it.
|
JMethod |
JDefinedClass.getMethod(String sName,
AbstractJType[] aArgTypes)
Looks for a method that has the specified method signature and return it.
|
boolean |
JMethod.hasSignature(AbstractJType[] argTypes)
Returns true if the method has the specified signature.
|
JVar |
JForLoop.init(AbstractJType aType,
String sVarName,
IJExpression aInitExpr) |
JVar |
JForLoop.init(int mods,
AbstractJType aType,
String sVarName,
IJExpression aInitExpr) |
boolean |
AbstractJType.isAssignableFrom(AbstractJType that)
Checks the relationship between two types.
|
protected boolean |
AbstractJType.isAssignableFrom(AbstractJType that,
boolean bAllowsRawTypeUnchekedConversion) |
JMethod |
JDefinedClass.method(int mods,
AbstractJType type,
String name)
Add a method to the list of method members of this JDefinedClass instance.
|
JNarrowedClass |
AbstractJClass.narrow(AbstractJType type) |
static JArray |
JExpr.newArray(AbstractJType type) |
static JArray |
JExpr.newArray(AbstractJType type,
IJExpression size)
Generates
new T[size] . |
static JArray |
JExpr.newArray(AbstractJType type,
int size)
Generates
new T[size] . |
JAnnotationArrayMember |
JAnnotationArrayMember.param(AbstractJType type) |
JVar |
JMethod.param(AbstractJType type,
String name) |
JVar |
JMethod.param(int mods,
AbstractJType type,
String name)
Add the specified variable to the list of parameters for this method
signature.
|
JAnnotationUse |
JAnnotationUse.param(String name,
AbstractJType type)
Adds a member value pair to this annotation based on the type represented
by the given
AbstractJType |
JAnnotationUse |
JAnnotationUse.paramArray(String name,
AbstractJType... values) |
JAnnotationArrayMember |
JAnnotationArrayMember.params(AbstractJType... values) |
AbstractJType |
JVar.type(AbstractJType aNewType)
Sets the type of this variable.
|
void |
JMethod.type(AbstractJType t)
Overrides the return type.
|
JFormatter |
JFormatter.type(AbstractJType aType) |
JVar |
JMethod.varParam(AbstractJType type,
String name)
Add the specified variable argument to the list of parameters for this
method signature.
|
JVar |
JMethod.varParam(int mods,
AbstractJType type,
String name)
Add the specified variable argument to the list of parameters for this
method signature.
|
static JAnnotationStringValue |
AbstractJAnnotationValue.wrap(AbstractJType aType) |
Constructor and Description |
---|
JArray(AbstractJType type,
IJExpression size) |
JArrayClass(JCodeModel aOwner,
AbstractJType aComponentType) |
JCast(AbstractJType type,
IJExpression object)
JCast constructor
|
JFieldRef(AbstractJType type,
JVar var)
Static field reference.
|
JFieldRef(AbstractJType type,
String name)
Static field reference.
|
JFieldVar(JDefinedClass aOwnerClass,
JMods mods,
AbstractJType type,
String name,
IJExpression init)
JFieldVar constructor
|
JForEach(AbstractJType aVarType,
String sVarName,
IJExpression aCollection) |
JInvocation(AbstractJType aConstructorType)
Invokes a constructor of an object (i.e., creates a new object.)
|
JLambdaMethodRef(AbstractJType aType)
Constructor for a constructor method reference (
type::new ). |
JLambdaMethodRef(AbstractJType aType,
String sMethod)
Constructor for an arbitrary method reference.
|
JLambdaParam(AbstractJType aType,
String sName) |
JMethod(JDefinedClass aOwningClass,
int mods,
AbstractJType aReturnType,
String sName)
Constructor for regular methods
|
JVar(JMods aMods,
AbstractJType aType,
String sName,
IJExpression aInitExpr)
JVar constructor
|
Copyright © 2013–2017 Philip Helger. All rights reserved.