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 handledConstructor and Description |
---|
ApNavigator(ProcessingEnvironment env) |
public ApNavigator(ProcessingEnvironment env)
public TypeElement getSuperClass(TypeElement typeElement)
getSuperClass
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public TypeMirror getBaseClass(TypeMirror type, TypeElement sup)
getBaseClass
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public String getClassName(TypeElement t)
getClassName
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public String getTypeName(TypeMirror typeMirror)
getTypeName
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public String getClassShortName(TypeElement t)
getClassShortName
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public Collection<VariableElement> getDeclaredFields(TypeElement typeElement)
getDeclaredFields
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public VariableElement getDeclaredField(TypeElement clazz, String fieldName)
getDeclaredField
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public Collection<ExecutableElement> getDeclaredMethods(TypeElement typeElement)
getDeclaredMethods
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public TypeElement getDeclaringClassForField(VariableElement f)
getDeclaringClassForField
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public TypeElement getDeclaringClassForMethod(ExecutableElement m)
getDeclaringClassForMethod
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public TypeMirror getFieldType(VariableElement f)
getFieldType
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public String getFieldName(VariableElement f)
getFieldName
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public String getMethodName(ExecutableElement m)
getMethodName
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public TypeMirror getReturnType(ExecutableElement m)
getReturnType
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public TypeMirror[] getMethodParameters(ExecutableElement m)
getMethodParameters
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public boolean isStaticMethod(ExecutableElement m)
isStaticMethod
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public boolean isFinalMethod(ExecutableElement m)
isFinalMethod
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public boolean isSubClassOf(TypeMirror sub, TypeMirror sup)
isSubClassOf
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public TypeMirror ref(Class c)
ref
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public TypeMirror use(TypeElement t)
use
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public TypeElement asDecl(TypeMirror m)
asDecl
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public TypeElement asDecl(Class c)
asDecl
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public TypeMirror erasure(TypeMirror t)
erasure
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public boolean isAbstract(TypeElement clazz)
isAbstract
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public boolean isFinal(TypeElement clazz)
isFinal
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public VariableElement[] getEnumConstants(TypeElement clazz)
getEnumConstants
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public TypeMirror getVoidType()
getVoidType
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public String getPackageName(TypeElement clazz)
getPackageName
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public TypeElement loadObjectFactory(TypeElement referencePoint, String packageName)
loadObjectFactory
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public boolean isBridgeMethod(ExecutableElement method)
isBridgeMethod
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public boolean isOverriding(ExecutableElement method, TypeElement base)
isOverriding
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public boolean isInterface(TypeElement clazz)
isInterface
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public boolean isTransient(VariableElement f)
isTransient
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public boolean isInnerClass(TypeElement clazz)
isInnerClass
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public boolean isSameType(TypeMirror t1, TypeMirror t2)
isSameType
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public boolean isArray(TypeMirror type)
isArray
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public boolean isArrayButNotByteArray(TypeMirror t)
isArrayButNotByteArray
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public TypeMirror getComponentType(TypeMirror t)
getComponentType
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public TypeMirror getTypeArgument(TypeMirror typeMirror, int i)
getTypeArgument
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public boolean isParameterizedType(TypeMirror typeMirror)
isParameterizedType
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public boolean isPrimitive(TypeMirror t)
isPrimitive
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public TypeMirror getPrimitive(Class primitiveType)
getPrimitive
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public Location getClassLocation(TypeElement typeElement)
getClassLocation
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public Location getFieldLocation(VariableElement variableElement)
getFieldLocation
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public Location getMethodLocation(ExecutableElement executableElement)
getMethodLocation
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public boolean hasDefaultConstructor(TypeElement t)
hasDefaultConstructor
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public boolean isStaticField(VariableElement f)
isStaticField
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public boolean isPublicMethod(ExecutableElement m)
isPublicMethod
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public boolean isPublicField(VariableElement f)
isPublicField
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
public boolean isEnum(TypeElement t)
isEnum
in interface Navigator<TypeMirror,TypeElement,VariableElement,ExecutableElement>
Copyright © 2016 Oracle Corporation. All rights reserved.