Package com.sun.tools.xjc.model.nav
Class NavigatorImpl
java.lang.Object
com.sun.tools.xjc.model.nav.NavigatorImpl
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
Fields -
Method Summary
Modifier and TypeMethodDescriptionIf the given type is an use of class declaration, returns the type casted asC.Gets theCrepresentation for the given class.static NClassstatic NTypestatic NTypecreateParameterizedType(NClass rawType, NType... args) Creates aNTyperepresentation for a parameterized typeRawType<ParamType1,ParamType2,...>.static NTypecreateParameterizedType(Class rawType, NType... args) <T> NTypeComputes the erasuregetBaseClass(NType nt, NClass base) Gets the parameterization of the given base type.Returns a location of the specified class.getClassName(NClass nClass) Gets the fully-qualified name of the class.getClassShortName(NClass nClass) Gets the short name of the class ("Object" forObject.)getComponentType(NType nType) Gets the component type of the array.getDeclaredField(NClass clazz, String fieldName) Gets the named field declared on the given class.Collection<? extends Void>getDeclaredFields(NClass nClass) Gets all the declared fields of the given class.Collection<? extends Void>getDeclaredMethods(NClass nClass) Gets all the declared methods of the given class (regardless of their access modifiers, regardless of whether they override methods of the base classes.)getDeclaringClassForField(Void aVoid) Gets the class that declares the given field.getDeclaringClassForMethod(Void aVoid) Gets the class that declares the given method.Void[]getEnumConstants(NClass clazz) Gets the enumeration constants from an enum class.getFieldName(Void aVoid) Gets the name of the field.getFieldType(Void aVoid) Gets the type of the field.getMethodName(Void aVoid) Gets the name of the method, such as "toString" or "equals".NType[]getMethodParameters(Void aVoid) Returns the list of parameters to the method.getPackageName(NClass clazz) Gets the package name of the given class.getPrimitive(Class primitiveType) Returns the representation for the given primitive type.getReturnType(Void aVoid) Gets the return type of a method.getSuperClass(NClass nClass) Gets the base class of the specified class.getTypeArgument(NType nt, int i) Gets the i-th type argument from a parameterized type.getTypeName(NType type) Gets the display name of the type objectGets the representation of the primitive "void" type.booleanhasDefaultConstructor(NClass nClass) Returns true if the given class has a no-arg default constructor.booleanisAbstract(NClass clazz) Returns true if this is an abstract class.booleanChecks if the type is an array type.booleanChecks if the type is an array type but not byte[].booleanisBridgeMethod(Void method) Returns true if this method is a bridge method as defined in JLS.booleanReturns true if this is an enum class.booleanDeprecated.no class generated by XJC is final.booleanisFinalMethod(Void aVoid) Returns true if the method is final.booleanisInnerClass(NClass clazz) Returns true if the given class is an inner class.booleanisInterface(NClass clazz) Returns true if 'clazz' is an interface.booleanisOverriding(Void method, NClass clazz) Returns true if the given method is overriding another one defined in the base class 'base' or its ancestors.booleanReturns true if t is a parameterized type.booleanisPrimitive(NType type) Checks if the given type is a primitive type.booleanisPublicField(Void aVoid) Returns true if the field is public.booleanisPublicMethod(Void aVoid) Returns true if the method is public.booleanisSameType(NType t1, NType t2) Checks if types are the samebooleanisStaticField(Void aVoid) Returns true if the field is static.booleanisStaticMethod(Void aVoid) Returns true if the method is static.booleanisSubClassOf(NType sub, NType sup) Checks ifsubis a sub-type ofsup.booleanisTransient(Void f) Returns true if the field is transient.loadObjectFactory(NClass referencePoint, String pkg) Finds ObjectFactory for the given referencePoint.Gets the representation of the given Java type inT.Gets the T for the given C.
-
Field Details
-
theInstance
-
-
Method Details
-
getDeclaringClassForField
Description copied from interface:NavigatorGets the class that declares the given field. -
getDeclaringClassForMethod
Description copied from interface:NavigatorGets the class that declares the given method. -
getFieldType
Description copied from interface:NavigatorGets the type of the field. -
getFieldName
Description copied from interface:NavigatorGets the name of the field. -
getMethodName
Description copied from interface:NavigatorGets the name of the method, such as "toString" or "equals". -
getReturnType
Description copied from interface:NavigatorGets the return type of a method. -
getMethodParameters
Description copied from interface:NavigatorReturns the list of parameters to the method. -
isStaticMethod
Description copied from interface:NavigatorReturns true if the method is static. -
isFinalMethod
Description copied from interface:NavigatorReturns true if the method is final. -
ref
Description copied from interface:NavigatorGets the representation of the given Java type inT. -
ref
-
asDecl
Description copied from interface:NavigatorGets theCrepresentation for the given class. The behavior is undefined if the class object represents primitives, arrays, and other types that are not class declaration. -
getPrimitive
Description copied from interface:NavigatorReturns the representation for the given primitive type.- Specified by:
getPrimitivein interfaceNavigator<NType,NClass, Void, Void> - Parameters:
primitiveType- must be Class objects likeInteger.TYPE.
-
create
-
create
-
getFieldLocation
-
getMethodLocation
-
isStaticField
Description copied from interface:NavigatorReturns true if the field is static. -
isPublicMethod
Description copied from interface:NavigatorReturns true if the method is public. -
isPublicField
Description copied from interface:NavigatorReturns true if the field is public. -
getVoidType
Description copied from interface:NavigatorGets the representation of the primitive "void" type. -
isBridgeMethod
Description copied from interface:NavigatorReturns true if this method is a bridge method as defined in JLS. -
isTransient
Description copied from interface:NavigatorReturns true if the field is transient.