|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.codemodel.JType
com.sun.codemodel.JClass
com.sun.codemodel.JTypeVar
public final class JTypeVar
Type variable used to declare generics.
JGenerifiable| Field Summary |
|---|
| Fields inherited from class com.sun.codemodel.JClass |
|---|
EMPTY_ARRAY |
| Method Summary | |
|---|---|
JClass |
_extends()
Returns the class bound of this variable. |
Iterator<JClass> |
_implements()
Returns the interface bounds of this variable. |
JPackage |
_package()
Gets the package to which this class belongs. |
JTypeVar |
bound(JClass c)
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()
Checks if this class is an abstract class. |
boolean |
isInterface()
Checks if this object represents an interface. |
String |
name()
Gets the name of this class. |
protected JClass |
substituteParams(JTypeVar[] variables,
List<JClass> bindings)
Substitutes the type variables with their actual arguments. |
| Methods inherited from class com.sun.codemodel.JClass |
|---|
array, boxify, dotclass, erasure, getBaseClass, getBaseClass, getPrimitiveType, getTypeParameters, isAssignableFrom, isParameterized, narrow, narrow, narrow, narrow, narrow, narrow, outer, owner, staticInvoke, staticInvoke, staticRef, staticRef, toString, typeParams, unboxify, wildcard |
| Methods inherited from class com.sun.codemodel.JType |
|---|
binaryName, compareTo, elementType, isArray, isPrimitive, isReference, parse |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public String name()
JClass
name in class JClassjava.lang.String.public String fullName()
JType
fullName in class JTypepublic JPackage _package()
JClass
_package in class JClasspublic JTypeVar bound(JClass c)
public JClass _extends()
If no bound is given, this method returns Object.
_extends in class JClassJClass.
Even if no super class is given explicitly or this JClass
is not a class, this method still returns
JClass for Object.
If this JClass represents Object, return null.public Iterator<JClass> _implements()
_implements in class JClassJClass objects that represents those interfaces
implemented by this object.public boolean isInterface()
JClass
isInterface in class JClasspublic boolean isAbstract()
JClass
isAbstract in class JClasspublic void declare(JFormatter f)
declare in interface JDeclaration
protected JClass substituteParams(JTypeVar[] variables,
List<JClass> bindings)
JClass
For example, when this class is Map<String,Map<V>>,
(where V then doing
substituteParams( V, Integer ) returns a JClass
for Map<String,Map<Integer>>.
This method needs to work recursively.
substituteParams in class JClasspublic void generate(JFormatter f)
generate in interface JGenerablegenerate in class JClass
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||