| java.lang.Object com.sun.tools.javac.tree.JCTree com.sun.tools.javac.comp.MemberEnter
MemberEnter | public class MemberEnter extends JCTree.Visitor implements Completer(Code) | | This is the second phase of Enter, in which classes are completed
by entering their members into the class scope using
MemberEnter.complete(). See Enter for an overview.
This is NOT part of any API supported by Sun Microsystems. If
you write code that depends on this, you do so at your own risk.
This code and its internal interfaces are subject to change or
deletion without notice.
|
Method Summary | |
JCTree | DefaultConstructor(TreeMaker make, ClassSymbol c, List<Type> typarams, List<Type> argtypes, List<Type> thrown, long flags, boolean based) Generate default constructor for given class. | JCExpressionStatement | SuperCall(TreeMaker make, List<Type> typarams, List<JCVariableDecl> params, boolean based) Generate call to superclass constructor. | void | annotateDefaultValueLater(JCExpression defaultValue, Env<AttrContext> localEnv, MethodSymbol m) Queue processing of an attribute default value. | void | annotateLater(List<JCAnnotation> annotations, Env<AttrContext> localEnv, Symbol s) Queue annotations for later processing. | Type | attribImportType(JCTree tree, Env<AttrContext> env) | public void | complete(Symbol sym) Complete entering a class. | void | finishClass(JCClassDecl tree, Env<AttrContext> env) Enter members for a class. | public Env<AttrContext> | getInitEnv(JCVariableDecl tree, Env<AttrContext> env) | public Env<AttrContext> | getMethodEnv(JCMethodDecl tree, Env<AttrContext> env) | Env<AttrContext> | initEnv(JCVariableDecl tree, Env<AttrContext> env) Create a fresh environment for a variable's initializer. | public static MemberEnter | instance(Context context) | protected void | memberEnter(JCTree tree, Env<AttrContext> env) Enter field and method definitions and process import
clauses, catching any completion failure exceptions. | void | memberEnter(List<? extends JCTree> trees, Env<AttrContext> env) Enter members from a list of trees. | Env<AttrContext> | methodEnv(JCMethodDecl tree, Env<AttrContext> env) Create a fresh environment for method bodies. | Type | signature(List<JCTypeParameter> typarams, List<JCVariableDecl> params, JCTree res, List<JCExpression> thrown, Env<AttrContext> env) Construct method type from method signature. | boolean | staticImportAccessible(Symbol sym, PackageSymbol packge) | public void | visitErroneous(JCErroneous tree) | public void | visitImport(JCImport tree) | public void | visitMethodDef(JCMethodDecl tree) | public void | visitTopLevel(JCCompilationUnit tree) | public void | visitTree(JCTree tree) | public void | visitVarDef(JCVariableDecl tree) |
checkClash | final static boolean checkClash(Code) | | A switch to determine whether we check for package/class conflicts
|
completionEnabled | boolean completionEnabled(Code) | | A flag to disable completion from time to time during member
enter, as we only need to look up types. This avoids
unnecessarily deep recursion.
|
isFirst | boolean isFirst(Code) | | Set to true only when the first of a set of classes is
processed from the halfcompleted queue.
|
DefaultConstructor | JCTree DefaultConstructor(TreeMaker make, ClassSymbol c, List<Type> typarams, List<Type> argtypes, List<Type> thrown, long flags, boolean based)(Code) | | Generate default constructor for given class. For classes different
from java.lang.Object, this is:
c(argtype_0 x_0, ..., argtype_n x_n) throws thrown {
super(x_0, ..., x_n)
}
or, if based == true:
c(argtype_0 x_0, ..., argtype_n x_n) throws thrown {
x_0.super(x_1, ..., x_n)
}
Parameters: make - The tree factory. Parameters: c - The class owning the default constructor. Parameters: argtypes - The parameter types of the constructor. Parameters: thrown - The thrown exceptions of the constructor. Parameters: based - Is first parameter a this$n? |
SuperCall | JCExpressionStatement SuperCall(TreeMaker make, List<Type> typarams, List<JCVariableDecl> params, boolean based)(Code) | | Generate call to superclass constructor. This is:
super(id_0, ..., id_n)
or, if based == true
id_0.super(id_1,...,id_n)
where id_0, ..., id_n are the names of the given parameters.
Parameters: make - The tree factory Parameters: params - The parameters that need to be passed to super Parameters: typarams - The type parameters that need to be passed to super Parameters: based - Is first parameter a this$n? |
annotateDefaultValueLater | void annotateDefaultValueLater(JCExpression defaultValue, Env<AttrContext> localEnv, MethodSymbol m)(Code) | | Queue processing of an attribute default value.
|
complete | public void complete(Symbol sym) throws CompletionFailure(Code) | | Complete entering a class.
Parameters: sym - The symbol of the class to be completed. |
finishClass | void finishClass(JCClassDecl tree, Env<AttrContext> env)(Code) | | Enter members for a class.
|
initEnv | Env<AttrContext> initEnv(JCVariableDecl tree, Env<AttrContext> env)(Code) | | Create a fresh environment for a variable's initializer.
If the variable is a field, the owner of the environment's scope
is be the variable itself, otherwise the owner is the method
enclosing the variable definition.
Parameters: tree - The variable definition. Parameters: env - The environment current outside of the variable definition. |
memberEnter | protected void memberEnter(JCTree tree, Env<AttrContext> env)(Code) | | Enter field and method definitions and process import
clauses, catching any completion failure exceptions.
|
methodEnv | Env<AttrContext> methodEnv(JCMethodDecl tree, Env<AttrContext> env)(Code) | | Create a fresh environment for method bodies.
Parameters: tree - The method definition. Parameters: env - The environment current outside of the method definition. |
signature | Type signature(List<JCTypeParameter> typarams, List<JCVariableDecl> params, JCTree res, List<JCExpression> thrown, Env<AttrContext> env)(Code) | | Construct method type from method signature.
Parameters: typarams - The method's type parameters. Parameters: params - The method's value parameters. Parameters: res - The method's result type,null if it is a constructor. Parameters: thrown - The method's thrown exceptions. Parameters: env - The method's (local) environment. |
staticImportAccessible | boolean staticImportAccessible(Symbol sym, PackageSymbol packge)(Code) | | |
visitErroneous | public void visitErroneous(JCErroneous tree)(Code) | | |
visitImport | public void visitImport(JCImport tree)(Code) | | |
visitMethodDef | public void visitMethodDef(JCMethodDecl tree)(Code) | | |
visitTopLevel | public void visitTopLevel(JCCompilationUnit tree)(Code) | | |
visitTree | public void visitTree(JCTree tree)(Code) | | Default member enter visitor method: do nothing
|
visitVarDef | public void visitVarDef(JCVariableDecl tree)(Code) | | |
|
|