com.sun.tools.xjc.model.nav
Class NavigatorImpl
java.lang.Object
com.sun.tools.xjc.model.nav.NavigatorImpl
public final class NavigatorImpl
- extends java.lang.Object
Navigator implementation for XJC.
Most of the Navigator methods are used for parsing the model, which doesn't happen
in XJC. So Most of the methods aren't really implemented. Implementations should
be filled in as needed.
|
Method Summary |
NClass |
asDecl(java.lang.Class c)
|
NClass |
asDecl(NType nt)
|
static NClass |
create(java.lang.Class c)
|
static NType |
create(java.lang.reflect.Type t)
|
static NType |
createParameterizedType(java.lang.Class rawType,
NType... args)
|
static NType |
createParameterizedType(NClass rawType,
NType... args)
Creates a NType representation for a parameterized type
RawType<ParamType1,ParamType2,...> . |
|
erasure(NType type)
|
NClass |
findClass(java.lang.String className,
NClass referencePoint)
|
NType |
getBaseClass(NType nt,
NClass base)
|
Location |
getClassLocation(NClass c)
|
java.lang.String |
getClassName(NClass nClass)
|
java.lang.String |
getClassShortName(NClass nClass)
|
NType |
getComponentType(NType nType)
|
java.lang.Void |
getDeclaredField(NClass clazz,
java.lang.String fieldName)
|
java.util.Collection<? extends java.lang.Void> |
getDeclaredFields(NClass nClass)
|
java.util.Collection<? extends java.lang.Void> |
getDeclaredMethods(NClass nClass)
|
NClass |
getDeclaringClassForField(java.lang.Void aVoid)
|
NClass |
getDeclaringClassForMethod(java.lang.Void aVoid)
|
java.lang.Void[] |
getEnumConstants(NClass clazz)
|
Location |
getFieldLocation(java.lang.Void _)
|
java.lang.String |
getFieldName(java.lang.Void aVoid)
|
NType |
getFieldType(java.lang.Void aVoid)
|
Location |
getMethodLocation(java.lang.Void _)
|
java.lang.String |
getMethodName(java.lang.Void aVoid)
|
NType[] |
getMethodParameters(java.lang.Void aVoid)
|
java.lang.String |
getPackageName(NClass clazz)
|
NType |
getPrimitive(java.lang.Class primitiveType)
|
NType |
getReturnType(java.lang.Void aVoid)
|
NClass |
getSuperClass(NClass nClass)
|
NType |
getTypeArgument(NType nt,
int i)
|
java.lang.String |
getTypeName(NType type)
|
NType |
getVoidType()
|
boolean |
hasDefaultConstructor(NClass nClass)
|
boolean |
isAbstract(NClass clazz)
|
boolean |
isArray(NType nType)
|
boolean |
isArrayButNotByteArray(NType t)
|
boolean |
isBridgeMethod(java.lang.Void method)
|
boolean |
isEnum(NClass c)
|
boolean |
isFinal(NClass clazz)
Deprecated. no class generated by XJC is final. |
boolean |
isFinalMethod(java.lang.Void aVoid)
|
boolean |
isInnerClass(NClass clazz)
|
boolean |
isInterface(NClass clazz)
|
boolean |
isOverriding(java.lang.Void method,
NClass clazz)
|
boolean |
isParameterizedType(NType nt)
|
boolean |
isPrimitive(NType type)
|
boolean |
isPublicField(java.lang.Void aVoid)
|
boolean |
isPublicMethod(java.lang.Void aVoid)
|
boolean |
isStaticField(java.lang.Void aVoid)
|
boolean |
isStaticMethod(java.lang.Void aVoid)
|
boolean |
isSubClassOf(NType sub,
NType sup)
|
boolean |
isTransient(java.lang.Void f)
|
NClass |
ref(java.lang.Class c)
|
NClass |
ref(com.sun.codemodel.JClass c)
|
NType |
use(NClass nc)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
theInstance
public static final NavigatorImpl theInstance
getSuperClass
public NClass getSuperClass(NClass nClass)
getBaseClass
public NType getBaseClass(NType nt,
NClass base)
getClassName
public java.lang.String getClassName(NClass nClass)
getTypeName
public java.lang.String getTypeName(NType type)
getClassShortName
public java.lang.String getClassShortName(NClass nClass)
getDeclaredFields
public java.util.Collection<? extends java.lang.Void> getDeclaredFields(NClass nClass)
getDeclaredField
public java.lang.Void getDeclaredField(NClass clazz,
java.lang.String fieldName)
getDeclaredMethods
public java.util.Collection<? extends java.lang.Void> getDeclaredMethods(NClass nClass)
getDeclaringClassForField
public NClass getDeclaringClassForField(java.lang.Void aVoid)
getDeclaringClassForMethod
public NClass getDeclaringClassForMethod(java.lang.Void aVoid)
getFieldType
public NType getFieldType(java.lang.Void aVoid)
getFieldName
public java.lang.String getFieldName(java.lang.Void aVoid)
getMethodName
public java.lang.String getMethodName(java.lang.Void aVoid)
getReturnType
public NType getReturnType(java.lang.Void aVoid)
getMethodParameters
public NType[] getMethodParameters(java.lang.Void aVoid)
isStaticMethod
public boolean isStaticMethod(java.lang.Void aVoid)
isFinalMethod
public boolean isFinalMethod(java.lang.Void aVoid)
isSubClassOf
public boolean isSubClassOf(NType sub,
NType sup)
ref
public NClass ref(java.lang.Class c)
ref
public NClass ref(com.sun.codemodel.JClass c)
use
public NType use(NClass nc)
asDecl
public NClass asDecl(NType nt)
asDecl
public NClass asDecl(java.lang.Class c)
isArray
public boolean isArray(NType nType)
isArrayButNotByteArray
public boolean isArrayButNotByteArray(NType t)
getComponentType
public NType getComponentType(NType nType)
getTypeArgument
public NType getTypeArgument(NType nt,
int i)
isParameterizedType
public boolean isParameterizedType(NType nt)
isPrimitive
public boolean isPrimitive(NType type)
getPrimitive
public NType getPrimitive(java.lang.Class primitiveType)
create
public static final NType create(java.lang.reflect.Type t)
create
public static NClass create(java.lang.Class c)
createParameterizedType
public static NType createParameterizedType(NClass rawType,
NType... args)
- Creates a
NType representation for a parameterized type
RawType<ParamType1,ParamType2,...> .
createParameterizedType
public static NType createParameterizedType(java.lang.Class rawType,
NType... args)
getClassLocation
public Location getClassLocation(NClass c)
getFieldLocation
public Location getFieldLocation(java.lang.Void _)
getMethodLocation
public Location getMethodLocation(java.lang.Void _)
hasDefaultConstructor
public boolean hasDefaultConstructor(NClass nClass)
isStaticField
public boolean isStaticField(java.lang.Void aVoid)
isPublicMethod
public boolean isPublicMethod(java.lang.Void aVoid)
isPublicField
public boolean isPublicField(java.lang.Void aVoid)
isEnum
public boolean isEnum(NClass c)
erasure
public <T> NType erasure(NType type)
isAbstract
public boolean isAbstract(NClass clazz)
isFinal
public boolean isFinal(NClass clazz)
- Deprecated. no class generated by XJC is final.
getEnumConstants
public java.lang.Void[] getEnumConstants(NClass clazz)
getVoidType
public NType getVoidType()
getPackageName
public java.lang.String getPackageName(NClass clazz)
findClass
public NClass findClass(java.lang.String className,
NClass referencePoint)
isBridgeMethod
public boolean isBridgeMethod(java.lang.Void method)
isOverriding
public boolean isOverriding(java.lang.Void method,
NClass clazz)
isInterface
public boolean isInterface(NClass clazz)
isTransient
public boolean isTransient(java.lang.Void f)
isInnerClass
public boolean isInnerClass(NClass clazz)