Package org.jboss.jdeparser
Class ReferenceJType
- java.lang.Object
-
- org.jboss.jdeparser.AbstractJType
-
- org.jboss.jdeparser.ReferenceJType
-
- All Implemented Interfaces:
JType
class ReferenceJType extends AbstractJType
-
-
Field Summary
Fields Modifier and Type Field Description private StaticRefJExprclassExprprivate CachingLinkedHashMap<java.lang.String,NestedJType>nestedTypesprivate java.lang.StringpackageNameprivate java.lang.StringsimpleNameprivate StaticRefJExprsuperExprprivate StaticRefJExprthisExprprivate PrimitiveJTypeunboxed
-
Constructor Summary
Constructors Constructor Description ReferenceJType(java.lang.String packageName, java.lang.String simpleName)ReferenceJType(java.lang.String packageName, java.lang.String simpleName, PrimitiveJType unboxed)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description JExpr_class()An expression of the formThisType.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 formThisType.super.JExpr_this()An expression of the formThisType.this.(package private) booleanequals(AbstractJType other)private booleanequals(ReferenceJType other)inthashCode()JTypenestedType(java.lang.String name)Get a nested type within this reference type.(package private) static ReferenceJTypeof(JType type)(package private) java.lang.StringqualifiedName()java.lang.StringsimpleName()Get the simple name of this type.java.lang.StringtoString()JTypetypeArg(JType... args)This type, with the given generic type arguments.JTypeunbox()The primitive-unboxed version of this type.(package private) voidwriteDirect(SourceFileWriter sourceFileWriter)
-
-
-
Field Detail
-
unboxed
private final PrimitiveJType unboxed
-
packageName
private final java.lang.String packageName
-
simpleName
private final java.lang.String simpleName
-
classExpr
private StaticRefJExpr classExpr
-
thisExpr
private StaticRefJExpr thisExpr
-
superExpr
private StaticRefJExpr superExpr
-
nestedTypes
private CachingLinkedHashMap<java.lang.String,NestedJType> nestedTypes
-
-
Constructor Detail
-
ReferenceJType
ReferenceJType(java.lang.String packageName, java.lang.String simpleName)
-
ReferenceJType
ReferenceJType(java.lang.String packageName, java.lang.String simpleName, PrimitiveJType unboxed)
-
-
Method Detail
-
of
static ReferenceJType of(JType type)
-
qualifiedName
java.lang.String qualifiedName()
- Overrides:
qualifiedNamein classAbstractJType
-
simpleName
public java.lang.String simpleName()
Description copied from interface:JTypeGet the simple name of this type.- Specified by:
simpleNamein interfaceJType- Specified by:
simpleNamein classAbstractJType- Returns:
- the type's simple name
-
_class
public JExpr _class()
Description copied from interface:JTypeAn expression of the formThisType.class.- Specified by:
_classin interfaceJType- Overrides:
_classin classAbstractJType- Returns:
- the expression
-
_this
public JExpr _this()
Description copied from interface:JTypeAn expression of the formThisType.this. If the type is an array type, an exception is thrown.- Specified by:
_thisin interfaceJType- Overrides:
_thisin classAbstractJType- Returns:
- the expression
-
_super
public JExpr _super()
Description copied from interface:JTypeAn expression of the formThisType.super. If the type is an array type, an exception is thrown.- Specified by:
_superin interfaceJType- Overrides:
_superin classAbstractJType- Returns:
- the expression
-
_new
public JCall _new()
Description copied from interface:JTypeConstruct a new instance of this non-array type. If the type is an array type, an exception is thrown.- Specified by:
_newin interfaceJType- Overrides:
_newin classAbstractJType- Returns:
- the construction call
-
_newAnon
public JAnonymousClassDef _newAnon()
Description copied from interface:JTypeConstruct a new anonymous subclass of this type.- Specified by:
_newAnonin interfaceJType- Overrides:
_newAnonin classAbstractJType- Returns:
- the anonymous subclass definition
-
unbox
public JType unbox()
Description copied from interface:JTypeThe primitive-unboxed version of this type.- Specified by:
unboxin interfaceJType- Overrides:
unboxin classAbstractJType- Returns:
- the unboxed version of this type
-
writeDirect
void writeDirect(SourceFileWriter sourceFileWriter) throws java.io.IOException
- Specified by:
writeDirectin classAbstractJType- Throws:
java.io.IOException
-
typeArg
public JType typeArg(JType... args)
Description copied from interface:JTypeThis type, with the given generic type arguments.- Specified by:
typeArgin interfaceJType- Overrides:
typeArgin classAbstractJType- Parameters:
args- the type arguments- Returns:
- the generic type
-
nestedType
public JType nestedType(java.lang.String name)
Description copied from interface:JTypeGet a nested type within this reference type.- Specified by:
nestedTypein interfaceJType- Overrides:
nestedTypein classAbstractJType- Parameters:
name- the name of the nested type- Returns:
- the nested type
-
equals
boolean equals(AbstractJType other)
- Specified by:
equalsin classAbstractJType
-
equals
private boolean equals(ReferenceJType other)
-
hashCode
public int hashCode()
- Specified by:
hashCodein classAbstractJType
-
toString
public java.lang.String toString()
- Specified by:
toStringin classAbstractJType
-
-