public class JNarrowedClass extends AbstractJClass
EMPTY_ARRAY| Constructor and Description |
|---|
JNarrowedClass(AbstractJClass basis,
AbstractJClass arg) |
JNarrowedClass(AbstractJClass basis,
List<? extends AbstractJClass> args) |
| Modifier and Type | Method and Description |
|---|---|
AbstractJClass |
_extends()
Gets the super class of this class.
|
Iterator<AbstractJClass> |
_implements()
Iterates all super interfaces directly implemented by this class/interface.
|
JPackage |
_package()
Gets the package to which this class belongs.
|
AbstractJClass |
basis() |
String |
binaryName()
Gets the binary name of the type.
|
boolean |
containsTypeVar(JTypeVar aVar)
Check if this class is a generic class and contains the passed type
variable.
|
boolean |
equals(Object obj) |
AbstractJClass |
erasure() |
String |
fullName()
Gets the full name of the type.
|
void |
generate(JFormatter f) |
List<? extends AbstractJClass> |
getTypeParameters() |
int |
hashCode() |
boolean |
isAbstract() |
boolean |
isArray()
Tell whether or not this is an array type.
|
boolean |
isError()
Tells whether or not this is an error-type.
|
boolean |
isInterface() |
String |
name()
Gets the name of this class.
|
JNarrowedClass |
narrow(AbstractJClass... clazz) |
JNarrowedClass |
narrow(AbstractJClass clazz)
"Narrows" a generic class to a concrete class by specifying a type
argument.
|
protected AbstractJClass |
substituteParams(JTypeVar[] variables,
List<? extends AbstractJClass> bindings)
Substitutes the type variables with their actual arguments.
|
array, boxify, dotclass, getBaseClass, getBaseClass, getPrimitiveType, isParameterized, methodRef, narrow, narrow, narrow, narrow, narrowEmpty, outer, owner, staticInvoke, staticInvoke, staticRef, staticRef, toString, typeParams, unboxify, wildcard, wildcard, wildcardSuperdeclarable, elementType, isAssignableFrom, isAssignableFrom, isPrimitive, isReference, parsepublic JNarrowedClass(@Nonnull AbstractJClass basis, @Nonnull AbstractJClass arg)
public JNarrowedClass(@Nonnull AbstractJClass basis, @Nonnull List<? extends AbstractJClass> args)
public boolean containsTypeVar(@Nullable JTypeVar aVar)
AbstractJTypecontainsTypeVar in class AbstractJTypeaVar - The type variable to check. May be null.true if the passed type variable is contained,
false otherwise.@Nonnull public AbstractJClass basis()
public JNarrowedClass narrow(@Nonnull AbstractJClass clazz)
AbstractJClass.narrow(X) builds Set<X> from
Set.narrow in class AbstractJClassclazz - class to narrow withnull. Narrowed class.public JNarrowedClass narrow(@Nonnull AbstractJClass... clazz)
narrow in class AbstractJClasspublic String name()
AbstractJClassname in class AbstractJClassjava.lang.String.@Nonnull public String fullName()
AbstractJTypefullName in class AbstractJTypenull for unnamed classes.public String binaryName()
AbstractJTypebinaryName in class AbstractJTypepublic void generate(JFormatter f)
generate in interface IJGenerablegenerate in class AbstractJClass@Nonnull public JPackage _package()
AbstractJClass_package in class AbstractJClassJPackage this class belongs to. Is usually not
null except for the JTypeVar and the
JTypeWildcard implementation.@Nullable public AbstractJClass _extends()
AbstractJClass_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()
AbstractJClass_implements in class AbstractJClassAbstractJClass
objects that represents those interfaces implemented by this
object.@Nonnull public AbstractJClass erasure()
erasure in class AbstractJClassList<Integer> in which case this
method returns the reference to List without any
generic type parameters.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.public boolean isArray()
AbstractJTypeisArray in class AbstractJTypetrue if this an array typepublic boolean isError()
AbstractJTypeError types are not actual Java types and shouldn't be used in actually generated code.
isError in class AbstractJTypetrue if this is an error classJErrorClasspublic List<? extends AbstractJClass> getTypeParameters()
getTypeParameters in class AbstractJClassprotected AbstractJClass substituteParams(JTypeVar[] variables, List<? extends AbstractJClass> bindings)
AbstractJClassAbstractJClass
for Map<String,Map<Integer>>. substituteParams in class AbstractJClassvariables - Type variablesbindings - Bindingsnull.Copyright © 2013–2017 Philip Helger. All rights reserved.