public class JTypeVar extends AbstractJClass implements IJDeclaration
IJGenerifiableEMPTY_ARRAY| Modifier | Constructor and Description |
|---|---|
protected |
JTypeVar(JCodeModel aOwner,
String sName) |
| 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.
|
JTypeVar |
bound(AbstractJClass bound)
Adds a bound to this variable.
|
void |
declare(JFormatter f)
Prints out the declaration of the variable.
|
String |
fullName()
Gets the full name of the type.
|
void |
generate(JFormatter f) |
boolean |
isAbstract() |
boolean |
isInterface() |
String |
name()
Gets the name of this class.
|
protected AbstractJClass |
substituteParams(JTypeVar[] variables,
List<? extends AbstractJClass> bindings)
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, wildcardSuperbinaryName, elementType, isArray, isAssignableFrom, isAssignableFrom, isError, isPrimitive, isReference, parseprotected JTypeVar(@Nonnull JCodeModel aOwner, @Nonnull String sName)
@Nonnull public String name()
AbstractJClassname in class AbstractJClassjava.lang.String.@Nonnull public String fullName()
AbstractJTypefullName in class AbstractJTypenull for unnamed classes.@Nullable public JPackage _package()
AbstractJClass_package in class AbstractJClassJPackage this class belongs to. Is usually not
null except for the JTypeVar and the
JTypeWildcard implementation.@Nonnull public JTypeVar bound(@Nonnull AbstractJClass bound)
bound - Bound class to be added@Nonnull public AbstractJClass _extends()
If no bound is given, this method returns Object.
_extends in class AbstractJClassAbstractJClass 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 AbstractJClassAbstractJClass
objects that represents those interfaces implemented by this
object.public boolean isInterface()
isInterface in class AbstractJClasstrue if this object represents an interface.public boolean isAbstract()
isAbstract in class AbstractJClasstrue if this class is an abstract class.@Nonnull protected AbstractJClass substituteParams(@Nonnull JTypeVar[] variables, @Nonnull List<? extends AbstractJClass> bindings)
AbstractJClassAbstractJClass
for Map<String,Map<Integer>>. substituteParams in class AbstractJClassvariables - Type variablesbindings - Bindingsnull.public void declare(@Nonnull JFormatter f)
declare in interface IJDeclarationpublic void generate(@Nonnull JFormatter f)
generate in interface IJGenerablegenerate in class AbstractJClassCopyright © 2013–2015 Philip Helger. All rights reserved.