Package com.sun.tools.jxc.model.nav
Class ApNavigator
- java.lang.Object
-
- com.sun.tools.jxc.model.nav.ApNavigator
-
- All Implemented Interfaces:
com.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public final class ApNavigator extends Object implements com.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
Navigatorimplementation for annotation processing. TODO: check the spec on how generics are supposed to be handled- Author:
- Kohsuke Kawaguchi (kk@kohsuke.org)
-
-
Constructor Summary
Constructors Constructor Description ApNavigator(ProcessingEnvironment env)
-
Method Summary
-
-
-
Constructor Detail
-
ApNavigator
public ApNavigator(ProcessingEnvironment env)
-
-
Method Detail
-
getSuperClass
public TypeElement getSuperClass(TypeElement typeElement)
- Specified by:
getSuperClassin interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
getBaseClass
public TypeMirror getBaseClass(TypeMirror type, TypeElement sup)
- Specified by:
getBaseClassin interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
getClassName
public String getClassName(TypeElement t)
- Specified by:
getClassNamein interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
getTypeName
public String getTypeName(TypeMirror typeMirror)
- Specified by:
getTypeNamein interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
getClassShortName
public String getClassShortName(TypeElement t)
- Specified by:
getClassShortNamein interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
getDeclaredFields
public Collection<VariableElement> getDeclaredFields(TypeElement typeElement)
- Specified by:
getDeclaredFieldsin interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
getDeclaredField
public VariableElement getDeclaredField(TypeElement clazz, String fieldName)
- Specified by:
getDeclaredFieldin interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
getDeclaredMethods
public Collection<ExecutableElement> getDeclaredMethods(TypeElement typeElement)
- Specified by:
getDeclaredMethodsin interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
getDeclaringClassForField
public TypeElement getDeclaringClassForField(VariableElement f)
- Specified by:
getDeclaringClassForFieldin interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
getDeclaringClassForMethod
public TypeElement getDeclaringClassForMethod(ExecutableElement m)
- Specified by:
getDeclaringClassForMethodin interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
getFieldType
public TypeMirror getFieldType(VariableElement f)
- Specified by:
getFieldTypein interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
getFieldName
public String getFieldName(VariableElement f)
- Specified by:
getFieldNamein interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
getMethodName
public String getMethodName(ExecutableElement m)
- Specified by:
getMethodNamein interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
getReturnType
public TypeMirror getReturnType(ExecutableElement m)
- Specified by:
getReturnTypein interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
getMethodParameters
public TypeMirror[] getMethodParameters(ExecutableElement m)
- Specified by:
getMethodParametersin interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
isStaticMethod
public boolean isStaticMethod(ExecutableElement m)
- Specified by:
isStaticMethodin interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
isFinalMethod
public boolean isFinalMethod(ExecutableElement m)
- Specified by:
isFinalMethodin interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
isSubClassOf
public boolean isSubClassOf(TypeMirror sub, TypeMirror sup)
- Specified by:
isSubClassOfin interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
ref
public TypeMirror ref(Class c)
- Specified by:
refin interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
use
public TypeMirror use(TypeElement t)
- Specified by:
usein interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
asDecl
public TypeElement asDecl(TypeMirror m)
- Specified by:
asDeclin interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
asDecl
public TypeElement asDecl(Class c)
- Specified by:
asDeclin interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
erasure
public TypeMirror erasure(TypeMirror t)
- Specified by:
erasurein interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
isAbstract
public boolean isAbstract(TypeElement clazz)
- Specified by:
isAbstractin interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
isFinal
public boolean isFinal(TypeElement clazz)
- Specified by:
isFinalin interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
getEnumConstants
public VariableElement[] getEnumConstants(TypeElement clazz)
- Specified by:
getEnumConstantsin interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
getVoidType
public TypeMirror getVoidType()
- Specified by:
getVoidTypein interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
getPackageName
public String getPackageName(TypeElement clazz)
- Specified by:
getPackageNamein interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
loadObjectFactory
public TypeElement loadObjectFactory(TypeElement referencePoint, String packageName)
- Specified by:
loadObjectFactoryin interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
isBridgeMethod
public boolean isBridgeMethod(ExecutableElement method)
- Specified by:
isBridgeMethodin interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
isOverriding
public boolean isOverriding(ExecutableElement method, TypeElement base)
- Specified by:
isOverridingin interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
isInterface
public boolean isInterface(TypeElement clazz)
- Specified by:
isInterfacein interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
isTransient
public boolean isTransient(VariableElement f)
- Specified by:
isTransientin interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
isInnerClass
public boolean isInnerClass(TypeElement clazz)
- Specified by:
isInnerClassin interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
isSameType
public boolean isSameType(TypeMirror t1, TypeMirror t2)
- Specified by:
isSameTypein interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
isArray
public boolean isArray(TypeMirror type)
- Specified by:
isArrayin interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
isArrayButNotByteArray
public boolean isArrayButNotByteArray(TypeMirror t)
- Specified by:
isArrayButNotByteArrayin interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
getComponentType
public TypeMirror getComponentType(TypeMirror t)
- Specified by:
getComponentTypein interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
getTypeArgument
public TypeMirror getTypeArgument(TypeMirror typeMirror, int i)
- Specified by:
getTypeArgumentin interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
isParameterizedType
public boolean isParameterizedType(TypeMirror typeMirror)
- Specified by:
isParameterizedTypein interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
isPrimitive
public boolean isPrimitive(TypeMirror t)
- Specified by:
isPrimitivein interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
getPrimitive
public TypeMirror getPrimitive(Class primitiveType)
- Specified by:
getPrimitivein interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
getClassLocation
public com.sun.xml.bind.v2.runtime.Location getClassLocation(TypeElement typeElement)
- Specified by:
getClassLocationin interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
getFieldLocation
public com.sun.xml.bind.v2.runtime.Location getFieldLocation(VariableElement variableElement)
- Specified by:
getFieldLocationin interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
getMethodLocation
public com.sun.xml.bind.v2.runtime.Location getMethodLocation(ExecutableElement executableElement)
- Specified by:
getMethodLocationin interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
hasDefaultConstructor
public boolean hasDefaultConstructor(TypeElement t)
- Specified by:
hasDefaultConstructorin interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
isStaticField
public boolean isStaticField(VariableElement f)
- Specified by:
isStaticFieldin interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
isPublicMethod
public boolean isPublicMethod(ExecutableElement m)
- Specified by:
isPublicMethodin interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
isPublicField
public boolean isPublicField(VariableElement f)
- Specified by:
isPublicFieldin interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
isEnum
public boolean isEnum(TypeElement t)
- Specified by:
isEnumin interfacecom.sun.xml.bind.v2.model.nav.Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
-
-