public class JTypeWildcard extends AbstractJClass
Instances of this class can be obtained from
AbstractJClass.wildcard()
Our modeling of types are starting to look really ugly. ideally it should have been done somewhat like APT, but it's too late now.
Modifier and Type | Class and Description |
---|---|
static class |
JTypeWildcard.EBoundMode |
EMPTY_ARRAY
Modifier | Constructor and Description |
---|---|
protected |
JTypeWildcard(AbstractJClass aBoundClass,
JTypeWildcard.EBoundMode eBoundMode) |
Modifier and Type | Method and Description |
---|---|
AbstractJClass |
_extends()
Returns the class bound of this variable.
|
Iterator<AbstractJClass> |
_implements()
Returns the interface bounds of this variable.
|
JPackage |
_package()
Gets the package to which this class belongs.
|
AbstractJClass |
bound() |
JTypeWildcard.EBoundMode |
boundMode() |
String |
fullName()
Gets the full name of the type.
|
void |
generate(JFormatter f) |
boolean |
isAbstract() |
boolean |
isError()
Tells whether or not this is an error-type.
|
boolean |
isInterface() |
String |
name()
Gets the name of this class.
|
protected AbstractJClass |
substituteParams(JTypeVar[] aVariables,
List<? extends AbstractJClass> aBindings)
Substitutes the type variables with their actual arguments.
|
array, boxify, dotclass, erasure, getBaseClass, getBaseClass, getPrimitiveType, getTypeParameters, isParameterized, narrow, narrow, narrow, narrow, narrow, narrow, outer, owner, staticInvoke, staticInvoke, staticRef, staticRef, toString, typeParams, unboxify, wildcard, wildcard, wildcardSuper
binaryName, elementType, isArray, isAssignableFrom, isAssignableFrom, isPrimitive, isReference, parse
protected JTypeWildcard(@Nonnull AbstractJClass aBoundClass, @Nonnull JTypeWildcard.EBoundMode eBoundMode)
@Nonnull public AbstractJClass bound()
@Nonnull public JTypeWildcard.EBoundMode boundMode()
@Nonnull public String name()
AbstractJClass
name
in class AbstractJClass
java.lang.String
.@Nonnull public String fullName()
AbstractJType
fullName
in class AbstractJType
null
for unnamed classes.@Nullable public JPackage _package()
AbstractJClass
_package
in class AbstractJClass
JPackage
this class belongs to. Is usually not
null
except for the JTypeVar
and the
JTypeWildcard
implementation.public AbstractJClass _extends()
If no bound is given, this method returns Object
.
_extends
in class AbstractJClass
AbstractJClass
representing the superclass of
the entity (class or interface) represented by this
AbstractJClass
. Even if no super class is given explicitly
or this AbstractJClass
is not a class, this method still
returns AbstractJClass
for Object
. If this
AbstractJClass
represents Object
, return null.@Nonnull public Iterator<AbstractJClass> _implements()
_implements
in class AbstractJClass
AbstractJClass
objects that represents those interfaces implemented by this
object.public boolean isInterface()
isInterface
in class AbstractJClass
true
if this object represents an interface.public boolean isAbstract()
isAbstract
in class AbstractJClass
true
if this class is an abstract class.public boolean isError()
AbstractJType
Error types are not actual Java types and shouldn't be used in actually generated code.
isError
in class AbstractJType
true
if this is an error classJErrorClass
@Nonnull protected AbstractJClass substituteParams(JTypeVar[] aVariables, List<? extends AbstractJClass> aBindings)
AbstractJClass
AbstractJClass
for Map<String,Map<Integer>>
. substituteParams
in class AbstractJClass
aVariables
- Type variablesaBindings
- Bindingsnull
.public void generate(@Nonnull JFormatter f)
generate
in interface IJGenerable
generate
in class AbstractJClass
Copyright © 2013–2015 Philip Helger. All rights reserved.