class NestedJType extends AbstractJType
Modifier and Type | Field and Description |
---|---|
private StaticRefJExpr |
classExpr |
private AbstractJType |
enclosingType |
private java.lang.String |
name |
private CachingLinkedHashMap<java.lang.String,NestedJType> |
nestedTypes |
private StaticRefJExpr |
superExpr |
private StaticRefJExpr |
thisExpr |
Constructor and Description |
---|
NestedJType(AbstractJType enclosingType,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
JExpr |
_class()
An expression of the form
ThisType.class . |
JCall |
_new(JExpr dim)
Construct a new instance of this array type.
|
JAnonymousClassDef |
_newAnon()
Construct a new anonymous subclass of this type.
|
JExpr |
_super()
An expression of the form
ThisType.super . |
JExpr |
_this()
An expression of the form
ThisType.this . |
JType |
nestedType(java.lang.String name)
Get a nested type within this reference type.
|
java.lang.String |
simpleName()
Get the simple name of this type.
|
java.lang.String |
toString() |
JType |
typeArg(JType... args)
This type, with the given generic type arguments.
|
(package private) void |
writeDirect(SourceFileWriter writer) |
_new, _new, _newArray, $t, $v, array, box, call, call, elementType, erasure, field, methodRef, methodRef, of, qualifiedName, typeArg, typeArg, typeArgs, unbox, wildcardExtends, wildcardSuper
private final AbstractJType enclosingType
private final java.lang.String name
private StaticRefJExpr classExpr
private StaticRefJExpr thisExpr
private StaticRefJExpr superExpr
private CachingLinkedHashMap<java.lang.String,NestedJType> nestedTypes
NestedJType(AbstractJType enclosingType, java.lang.String name)
public JExpr _class()
JType
ThisType.class
._class
in interface JType
_class
in class AbstractJType
public JExpr _this()
JType
ThisType.this
. If the type is an array type, an exception is thrown._this
in interface JType
_this
in class AbstractJType
public JExpr _super()
JType
ThisType.super
. If the type is an array type, an exception is thrown._super
in interface JType
_super
in class AbstractJType
public JCall _new(JExpr dim)
JType
_new
in interface JType
_new
in class AbstractJType
dim
- the array sizepublic JAnonymousClassDef _newAnon()
JType
_newAnon
in interface JType
_newAnon
in class AbstractJType
public java.lang.String simpleName()
JType
simpleName
in interface JType
simpleName
in class AbstractJType
public JType typeArg(JType... args)
JType
typeArg
in interface JType
typeArg
in class AbstractJType
args
- the type argumentspublic JType nestedType(java.lang.String name)
JType
nestedType
in interface JType
nestedType
in class AbstractJType
name
- the name of the nested typepublic java.lang.String toString()
toString
in class AbstractJType
void writeDirect(SourceFileWriter writer) throws java.io.IOException
writeDirect
in class AbstractJType
java.io.IOException