com.sun.tools.jxc.model.nav
Class APTNavigator
java.lang.Object
com.sun.tools.jxc.model.nav.APTNavigator
- All Implemented Interfaces:
- Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
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
- Author:
- Kohsuke Kawaguchi (kk@kohsuke.org)
|
Constructor Summary |
APTNavigator(AnnotationProcessorEnvironment env)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
APTNavigator
public APTNavigator(AnnotationProcessorEnvironment env)
getSuperClass
public TypeDeclaration getSuperClass(TypeDeclaration t)
- Specified by:
getSuperClass in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
getBaseClass
public TypeMirror getBaseClass(TypeMirror type,
TypeDeclaration sup)
- Specified by:
getBaseClass in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
getClassName
public String getClassName(TypeDeclaration t)
- Specified by:
getClassName in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
getTypeName
public String getTypeName(TypeMirror typeMirror)
- Specified by:
getTypeName in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
getClassShortName
public String getClassShortName(TypeDeclaration t)
- Specified by:
getClassShortName in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
getDeclaredFields
public Collection<FieldDeclaration> getDeclaredFields(TypeDeclaration c)
- Specified by:
getDeclaredFields in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
getDeclaredField
public FieldDeclaration getDeclaredField(TypeDeclaration clazz,
String fieldName)
- Specified by:
getDeclaredField in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
getDeclaredMethods
public Collection<MethodDeclaration> getDeclaredMethods(TypeDeclaration c)
- Specified by:
getDeclaredMethods in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
getDeclaringClassForField
public ClassDeclaration getDeclaringClassForField(FieldDeclaration f)
- Specified by:
getDeclaringClassForField in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
getDeclaringClassForMethod
public ClassDeclaration getDeclaringClassForMethod(MethodDeclaration m)
- Specified by:
getDeclaringClassForMethod in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
getFieldType
public TypeMirror getFieldType(FieldDeclaration f)
- Specified by:
getFieldType in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
getFieldName
public String getFieldName(FieldDeclaration f)
- Specified by:
getFieldName in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
getMethodName
public String getMethodName(MethodDeclaration m)
- Specified by:
getMethodName in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
getReturnType
public TypeMirror getReturnType(MethodDeclaration m)
- Specified by:
getReturnType in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
getMethodParameters
public TypeMirror[] getMethodParameters(MethodDeclaration m)
- Specified by:
getMethodParameters in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
isStaticMethod
public boolean isStaticMethod(MethodDeclaration m)
- Specified by:
isStaticMethod in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
isFinalMethod
public boolean isFinalMethod(MethodDeclaration m)
- Specified by:
isFinalMethod in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
isSubClassOf
public boolean isSubClassOf(TypeMirror sub,
TypeMirror sup)
- Specified by:
isSubClassOf in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
ref
public TypeMirror ref(Class c)
- Specified by:
ref in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
use
public TypeMirror use(TypeDeclaration t)
- Specified by:
use in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
asDecl
public TypeDeclaration asDecl(TypeMirror m)
- Specified by:
asDecl in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
asDecl
public TypeDeclaration asDecl(Class c)
- Specified by:
asDecl in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
erasure
public <T> TypeMirror erasure(TypeMirror t)
- Specified by:
erasure in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
isAbstract
public boolean isAbstract(TypeDeclaration clazz)
- Specified by:
isAbstract in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
isFinal
public boolean isFinal(TypeDeclaration clazz)
- Specified by:
isFinal in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
getEnumConstants
public FieldDeclaration[] getEnumConstants(TypeDeclaration clazz)
- Specified by:
getEnumConstants in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
getVoidType
public TypeMirror getVoidType()
- Specified by:
getVoidType in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
getPackageName
public String getPackageName(TypeDeclaration clazz)
- Specified by:
getPackageName in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
findClass
public TypeDeclaration findClass(String className,
TypeDeclaration referencePoint)
- Specified by:
findClass in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
isBridgeMethod
public boolean isBridgeMethod(MethodDeclaration method)
- Specified by:
isBridgeMethod in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
isOverriding
public boolean isOverriding(MethodDeclaration method,
TypeDeclaration base)
- Specified by:
isOverriding in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
isInterface
public boolean isInterface(TypeDeclaration clazz)
- Specified by:
isInterface in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
isTransient
public boolean isTransient(FieldDeclaration f)
- Specified by:
isTransient in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
isInnerClass
public boolean isInnerClass(TypeDeclaration clazz)
- Specified by:
isInnerClass in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
isArray
public boolean isArray(TypeMirror t)
- Specified by:
isArray in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
isArrayButNotByteArray
public boolean isArrayButNotByteArray(TypeMirror t)
- Specified by:
isArrayButNotByteArray in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
getComponentType
public TypeMirror getComponentType(TypeMirror t)
- Specified by:
getComponentType in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
getTypeArgument
public TypeMirror getTypeArgument(TypeMirror typeMirror,
int i)
- Specified by:
getTypeArgument in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
isParameterizedType
public boolean isParameterizedType(TypeMirror t)
- Specified by:
isParameterizedType in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
isPrimitive
public boolean isPrimitive(TypeMirror t)
- Specified by:
isPrimitive in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
getPrimitive
public TypeMirror getPrimitive(Class primitiveType)
- Specified by:
getPrimitive in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
getClassLocation
public Location getClassLocation(TypeDeclaration decl)
- Specified by:
getClassLocation in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
getFieldLocation
public Location getFieldLocation(FieldDeclaration decl)
- Specified by:
getFieldLocation in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
getMethodLocation
public Location getMethodLocation(MethodDeclaration decl)
- Specified by:
getMethodLocation in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
hasDefaultConstructor
public boolean hasDefaultConstructor(TypeDeclaration t)
- Specified by:
hasDefaultConstructor in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
isStaticField
public boolean isStaticField(FieldDeclaration f)
- Specified by:
isStaticField in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
isPublicMethod
public boolean isPublicMethod(MethodDeclaration m)
- Specified by:
isPublicMethod in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
isPublicField
public boolean isPublicField(FieldDeclaration f)
- Specified by:
isPublicField in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
isEnum
public boolean isEnum(TypeDeclaration t)
- Specified by:
isEnum in interface Navigator<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>
Copyright © 2005-2011 Oracle Corporation. All Rights Reserved.