public class DefaultJavaTypeVariable<D extends JavaGenericDeclaration> extends DefaultJavaType implements JavaTypeVariable<D>
TypeVariablefullName, name| Constructor and Description |
|---|
DefaultJavaTypeVariable(java.lang.String name,
TypeResolver typeResolver) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<JavaType> |
getBounds() |
java.lang.String |
getCanonicalName()
Equivalent of (@link
Class.getCanonicalName(). |
java.lang.String |
getFullyQualifiedName()
Every primitive type, named package, top level class, and top level interface has a fully qualified name:
The fully qualified name of a primitive type is the keyword for that primitive type, namely byte, short, char, int, long, float, double, or boolean.
|
java.lang.String |
getGenericCanonicalName()
The canonical name with generic information.
|
D |
getGenericDeclaration() |
java.lang.String |
getGenericFullyQualifiedName()
The fully qualified name with generic information.
|
java.lang.String |
getGenericValue()
A java5+ representation of the class.
|
java.lang.String |
getName()
Equivalent of
Class.getName(). |
void |
setBounds(java.util.List<JavaType> bounds) |
equals, getAnnotations, getBeanProperties, getBeanProperties, getBeanProperty, getBeanProperty, getBinaryName, getCodeBlock, getComment, getComponentType, getConstructor, getConstructor, getConstructors, getDeclaringClass, getDerivedClasses, getDimensions, getEnumConstantByName, getEnumConstants, getFieldByName, getFields, getGenericValue, getImplements, getInitializers, getInterfaces, getJavaClassLibrary, getLineNumber, getMethod, getMethodBySignature, getMethodBySignature, getMethodBySignature, getMethods, getMethods, getMethodsBySignature, getMethodsBySignature, getModifiers, getNamedParameter, getNestedClassByName, getNestedClasses, getPackage, getPackageName, getParentSource, getResolvedFullyQualifiedName, getResolvedGenericFullyQualifiedName, getResolvedGenericValue, getResolvedValue, getSimpleName, getSource, getSuperClass, getSuperJavaClass, getTagByName, getTags, getTagsByName, getTagsByName, getTypeParameters, getValue, hashCode, isA, isA, isA, isAbstract, isAnnotation, isArray, isEnum, isFinal, isInner, isInterface, isPrimitive, isPrivate, isProtected, isPublic, isResolved, isStatic, isVoid, resolve, resolve, toGenericString, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetBinaryName, getValue, toGenericStringpublic DefaultJavaTypeVariable(java.lang.String name,
TypeResolver typeResolver)
public java.util.List<JavaType> getBounds()
getBounds in interface JavaTypeVariable<D extends JavaGenericDeclaration>public void setBounds(java.util.List<JavaType> bounds)
bounds - the bounds to setpublic D getGenericDeclaration()
getGenericDeclaration in interface JavaTypeVariable<D extends JavaGenericDeclaration>public java.lang.String getFullyQualifiedName()
DefaultJavaTypeEvery primitive type, named package, top level class, and top level interface has a fully qualified name:Some examples how names will be translatedEach member class, member interface, and array type may have a fully qualified name:
- The fully qualified name of a primitive type is the keyword for that primitive type, namely byte, short, char, int, long, float, double, or boolean.
- The fully qualified name of a named package that is not a subpackage of a named package is its simple name.
- The fully qualified name of a named package that is a subpackage of another named package consists of the fully qualified name of the containing package, followed by ".", followed by the simple (member) name of the subpackage.
- The fully qualified name of a top level class or top level interface that is declared in an unnamed package is the simple name of the class or interface.
- The fully qualified name of a top level class or top level interface that is declared in a named package consists of the fully qualified name of the package, followed by ".", followed by the simple name of the class or interface.
- A member class or member interface M of another class or interface C has a fully qualified name if and only if C has a fully qualified name.
- In that case, the fully qualified name of M consists of the fully qualified name of C, followed by ".", followed by the simple name of M.
- An array type has a fully qualified name if and only if its element type has a fully qualified name.
- In that case, the fully qualified name of an array type consists of the fully qualified name of the component type of the array type followed by "[]".
Object > java.lang.Object java.util.List > java.util.List ? > ? T > T anypackage.Outer.Inner > anypackage.Outer.Inner String[][] > java.lang.String[][]
getFullyQualifiedName in interface JavaTypegetFullyQualifiedName in class DefaultJavaTypenullJavaClass.getComponentType(),
JavaType.getBinaryName(),
https://docs.oracle.com/javase/specs/jls/se8/html/jls-6.html#jls-6.7public java.lang.String getGenericFullyQualifiedName()
DefaultJavaTypegetGenericFullyQualifiedName in interface JavaTypegetGenericFullyQualifiedName in class DefaultJavaTypepublic java.lang.String getCanonicalName()
DefaultJavaTypeClass.getCanonicalName().getCanonicalName in interface JavaTypegetCanonicalName in class DefaultJavaTypepublic java.lang.String getGenericCanonicalName()
DefaultJavaTypegetGenericCanonicalName in interface JavaTypegetGenericCanonicalName in class DefaultJavaTypepublic java.lang.String getGenericValue()
DefaultJavaTypeprivate String fieldA; // getValue() will return "String" private java.lang.String fieldA; // getValue() will return "java.lang.String" private List>String> aList; // getValue() will return "List>String>"
getGenericValue in interface JavaTypegetGenericValue in class DefaultJavaTypepublic java.lang.String getName()
DefaultJavaTypeClass.getName().getName in interface JavaClassgetName in interface JavaTypeVariable<D extends JavaGenericDeclaration>getName in class DefaultJavaTypeCopyright © 2002-2018. All Rights Reserved.