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

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

public final class NavigatorImpl
extends Object
implements Navigator<NType,NClass,Void,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.

Author:
Kohsuke Kawaguchi

Field Summary
static NavigatorImpl theInstance
           
 
Method Summary
 NClass asDecl(Class c)
           
 NClass asDecl(NType nt)
           
static NClass create(Class c)
           
static NType create(Type t)
           
static NType createParameterizedType(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)
           
 NType getBaseClass(NType nt, NClass base)
           
 Location getClassLocation(NClass c)
           
 String getClassName(NClass nClass)
           
 String getClassShortName(NClass nClass)
           
 NType getComponentType(NType nType)
           
 Void getDeclaredField(NClass clazz, String fieldName)
           
 Collection<? extends Void> getDeclaredFields(NClass nClass)
           
 Collection<? extends Void> getDeclaredMethods(NClass nClass)
           
 NClass getDeclaringClassForField(Void aVoid)
           
 NClass getDeclaringClassForMethod(Void aVoid)
           
 Void[] getEnumConstants(NClass clazz)
           
 Location getFieldLocation(Void v)
           
 String getFieldName(Void aVoid)
           
 NType getFieldType(Void aVoid)
           
 Location getMethodLocation(Void v)
           
 String getMethodName(Void aVoid)
           
 NType[] getMethodParameters(Void aVoid)
           
 String getPackageName(NClass clazz)
           
 NType getPrimitive(Class primitiveType)
           
 NType getReturnType(Void aVoid)
           
 NClass getSuperClass(NClass nClass)
           
 NType getTypeArgument(NType nt, int i)
           
 String getTypeName(NType type)
           
 NType getVoidType()
           
 boolean hasDefaultConstructor(NClass nClass)
           
 boolean isAbstract(NClass clazz)
           
 boolean isArray(NType nType)
           
 boolean isArrayButNotByteArray(NType t)
           
 boolean isBridgeMethod(Void method)
           
 boolean isEnum(NClass c)
           
 boolean isFinal(NClass clazz)
          Deprecated. no class generated by XJC is final.
 boolean isFinalMethod(Void aVoid)
           
 boolean isInnerClass(NClass clazz)
           
 boolean isInterface(NClass clazz)
           
 boolean isOverriding(Void method, NClass clazz)
           
 boolean isParameterizedType(NType nt)
           
 boolean isPrimitive(NType type)
           
 boolean isPublicField(Void aVoid)
           
 boolean isPublicMethod(Void aVoid)
           
 boolean isSameType(NType t1, NType t2)
           
 boolean isStaticField(Void aVoid)
           
 boolean isStaticMethod(Void aVoid)
           
 boolean isSubClassOf(NType sub, NType sup)
           
 boolean isTransient(Void f)
           
 NClass loadObjectFactory(NClass referencePoint, String pkg)
           
 NClass ref(Class c)
           
 NClass ref(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 Navigator<NType,NClass,Void,Void>

getBaseClass

public NType getBaseClass(NType nt,
                          NClass base)
Specified by:
getBaseClass in interface Navigator<NType,NClass,Void,Void>

getClassName

public String getClassName(NClass nClass)
Specified by:
getClassName in interface Navigator<NType,NClass,Void,Void>

getTypeName

public String getTypeName(NType type)
Specified by:
getTypeName in interface Navigator<NType,NClass,Void,Void>

getClassShortName

public String getClassShortName(NClass nClass)
Specified by:
getClassShortName in interface Navigator<NType,NClass,Void,Void>

getDeclaredFields

public Collection<? extends Void> getDeclaredFields(NClass nClass)
Specified by:
getDeclaredFields in interface Navigator<NType,NClass,Void,Void>

getDeclaredField

public Void getDeclaredField(NClass clazz,
                             String fieldName)
Specified by:
getDeclaredField in interface Navigator<NType,NClass,Void,Void>

getDeclaredMethods

public Collection<? extends Void> getDeclaredMethods(NClass nClass)
Specified by:
getDeclaredMethods in interface Navigator<NType,NClass,Void,Void>

getDeclaringClassForField

public NClass getDeclaringClassForField(Void aVoid)
Specified by:
getDeclaringClassForField in interface Navigator<NType,NClass,Void,Void>

getDeclaringClassForMethod

public NClass getDeclaringClassForMethod(Void aVoid)
Specified by:
getDeclaringClassForMethod in interface Navigator<NType,NClass,Void,Void>

getFieldType

public NType getFieldType(Void aVoid)
Specified by:
getFieldType in interface Navigator<NType,NClass,Void,Void>

getFieldName

public String getFieldName(Void aVoid)
Specified by:
getFieldName in interface Navigator<NType,NClass,Void,Void>

getMethodName

public String getMethodName(Void aVoid)
Specified by:
getMethodName in interface Navigator<NType,NClass,Void,Void>

getReturnType

public NType getReturnType(Void aVoid)
Specified by:
getReturnType in interface Navigator<NType,NClass,Void,Void>

getMethodParameters

public NType[] getMethodParameters(Void aVoid)
Specified by:
getMethodParameters in interface Navigator<NType,NClass,Void,Void>

isStaticMethod

public boolean isStaticMethod(Void aVoid)
Specified by:
isStaticMethod in interface Navigator<NType,NClass,Void,Void>

isFinalMethod

public boolean isFinalMethod(Void aVoid)
Specified by:
isFinalMethod in interface Navigator<NType,NClass,Void,Void>

isSubClassOf

public boolean isSubClassOf(NType sub,
                            NType sup)
Specified by:
isSubClassOf in interface Navigator<NType,NClass,Void,Void>

ref

public NClass ref(Class c)
Specified by:
ref in interface Navigator<NType,NClass,Void,Void>

ref

public NClass ref(JClass c)

use

public NType use(NClass nc)
Specified by:
use in interface Navigator<NType,NClass,Void,Void>

asDecl

public NClass asDecl(NType nt)
Specified by:
asDecl in interface Navigator<NType,NClass,Void,Void>

asDecl

public NClass asDecl(Class c)
Specified by:
asDecl in interface Navigator<NType,NClass,Void,Void>

isArray

public boolean isArray(NType nType)
Specified by:
isArray in interface Navigator<NType,NClass,Void,Void>

isArrayButNotByteArray

public boolean isArrayButNotByteArray(NType t)
Specified by:
isArrayButNotByteArray in interface Navigator<NType,NClass,Void,Void>

getComponentType

public NType getComponentType(NType nType)
Specified by:
getComponentType in interface Navigator<NType,NClass,Void,Void>

getTypeArgument

public NType getTypeArgument(NType nt,
                             int i)
Specified by:
getTypeArgument in interface Navigator<NType,NClass,Void,Void>

isParameterizedType

public boolean isParameterizedType(NType nt)
Specified by:
isParameterizedType in interface Navigator<NType,NClass,Void,Void>

isPrimitive

public boolean isPrimitive(NType type)
Specified by:
isPrimitive in interface Navigator<NType,NClass,Void,Void>

getPrimitive

public NType getPrimitive(Class primitiveType)
Specified by:
getPrimitive in interface Navigator<NType,NClass,Void,Void>

create

public static final NType create(Type t)

create

public static NClass create(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(Class rawType,
                                            NType... args)

getClassLocation

public Location getClassLocation(NClass c)
Specified by:
getClassLocation in interface Navigator<NType,NClass,Void,Void>

getFieldLocation

public Location getFieldLocation(Void v)
Specified by:
getFieldLocation in interface Navigator<NType,NClass,Void,Void>

getMethodLocation

public Location getMethodLocation(Void v)
Specified by:
getMethodLocation in interface Navigator<NType,NClass,Void,Void>

hasDefaultConstructor

public boolean hasDefaultConstructor(NClass nClass)
Specified by:
hasDefaultConstructor in interface Navigator<NType,NClass,Void,Void>

isStaticField

public boolean isStaticField(Void aVoid)
Specified by:
isStaticField in interface Navigator<NType,NClass,Void,Void>

isPublicMethod

public boolean isPublicMethod(Void aVoid)
Specified by:
isPublicMethod in interface Navigator<NType,NClass,Void,Void>

isPublicField

public boolean isPublicField(Void aVoid)
Specified by:
isPublicField in interface Navigator<NType,NClass,Void,Void>

isEnum

public boolean isEnum(NClass c)
Specified by:
isEnum in interface Navigator<NType,NClass,Void,Void>

erasure

public <T> NType erasure(NType type)
Specified by:
erasure in interface Navigator<NType,NClass,Void,Void>

isAbstract

public boolean isAbstract(NClass clazz)
Specified by:
isAbstract in interface Navigator<NType,NClass,Void,Void>

isFinal

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

Specified by:
isFinal in interface Navigator<NType,NClass,Void,Void>

getEnumConstants

public Void[] getEnumConstants(NClass clazz)
Specified by:
getEnumConstants in interface Navigator<NType,NClass,Void,Void>

getVoidType

public NType getVoidType()
Specified by:
getVoidType in interface Navigator<NType,NClass,Void,Void>

getPackageName

public String getPackageName(NClass clazz)
Specified by:
getPackageName in interface Navigator<NType,NClass,Void,Void>

loadObjectFactory

public NClass loadObjectFactory(NClass referencePoint,
                                String pkg)
Specified by:
loadObjectFactory in interface Navigator<NType,NClass,Void,Void>

isBridgeMethod

public boolean isBridgeMethod(Void method)
Specified by:
isBridgeMethod in interface Navigator<NType,NClass,Void,Void>

isOverriding

public boolean isOverriding(Void method,
                            NClass clazz)
Specified by:
isOverriding in interface Navigator<NType,NClass,Void,Void>

isInterface

public boolean isInterface(NClass clazz)
Specified by:
isInterface in interface Navigator<NType,NClass,Void,Void>

isTransient

public boolean isTransient(Void f)
Specified by:
isTransient in interface Navigator<NType,NClass,Void,Void>

isInnerClass

public boolean isInnerClass(NClass clazz)
Specified by:
isInnerClass in interface Navigator<NType,NClass,Void,Void>

isSameType

public boolean isSameType(NType t1,
                          NType t2)
Specified by:
isSameType in interface Navigator<NType,NClass,Void,Void>


Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.