com.sun.tools.jxc.model.nav
Class ApNavigator
java.lang.Object
com.sun.tools.jxc.model.nav.ApNavigator
- All Implemented Interfaces:
- Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public final class ApNavigator
- extends Object
- implements Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
Navigator implementation for annotation processing.
TODO: check the spec on how generics are supposed to be handled
- Author:
- Kohsuke Kawaguchi (kk@kohsuke.org)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ApNavigator
public ApNavigator(ProcessingEnvironment env)
getSuperClass
public TypeElement getSuperClass(TypeElement typeElement)
- Specified by:
getSuperClass in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
getBaseClass
public TypeMirror getBaseClass(TypeMirror type,
TypeElement sup)
- Specified by:
getBaseClass in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
getClassName
public String getClassName(TypeElement t)
- Specified by:
getClassName in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
getTypeName
public String getTypeName(TypeMirror typeMirror)
- Specified by:
getTypeName in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
getClassShortName
public String getClassShortName(TypeElement t)
- Specified by:
getClassShortName in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
getDeclaredFields
public Collection<VariableElement> getDeclaredFields(TypeElement typeElement)
- Specified by:
getDeclaredFields in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
getDeclaredField
public VariableElement getDeclaredField(TypeElement clazz,
String fieldName)
- Specified by:
getDeclaredField in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
getDeclaredMethods
public Collection<ExecutableElement> getDeclaredMethods(TypeElement typeElement)
- Specified by:
getDeclaredMethods in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
getDeclaringClassForField
public TypeElement getDeclaringClassForField(VariableElement f)
- Specified by:
getDeclaringClassForField in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
getDeclaringClassForMethod
public TypeElement getDeclaringClassForMethod(ExecutableElement m)
- Specified by:
getDeclaringClassForMethod in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
getFieldType
public TypeMirror getFieldType(VariableElement f)
- Specified by:
getFieldType in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
getFieldName
public String getFieldName(VariableElement f)
- Specified by:
getFieldName in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
getMethodName
public String getMethodName(ExecutableElement m)
- Specified by:
getMethodName in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
getReturnType
public TypeMirror getReturnType(ExecutableElement m)
- Specified by:
getReturnType in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
getMethodParameters
public TypeMirror[] getMethodParameters(ExecutableElement m)
- Specified by:
getMethodParameters in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
isStaticMethod
public boolean isStaticMethod(ExecutableElement m)
- Specified by:
isStaticMethod in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
isFinalMethod
public boolean isFinalMethod(ExecutableElement m)
- Specified by:
isFinalMethod in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
isSubClassOf
public boolean isSubClassOf(TypeMirror sub,
TypeMirror sup)
- Specified by:
isSubClassOf in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
ref
public TypeMirror ref(Class c)
- Specified by:
ref in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
use
public TypeMirror use(TypeElement t)
- Specified by:
use in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
asDecl
public TypeElement asDecl(TypeMirror m)
- Specified by:
asDecl in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
asDecl
public TypeElement asDecl(Class c)
- Specified by:
asDecl in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
erasure
public TypeMirror erasure(TypeMirror t)
- Specified by:
erasure in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
isAbstract
public boolean isAbstract(TypeElement clazz)
- Specified by:
isAbstract in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
isFinal
public boolean isFinal(TypeElement clazz)
- Specified by:
isFinal in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
getEnumConstants
public VariableElement[] getEnumConstants(TypeElement clazz)
- Specified by:
getEnumConstants in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
getVoidType
public TypeMirror getVoidType()
- Specified by:
getVoidType in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
getPackageName
public String getPackageName(TypeElement clazz)
- Specified by:
getPackageName in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
loadObjectFactory
public TypeElement loadObjectFactory(TypeElement referencePoint,
String packageName)
- Specified by:
loadObjectFactory in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
isBridgeMethod
public boolean isBridgeMethod(ExecutableElement method)
- Specified by:
isBridgeMethod in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
isOverriding
public boolean isOverriding(ExecutableElement method,
TypeElement base)
- Specified by:
isOverriding in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
isInterface
public boolean isInterface(TypeElement clazz)
- Specified by:
isInterface in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
isTransient
public boolean isTransient(VariableElement f)
- Specified by:
isTransient in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
isInnerClass
public boolean isInnerClass(TypeElement clazz)
- Specified by:
isInnerClass in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
isSameType
public boolean isSameType(TypeMirror t1,
TypeMirror t2)
- Specified by:
isSameType in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
isArray
public boolean isArray(TypeMirror type)
- Specified by:
isArray in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
isArrayButNotByteArray
public boolean isArrayButNotByteArray(TypeMirror t)
- Specified by:
isArrayButNotByteArray in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
getComponentType
public TypeMirror getComponentType(TypeMirror t)
- Specified by:
getComponentType in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
getTypeArgument
public TypeMirror getTypeArgument(TypeMirror typeMirror,
int i)
- Specified by:
getTypeArgument in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
isParameterizedType
public boolean isParameterizedType(TypeMirror typeMirror)
- Specified by:
isParameterizedType in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
isPrimitive
public boolean isPrimitive(TypeMirror t)
- Specified by:
isPrimitive in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
getPrimitive
public TypeMirror getPrimitive(Class primitiveType)
- Specified by:
getPrimitive in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
getClassLocation
public Location getClassLocation(TypeElement typeElement)
- Specified by:
getClassLocation in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
getFieldLocation
public Location getFieldLocation(VariableElement variableElement)
- Specified by:
getFieldLocation in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
getMethodLocation
public Location getMethodLocation(ExecutableElement executableElement)
- Specified by:
getMethodLocation in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
hasDefaultConstructor
public boolean hasDefaultConstructor(TypeElement t)
- Specified by:
hasDefaultConstructor in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
isStaticField
public boolean isStaticField(VariableElement f)
- Specified by:
isStaticField in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
isPublicMethod
public boolean isPublicMethod(ExecutableElement m)
- Specified by:
isPublicMethod in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
isPublicField
public boolean isPublicField(VariableElement f)
- Specified by:
isPublicField in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
isEnum
public boolean isEnum(TypeElement t)
- Specified by:
isEnum in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.