Package org.jboss.jdeparser
Class NarrowedJType
- java.lang.Object
-
- org.jboss.jdeparser.AbstractJType
-
- org.jboss.jdeparser.NarrowedJType
-
- All Implemented Interfaces:
JType
class NarrowedJType extends AbstractJType
-
-
Constructor Summary
Constructors Constructor Description NarrowedJType(AbstractJType erased, JType[] args)
-
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.JCall_new(JExpr dim)Construct a new instance of this array type.JExpr_super()An expression of the formThisType.super.JExpr_this()An expression of the formThisType.this.JCallcall(java.lang.String name)Call a static method on this type.private static JType[]concat(JType[] a, JType[] b)(package private) booleanequals(AbstractJType other)private booleanequals(NarrowedJType other)JTypeerasure()The erasure of this type.inthashCode()JTypenestedType(java.lang.String name)Get a nested type within this reference type.java.lang.StringsimpleName()Get the simple name of this type.java.lang.StringtoString()JTypetypeArg(JType... args)This type, with the given generic type arguments.JType[]typeArgs()Get the type arguments of this type.(package private) voidwriteDirect(SourceFileWriter sourceFileWriter)-
Methods inherited from class org.jboss.jdeparser.AbstractJType
_new, _newAnon, _newArray, $t, $v, array, box, call, elementType, equals, field, methodRef, methodRef, of, qualifiedName, typeArg, typeArg, unbox, wildcardExtends, wildcardSuper
-
-
-
-
Field Detail
-
erased
private final AbstractJType erased
-
args
private final JType[] args
-
-
Constructor Detail
-
NarrowedJType
public NarrowedJType(AbstractJType erased, JType[] args)
-
-
Method Detail
-
equals
boolean equals(AbstractJType other)
- Specified by:
equalsin classAbstractJType
-
equals
private boolean equals(NarrowedJType other)
-
hashCode
public int hashCode()
- Specified by:
hashCodein 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
-
_new
public JCall _new(JExpr dim)
Description copied from interface:JTypeConstruct a new instance of this array type. If the type is not an array type, an exception is thrown.- Specified by:
_newin interfaceJType- Overrides:
_newin classAbstractJType- Parameters:
dim- the array size- Returns:
- the construction call
-
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
-
typeArgs
public JType[] typeArgs()
Description copied from interface:JTypeGet the type arguments of this type.- Specified by:
typeArgsin interfaceJType- Overrides:
typeArgsin classAbstractJType- Returns:
- the type arguments of this type
-
erasure
public JType erasure()
Description copied from interface:JTypeThe erasure of this type.- Specified by:
erasurein interfaceJType- Overrides:
erasurein classAbstractJType- Returns:
- the erasure of this type
-
call
public JCall call(java.lang.String name)
Description copied from interface:JTypeCall a static method on this type.- Specified by:
callin interfaceJType- Overrides:
callin classAbstractJType- Parameters:
name- the method to call- Returns:
- the method call
-
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
-
writeDirect
void writeDirect(SourceFileWriter sourceFileWriter) throws java.io.IOException
- Specified by:
writeDirectin classAbstractJType- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Specified by:
toStringin classAbstractJType
-
-