Package | Description |
---|---|
org.jboss.jdeparser |
Modifier and Type | Class and Description |
---|---|
class |
JClass
Represents a Java reference type, such as a class, an interface,
an enum, an array type, a parameterized type.
|
class |
JDefinedClass
A generated Java class/interface/enum/....
|
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.
|
Modifier and Type | Method and Description |
---|---|
JType |
JDeparser._ref(Class<?> c) |
JType |
JType.elementType()
If this is an array, returns the component type of the array.
|
JType |
JType.erasure()
Returns the erasure of this type.
|
JType[] |
JMethod.listParamTypes()
Returns all the parameter types in an array.
|
JType |
JMethod.listVarParamType()
Returns the varags parameter type.
|
JType |
JDeparser.parseType(String name)
Obtains a type object from a type name.
|
JType |
JVar.type()
Return the type of this variable.
|
JType |
JMethod.type()
Returns the return type.
|
JType |
JVar.type(JType newType)
Sets the type of this variable.
|
abstract JType |
JType.unboxify()
If this class is a wrapper type for a primitive, return the primitive type.
|
JType |
JPrimitiveType.unboxify()
Deprecated.
calling this method from
JPrimitiveType
would be meaningless, since it's always guaranteed to
return this. |
JType |
JClass.unboxify() |
Modifier and Type | Method and Description |
---|---|
static JExpression |
JOp._instanceof(JExpression left,
JType right) |
JExpression |
JExpressionImpl._instanceof(JType right) |
JExpression |
JExpression._instanceof(JType right)
Returns "[this] instanceof [right]"
|
static JInvocation |
JExpr._new(JType t) |
static org.jboss.jdeparser.JCast |
JExpr.cast(JType type,
JExpression expr) |
int |
JType.compareTo(JType o)
Compare two JTypes by FQCN, giving sorting precedence to types
that belong to packages java and javax over all others.
|
JVar |
JBlock.decl(int mods,
JType type,
String name,
JExpression init)
Adds a local variable declaration to this block
|
JVar |
JBlock.decl(JType type,
String name)
Adds a local variable declaration to this block
|
JVar |
JBlock.decl(JType type,
String name,
JExpression init)
Adds a local variable declaration to this block
|
JFieldVar |
JDefinedClass.field(int mods,
JType type,
String name)
Adds a field to the list of field members of this JDefinedClass.
|
JFieldVar |
JDefinedClass.field(int mods,
JType type,
String name,
JExpression init)
Adds a field to the list of field members of this J |