class ReferenceJType extends AbstractJType
| Modifier and Type | Field and Description |
|---|---|
private StaticRefJExpr |
classExpr |
private CachingLinkedHashMap<java.lang.String,NestedJType> |
nestedTypes |
private java.lang.String |
packageName |
private java.lang.String |
simpleName |
private StaticRefJExpr |
superExpr |
private StaticRefJExpr |
thisExpr |
private PrimitiveJType |
unboxed |
| Constructor and Description |
|---|
ReferenceJType(java.lang.String packageName,
java.lang.String simpleName) |
ReferenceJType(java.lang.String packageName,
java.lang.String simpleName,
PrimitiveJType unboxed) |
| Modifier and Type | Method and Description |
|---|---|
JExpr |
_class()
An expression of the form
ThisType.class. |
JCall |
_new()
Construct a new instance of this non-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.
|
(package private) static ReferenceJType |
of(JType type) |
(package private) java.lang.String |
qualifiedName(SourceFileWriter writer) |
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.
|
JType |
unbox()
The primitive-unboxed version of this type.
|
(package private) void |
writeDirect(SourceFileWriter sourceFileWriter) |
_new, _new, _newArray, $t, $v, array, box, call, call, elementType, erasure, field, methodRef, methodRef, typeArg, typeArg, typeArgs, wildcardExtends, wildcardSuperprivate final PrimitiveJType unboxed
private final java.lang.String packageName
private final java.lang.String simpleName
private StaticRefJExpr classExpr
private StaticRefJExpr thisExpr
private StaticRefJExpr superExpr
private CachingLinkedHashMap<java.lang.String,NestedJType> nestedTypes
ReferenceJType(java.lang.String packageName,
java.lang.String simpleName)
ReferenceJType(java.lang.String packageName,
java.lang.String simpleName,
PrimitiveJType unboxed)
static ReferenceJType of(JType type)
java.lang.String qualifiedName(SourceFileWriter writer)
qualifiedName in class AbstractJTypepublic java.lang.String simpleName()
JTypesimpleName in interface JTypesimpleName in class AbstractJTypepublic JExpr _class()
JTypeThisType.class._class in interface JType_class in class AbstractJTypepublic JExpr _this()
JTypeThisType.this. If the type is an array type, an exception is thrown._this in interface JType_this in class AbstractJTypepublic JExpr _super()
JTypeThisType.super. If the type is an array type, an exception is thrown._super in interface JType_super in class AbstractJTypepublic JCall _new()
JType_new in interface JType_new in class AbstractJTypepublic JAnonymousClassDef _newAnon()
JType_newAnon in interface JType_newAnon in class AbstractJTypepublic JType unbox()
JTypeunbox in interface JTypeunbox in class AbstractJTypevoid writeDirect(SourceFileWriter sourceFileWriter) throws java.io.IOException
writeDirect in class AbstractJTypejava.io.IOExceptionpublic JType typeArg(JType... args)
JTypetypeArg in interface JTypetypeArg in class AbstractJTypeargs - the type argumentspublic JType nestedType(java.lang.String name)
JTypenestedType in interface JTypenestedType in class AbstractJTypename - the name of the nested typepublic java.lang.String toString()
toString in class AbstractJType