com.sun.tools.xjc.model.nav
Class NavigatorImpl

java.lang.Object
  extended by com.sun.tools.xjc.model.nav.NavigatorImpl
All Implemented Interfaces:
com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

public final class NavigatorImpl
extends java.lang.Object
implements com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

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.


Field Summary
static NavigatorImpl theInstance
           
 
Fields inherited from interface com.sun.xml.bind.v2.model.nav.Navigator
REFLECTION
 
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&lt;ParamType1,ParamType2,...> .
<T> NType
erasure(NType type)
           
 NClass findClass(java.lang.String className, NClass referencePoint)
           
 NType getBaseClass(NType nt, NClass base)
           
 com.sun.xml.bind.v2.runtime.Location getClassLocation(NClass c)
           
 java.lang.String getClassName(NClass nClass)
           
 java.lang.String getClassShortName(NClass nClass)
           
 NType getComponentType(NType nType)
           
 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)
           
 com.sun.xml.bind.v2.runtime.Location getFieldLocation(java.lang.Void _)
           
 java.lang.String getFieldName(java.lang.Void aVoid)
           
 NType getFieldType(java.lang.Void aVoid)
           
 com.sun.xml.bind.v2.runtime.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 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)
           
 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
 

Field Detail

theInstance

public static final NavigatorImpl theInstance
Method Detail

getSuperClass

public NClass getSuperClass(NClass nClass)
Specified by:
getSuperClass in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

getBaseClass

public NType getBaseClass(NType nt,
                          NClass base)
Specified by:
getBaseClass in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

getClassName

public java.lang.String getClassName(NClass nClass)
Specified by:
getClassName in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

getTypeName

public java.lang.String getTypeName(NType type)
Specified by:
getTypeName in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

getClassShortName

public java.lang.String getClassShortName(NClass nClass)
Specified by:
getClassShortName in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

getDeclaredFields

public java.util.Collection<? extends java.lang.Void> getDeclaredFields(NClass nClass)
Specified by:
getDeclaredFields in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

getDeclaredMethods

public java.util.Collection<? extends java.lang.Void> getDeclaredMethods(NClass nClass)
Specified by:
getDeclaredMethods in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

getDeclaringClassForField

public NClass getDeclaringClassForField(java.lang.Void aVoid)
Specified by:
getDeclaringClassForField in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

getDeclaringClassForMethod

public NClass getDeclaringClassForMethod(java.lang.Void aVoid)
Specified by:
getDeclaringClassForMethod in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

getFieldType

public NType getFieldType(java.lang.Void aVoid)
Specified by:
getFieldType in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

getFieldName

public java.lang.String getFieldName(java.lang.Void aVoid)
Specified by:
getFieldName in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

getMethodName

public java.lang.String getMethodName(java.lang.Void aVoid)
Specified by:
getMethodName in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

getReturnType

public NType getReturnType(java.lang.Void aVoid)
Specified by:
getReturnType in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

getMethodParameters

public NType[] getMethodParameters(java.lang.Void aVoid)
Specified by:
getMethodParameters in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

isStaticMethod

public boolean isStaticMethod(java.lang.Void aVoid)
Specified by:
isStaticMethod in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

isSubClassOf

public boolean isSubClassOf(NType sub,
                            NType sup)
Specified by:
isSubClassOf in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

ref

public NClass ref(java.lang.Class c)
Specified by:
ref in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

ref

public NClass ref(com.sun.codemodel.JClass c)

use

public NType use(NClass nc)
Specified by:
use in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

asDecl

public NClass asDecl(NType nt)
Specified by:
asDecl in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

asDecl

public NClass asDecl(java.lang.Class c)
Specified by:
asDecl in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

isArray

public boolean isArray(NType nType)
Specified by:
isArray in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

isArrayButNotByteArray

public boolean isArrayButNotByteArray(NType t)
Specified by:
isArrayButNotByteArray in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

getComponentType

public NType getComponentType(NType nType)
Specified by:
getComponentType in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

getTypeArgument

public NType getTypeArgument(NType nt,
                             int i)
Specified by:
getTypeArgument in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

isParameterizedType

public boolean isParameterizedType(NType nt)
Specified by:
isParameterizedType in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

isPrimitive

public boolean isPrimitive(NType type)
Specified by:
isPrimitive in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

getPrimitive

public NType getPrimitive(java.lang.Class primitiveType)
Specified by:
getPrimitive in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

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&lt;ParamType1,ParamType2,...> .


createParameterizedType

public static NType createParameterizedType(java.lang.Class rawType,
                                            NType... args)

getClassLocation

public com.sun.xml.bind.v2.runtime.Location getClassLocation(NClass c)
Specified by:
getClassLocation in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

getFieldLocation

public com.sun.xml.bind.v2.runtime.Location getFieldLocation(java.lang.Void _)
Specified by:
getFieldLocation in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

getMethodLocation

public com.sun.xml.bind.v2.runtime.Location getMethodLocation(java.lang.Void _)
Specified by:
getMethodLocation in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

hasDefaultConstructor

public boolean hasDefaultConstructor(NClass nClass)
Specified by:
hasDefaultConstructor in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

isStaticField

public boolean isStaticField(java.lang.Void aVoid)
Specified by:
isStaticField in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

isPublicMethod

public boolean isPublicMethod(java.lang.Void aVoid)
Specified by:
isPublicMethod in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

isPublicField

public boolean isPublicField(java.lang.Void aVoid)
Specified by:
isPublicField in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

isEnum

public boolean isEnum(NClass c)
Specified by:
isEnum in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

erasure

public <T> NType erasure(NType type)
Specified by:
erasure in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

isAbstract

public boolean isAbstract(NClass clazz)
Specified by:
isAbstract in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

isFinal

public boolean isFinal(NClass clazz)
Deprecated. no class generated by XJC is final.

Specified by:
isFinal in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

getEnumConstants

public java.lang.Void[] getEnumConstants(NClass clazz)
Specified by:
getEnumConstants in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

getVoidType

public NType getVoidType()
Specified by:
getVoidType in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

getPackageName

public java.lang.String getPackageName(NClass clazz)
Specified by:
getPackageName in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

findClass

public NClass findClass(java.lang.String className,
                        NClass referencePoint)
Specified by:
findClass in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>

isBridgeMethod

public boolean isBridgeMethod(java.lang.Void method)
Specified by:
isBridgeMethod in interface com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,java.lang.Void,java.lang.Void>