com.sun.tools.jxc.model.nav

Class APTNavigator

public class APTNavigator extends Object implements Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>

Navigator implementation for APT. TODO: check the spec on how generics are supposed to be handled
Constructor Summary
APTNavigator(AnnotationProcessorEnvironment env)
Method Summary
TypeDeclarationasDecl(TypeMirror m)
TypeDeclarationasDecl(Class c)
<T> TypeMirrorerasure(TypeMirror t)
TypeDeclarationfindClass(String className, TypeDeclaration referencePoint)
TypeMirrorgetBaseClass(TypeMirror type, TypeDeclaration sup)
LocationgetClassLocation(TypeDeclaration decl)
StringgetClassName(TypeDeclaration t)
StringgetClassShortName(TypeDeclaration t)
TypeMirrorgetComponentType(TypeMirror t)
FieldDeclarationgetDeclaredField(TypeDeclaration clazz, String fieldName)
Collection<FieldDeclaration>getDeclaredFields(TypeDeclaration c)
Collection<MethodDeclaration>getDeclaredMethods(TypeDeclaration c)
ClassDeclarationgetDeclaringClassForField(FieldDeclaration f)
ClassDeclarationgetDeclaringClassForMethod(MethodDeclaration m)
FieldDeclaration[]getEnumConstants(TypeDeclaration clazz)
LocationgetFieldLocation(FieldDeclaration decl)
StringgetFieldName(FieldDeclaration f)
TypeMirrorgetFieldType(FieldDeclaration f)
LocationgetMethodLocation(MethodDeclaration decl)
StringgetMethodName(MethodDeclaration m)
TypeMirror[]getMethodParameters(MethodDeclaration m)
StringgetPackageName(TypeDeclaration clazz)
TypeMirrorgetPrimitive(Class primitiveType)
TypeMirrorgetReturnType(MethodDeclaration m)
TypeDeclarationgetSuperClass(TypeDeclaration t)
TypeMirrorgetTypeArgument(TypeMirror typeMirror, int i)
StringgetTypeName(TypeMirror typeMirror)
TypeMirrorgetVoidType()
booleanhasDefaultConstructor(TypeDeclaration t)
booleanisAbstract(TypeDeclaration clazz)
booleanisArray(TypeMirror t)
booleanisArrayButNotByteArray(TypeMirror t)
booleanisBridgeMethod(MethodDeclaration method)
booleanisEnum(TypeDeclaration t)
booleanisFinal(TypeDeclaration clazz)
booleanisFinalMethod(MethodDeclaration m)
booleanisInnerClass(TypeDeclaration clazz)
booleanisInterface(TypeDeclaration clazz)
booleanisOverriding(MethodDeclaration method, TypeDeclaration base)
booleanisParameterizedType(TypeMirror t)
booleanisPrimitive(TypeMirror t)
booleanisPublicField(FieldDeclaration f)
booleanisPublicMethod(MethodDeclaration m)
booleanisStaticField(FieldDeclaration f)
booleanisStaticMethod(MethodDeclaration m)
booleanisSubClassOf(TypeMirror sub, TypeMirror sup)
booleanisTransient(FieldDeclaration f)
TypeMirrorref(Class c)
TypeMirroruse(TypeDeclaration t)

Constructor Detail

APTNavigator

public APTNavigator(AnnotationProcessorEnvironment env)

Method Detail

asDecl

public TypeDeclaration asDecl(TypeMirror m)

asDecl

public TypeDeclaration asDecl(Class c)

erasure

public <T> TypeMirror erasure(TypeMirror t)

findClass

public TypeDeclaration findClass(String className, TypeDeclaration referencePoint)

getBaseClass

public TypeMirror getBaseClass(TypeMirror type, TypeDeclaration sup)

getClassLocation

public Location getClassLocation(TypeDeclaration decl)

getClassName

public String getClassName(TypeDeclaration t)

getClassShortName

public String getClassShortName(TypeDeclaration t)

getComponentType

public TypeMirror getComponentType(TypeMirror t)

getDeclaredField

public FieldDeclaration getDeclaredField(TypeDeclaration clazz, String fieldName)

getDeclaredFields

public Collection<FieldDeclaration> getDeclaredFields(TypeDeclaration c)

getDeclaredMethods

public Collection<MethodDeclaration> getDeclaredMethods(TypeDeclaration c)

getDeclaringClassForField

public ClassDeclaration getDeclaringClassForField(FieldDeclaration f)

getDeclaringClassForMethod

public ClassDeclaration getDeclaringClassForMethod(MethodDeclaration m)

getEnumConstants

public FieldDeclaration[] getEnumConstants(TypeDeclaration clazz)

getFieldLocation

public Location getFieldLocation(FieldDeclaration decl)

getFieldName

public String getFieldName(FieldDeclaration f)

getFieldType

public TypeMirror getFieldType(FieldDeclaration f)

getMethodLocation

public Location getMethodLocation(MethodDeclaration decl)

getMethodName

public String getMethodName(MethodDeclaration m)

getMethodParameters

public TypeMirror[] getMethodParameters(MethodDeclaration m)

getPackageName

public String getPackageName(TypeDeclaration clazz)

getPrimitive

public TypeMirror getPrimitive(Class primitiveType)

getReturnType

public TypeMirror getReturnType(MethodDeclaration m)

getSuperClass

public TypeDeclaration getSuperClass(TypeDeclaration t)

getTypeArgument

public TypeMirror getTypeArgument(TypeMirror typeMirror, int i)

getTypeName

public String getTypeName(TypeMirror typeMirror)

getVoidType

public TypeMirror getVoidType()

hasDefaultConstructor

public boolean hasDefaultConstructor(TypeDeclaration t)

isAbstract

public boolean isAbstract(TypeDeclaration clazz)

isArray

public boolean isArray(TypeMirror t)

isArrayButNotByteArray

public boolean isArrayButNotByteArray(TypeMirror t)

isBridgeMethod

public boolean isBridgeMethod(MethodDeclaration method)

isEnum

public boolean isEnum(TypeDeclaration t)

isFinal

public boolean isFinal(TypeDeclaration clazz)

isFinalMethod

public boolean isFinalMethod(MethodDeclaration m)

isInnerClass

public boolean isInnerClass(TypeDeclaration clazz)

isInterface

public boolean isInterface(TypeDeclaration clazz)

isOverriding

public boolean isOverriding(MethodDeclaration method, TypeDeclaration base)

isParameterizedType

public boolean isParameterizedType(TypeMirror t)

isPrimitive

public boolean isPrimitive(TypeMirror t)

isPublicField

public boolean isPublicField(FieldDeclaration f)

isPublicMethod

public boolean isPublicMethod(MethodDeclaration m)

isStaticField

public boolean isStaticField(FieldDeclaration f)

isStaticMethod

public boolean isStaticMethod(MethodDeclaration m)

isSubClassOf

public boolean isSubClassOf(TypeMirror sub, TypeMirror sup)

isTransient

public boolean isTransient(FieldDeclaration f)

ref

public TypeMirror ref(Class c)

use

public TypeMirror use(TypeDeclaration t)