Package org.jboss.jdeparser
Class AbstractJType
java.lang.Object
org.jboss.jdeparser.AbstractJType
- All Implemented Interfaces:
JType
- Direct Known Subclasses:
ArrayJType
,NarrowedJType
,NestedJType
,PrimitiveJType
,ReferenceJType
,ThisJType
,WildcardJType
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ArrayJType
private CachingLinkedHashMap<String,
JAssignableExpr> private WildcardJType
private WildcardJType
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription_class()
An expression of the formThisType.class
._new()
Construct a new instance of this non-array type._new
(int dim) Construct a new instance of this array type.Construct a new instance of this array type._newAnon()
Construct a new anonymous subclass of this type.Create a new array of this type which is inline-initialized._super()
An expression of the formThisType.super
._this()
An expression of the formThisType.this
.Get a nested type within this reference type.Look up a static field on this type.array()
An array of this type.box()
The primitive-boxed version of this type.Call a static method on this type.call
(ExecutableElement method) Call a static method on this type.The element type, if this an array (otherwisenull
).final boolean
(package private) abstract boolean
equals
(AbstractJType other) erasure()
The erasure of this type.Look up a static field on this type.abstract int
hashCode()
Get a method reference of this type.methodRef
(ExecutableElement method) Get a method reference of this type.nestedType
(String name) Get a nested type within this reference type.(package private) static AbstractJType
(package private) String
abstract String
Get the simple name of this type.abstract String
toString()
This type, with the given generic type arguments.This type, with the given generic type arguments.This type, with the given generic type arguments.JType[]
typeArgs()
Get the type arguments of this type.unbox()
The primitive-unboxed version of this type.Get a wildcard that extends this type.Get a wildcard that this type extends.(package private) abstract void
writeDirect
(SourceFileWriter sourceFileWriter)
-
Field Details
-
array
-
wildcardExtends
-
wildcardSuper
-
staticRefs
-
-
Constructor Details
-
AbstractJType
AbstractJType()
-
-
Method Details
-
of
-
qualifiedName
String qualifiedName() -
hashCode
public abstract int hashCode() -
equals
-
equals
-
simpleName
Description copied from interface:JType
Get the simple name of this type.- Specified by:
simpleName
in interfaceJType
- Returns:
- the type's simple name
-
toString
-
_class
Description copied from interface:JType
An expression of the formThisType.class
. -
_this
Description copied from interface:JType
An expression of the formThisType.this
. If the type is an array type, an exception is thrown. -
_super
Description copied from interface:JType
An expression of the formThisType.super
. If the type is an array type, an exception is thrown. -
array
Description copied from interface:JType
An array of this type. -
_new
Description copied from interface:JType
Construct a new instance of this non-array type. If the type is an array type, an exception is thrown. -
_new
Description copied from interface:JType
Construct a new instance of this array type. If the type is not an array type, an exception is thrown. -
_new
Description copied from interface:JType
Construct a new instance of this array type. If the type is not an array type, an exception is thrown. -
_newArray
Description copied from interface:JType
Create a new array of this type which is inline-initialized. -
_newAnon
Description copied from interface:JType
Construct a new anonymous subclass of this type. -
typeArg
Description copied from interface:JType
This type, with the given generic type arguments. -
typeArg
Description copied from interface:JType
This type, with the given generic type arguments. -
typeArg
Description copied from interface:JType
This type, with the given generic type arguments. -
typeArgs
Description copied from interface:JType
Get the type arguments of this type. -
erasure
Description copied from interface:JType
The erasure of this type. -
elementType
Description copied from interface:JType
The element type, if this an array (otherwisenull
).- Specified by:
elementType
in interfaceJType
- Returns:
- the element type, or
null
if it is not an array
-
box
Description copied from interface:JType
The primitive-boxed version of this type. -
unbox
Description copied from interface:JType
The primitive-unboxed version of this type. -
wildcardExtends
Description copied from interface:JType
Get a wildcard that extends this type.- Specified by:
wildcardExtends
in interfaceJType
- Returns:
- the wildcard
-
wildcardSuper
Description copied from interface:JType
Get a wildcard that this type extends.- Specified by:
wildcardSuper
in interfaceJType
- Returns:
- the wildcard
-
nestedType
Description copied from interface:JType
Get a nested type within this reference type.- Specified by:
nestedType
in interfaceJType
- Parameters:
name
- the name of the nested type- Returns:
- the nested type
-
$t
Description copied from interface:JType
Get a nested type within this reference type. -
field
Description copied from interface:JType
Look up a static field on this type. -
$v
Description copied from interface:JType
Look up a static field on this type. -
call
Description copied from interface:JType
Call a static method on this type. -
call
Description copied from interface:JType
Call a static method on this type. -
methodRef
Description copied from interface:JType
Get a method reference of this type. -
methodRef
Description copied from interface:JType
Get a method reference of this type. -
writeDirect
- Throws:
IOException
-