|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.tools.apt.mirror.declaration.DeclarationMaker
public class DeclarationMaker
Utilities for constructing and caching declarations.
Field Summary | |
---|---|
private Context |
context
|
private static Context.Key<DeclarationMaker> |
declarationMakerKey
|
private AptEnv |
env
|
private java.util.Map<Symbol.MethodSymbol,ExecutableDeclaration> |
executableDecls
|
private java.util.Map<Symbol.VarSymbol,FieldDeclaration> |
fieldDecls
|
private JavaCompiler |
javacompiler
|
private java.util.Map<Symbol.PackageSymbol,PackageDeclaration> |
packageDecls
|
private java.util.Map<Symbol.ClassSymbol,TypeDeclaration> |
typeDecls
|
Constructor Summary | |
---|---|
private |
DeclarationMaker(Context context)
|
Method Summary | |
---|---|
(package private) AnnotationMirror |
getAnnotationMirror(Attribute.Compound a,
Declaration decl)
Returns an annotation. |
(package private) ExecutableDeclaration |
getExecutableDeclaration(Symbol.MethodSymbol m)
Returns the method or constructor declaration for a method symbol. |
(package private) FieldDeclaration |
getFieldDeclaration(Symbol.VarSymbol v)
Returns the field declaration for a var symbol. |
PackageDeclaration |
getPackageDeclaration(java.lang.String name)
Returns the package declaration for the package with the given name. |
PackageDeclaration |
getPackageDeclaration(Symbol.PackageSymbol p)
Returns the package declaration for a package symbol. |
(package private) ParameterDeclaration |
getParameterDeclaration(Symbol.VarSymbol v)
Returns a parameter declaration. |
TypeDeclaration |
getTypeDeclaration(java.lang.String name)
Returns the type declaration for the type with the given canonical name. |
TypeDeclaration |
getTypeDeclaration(Symbol.ClassSymbol c)
Returns the type declaration for a class symbol. |
TypeParameterDeclaration |
getTypeParameterDeclaration(Symbol.TypeSymbol t)
Returns a type parameter declaration. |
private static boolean |
hasFlag(Symbol s,
long flag)
Does a symbol have a given flag? |
static DeclarationMaker |
instance(Context context)
|
private static boolean |
isAnnotationTypeElement(Symbol.MethodSymbol m)
Is a method an annotation type element? It is if it's declared in an annotation type. |
static boolean |
isJavaIdentifier(java.lang.String id)
Is a string a valid Java identifier? |
static boolean |
isJavaName(java.lang.String name)
|
private Symbol |
nameToSymbol(java.lang.String name,
boolean classCache)
Returns a symbol given the type's or packages's canonical name, or null if the name isn't found. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private AptEnv env
private Context context
private JavaCompiler javacompiler
private static final Context.Key<DeclarationMaker> declarationMakerKey
private java.util.Map<Symbol.PackageSymbol,PackageDeclaration> packageDecls
private java.util.Map<Symbol.ClassSymbol,TypeDeclaration> typeDecls
private java.util.Map<Symbol.MethodSymbol,ExecutableDeclaration> executableDecls
private java.util.Map<Symbol.VarSymbol,FieldDeclaration> fieldDecls
Constructor Detail |
---|
private DeclarationMaker(Context context)
Method Detail |
---|
public static DeclarationMaker instance(Context context)
public PackageDeclaration getPackageDeclaration(Symbol.PackageSymbol p)
public PackageDeclaration getPackageDeclaration(java.lang.String name)
public TypeDeclaration getTypeDeclaration(Symbol.ClassSymbol c)
public TypeDeclaration getTypeDeclaration(java.lang.String name)
private Symbol nameToSymbol(java.lang.String name, boolean classCache)
ExecutableDeclaration getExecutableDeclaration(Symbol.MethodSymbol m)
FieldDeclaration getFieldDeclaration(Symbol.VarSymbol v)
ParameterDeclaration getParameterDeclaration(Symbol.VarSymbol v)
public TypeParameterDeclaration getTypeParameterDeclaration(Symbol.TypeSymbol t)
AnnotationMirror getAnnotationMirror(Attribute.Compound a, Declaration decl)
public static boolean isJavaIdentifier(java.lang.String id)
public static boolean isJavaName(java.lang.String name)
private static boolean isAnnotationTypeElement(Symbol.MethodSymbol m)
private static boolean hasFlag(Symbol s, long flag)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |