class ArrayJType extends AbstractJType
Modifier and Type | Field and Description |
---|---|
private StaticRefJExpr |
classExpr |
private AbstractJType |
elementType |
Constructor and Description |
---|
ArrayJType(AbstractJType elementType) |
Modifier and Type | Method and Description |
---|---|
JExpr |
_class()
An expression of the form
ThisType.class . |
JExpr |
_new(JExpr dim)
Construct a new instance of this array type.
|
JArrayExpr |
_newArray()
Create a new array of this type which is inline-initialized.
|
JType |
elementType()
The element type, if this an array (otherwise
null ). |
(package private) java.lang.String |
qualifiedName(SourceFileWriter writer) |
java.lang.String |
simpleName()
Get the simple name of this type.
|
java.lang.String |
toString() |
(package private) void |
writeDirect(SourceFileWriter sourceFileWriter) |
private final AbstractJType elementType
private StaticRefJExpr classExpr
ArrayJType(AbstractJType elementType)
public JType elementType()
JType
null
).elementType
in interface JType
elementType
in class AbstractJType
null
if it is not an arrayvoid writeDirect(SourceFileWriter sourceFileWriter) throws java.io.IOException
writeDirect
in class AbstractJType
java.io.IOException
java.lang.String qualifiedName(SourceFileWriter writer)
qualifiedName
in class AbstractJType
public JExpr _new(JExpr dim)
JType
_new
in interface JType
_new
in class AbstractJType
dim
- the array sizepublic JArrayExpr _newArray()
JType
_newArray
in interface JType
_newArray
in class AbstractJType
public java.lang.String simpleName()
JType
simpleName
in interface JType
simpleName
in class AbstractJType
public java.lang.String toString()
toString
in class AbstractJType