class JNarrowedClass extends JClass
| Modifier and Type | Field and Description |
|---|---|
private java.util.List<JClass> |
args
Arguments to those parameters.
|
(package private) JClass |
basis
A generic class with type parameters.
|
EMPTY_ARRAY| Constructor and Description |
|---|
JNarrowedClass(JClass basis,
JClass arg) |
JNarrowedClass(JClass basis,
java.util.List<JClass> args) |
| Modifier and Type | Method and Description |
|---|---|
JClass |
_extends()
Gets the super class of this class.
|
java.util.Iterator<JClass> |
_implements()
Iterates all super interfaces directly implemented by
this class/interface.
|
JPackage |
_package()
Gets the package to which this class belongs.
|
java.lang.String |
binaryName()
Gets the binary name of the type.
|
boolean |
equals(java.lang.Object obj) |
JClass |
erasure()
Returns the erasure of this type.
|
java.lang.String |
fullName()
Gets the full name of the type.
|
void |
generate(JFormatter f) |
java.util.List<JClass> |
getTypeParameters()
If this class is parameterized, return the type parameter of the given index.
|
int |
hashCode() |
boolean |
isAbstract()
Checks if this class is an abstract class.
|
boolean |
isArray()
Tell whether or not this is an array type.
|
boolean |
isInterface()
Checks if this object represents an interface.
|
java.lang.String |
name()
Gets the name of this class.
|
JClass |
narrow(JClass... clazz) |
JClass |
narrow(JClass clazz)
"Narrows" a generic class to a concrete class by specifying
a type argument.
|
(package private) void |
printLink(JFormatter f)
Prints the class name in javadoc @link format.
|
protected JClass |
substituteParams(JTypeVar[] variables,
java.util.List<JClass> bindings)
Substitutes the type variables with their actual arguments.
|
array, boxify, dotclass, getBaseClass, getBaseClass, getPrimitiveType, isAssignableFrom, isParameterized, narrow, narrow, narrow, narrow, outer, owner, staticInvoke, staticInvoke, staticRef, staticRef, toString, typeParams, unboxify, wildcardcompareTo, elementType, isPrimitive, isReference, parsefinal JClass basis
private final java.util.List<JClass> args
public JClass narrow(JClass clazz)
JClass
.narrow(X) builds Set<X> from Set.
public java.lang.String name()
JClasspublic java.lang.String fullName()
JTypepublic java.lang.String binaryName()
JTypebinaryName in class JTypepublic void generate(JFormatter f)
generate in interface JGenerablegenerate in class JClassvoid printLink(JFormatter f)
JClasspublic JPackage _package()
JClasspublic JClass _extends()
JClass_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 java.util.Iterator<JClass> _implements()
JClass_implements in class JClassJClass objects that represents those interfaces
implemented by this object.public JClass erasure()
JTypepublic boolean isInterface()
JClassisInterface in class JClasspublic boolean isAbstract()
JClassisAbstract in class JClasspublic boolean isArray()
JTypepublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectprotected JClass substituteParams(JTypeVar[] variables, java.util.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 java.util.List<JClass> getTypeParameters()
JClassgetTypeParameters in class JClass