Save This Page
Home » openjdk-7 » com.sun.tools » javac » comp » [javadoc | source]
com.sun.tools.javac.comp
public class: MemberEnter [javadoc | source]
java.lang.Object
   com.sun.tools.javac.tree.JCTree.Visitor
      com.sun.tools.javac.comp.MemberEnter

All Implemented Interfaces:
    Completer

Direct Known Subclasses:
    JavadocMemberEnter

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 supported API. 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.
Field Summary
protected static final  Key<MemberEnter> memberEnterKey     
static final  boolean checkClash    A switch to determine whether we check for package/class conflicts 
 ListBuffer<AttrContext> halfcompleted    A queue for classes whose members still need to be entered into the symbol table. 
 boolean isFirst    Set to true only when the first of a set of classes is processed from the halfcompleted queue. 
 boolean completionEnabled    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. 
protected  Env<AttrContext> env    Visitor argument: the current environment 
Constructor:
 protected MemberEnter(Context context) 
Method from com.sun.tools.javac.comp.MemberEnter Summary:
DefaultConstructor,   SuperCall,   annotateDefaultValueLater,   annotateLater,   attribImportType,   complete,   finishClass,   getInitEnv,   getMethodEnv,   initEnv,   instance,   memberEnter,   memberEnter,   methodEnv,   modelMissingTypes,   signature,   staticImportAccessible,   visitErroneous,   visitImport,   visitMethodDef,   visitTopLevel,   visitTree,   visitVarDef
Methods from com.sun.tools.javac.tree.JCTree$Visitor:
visitAnnotation,   visitApply,   visitAssert,   visitAssign,   visitAssignop,   visitBinary,   visitBlock,   visitBreak,   visitCase,   visitCatch,   visitClassDef,   visitConditional,   visitContinue,   visitDoLoop,   visitErroneous,   visitExec,   visitForLoop,   visitForeachLoop,   visitIdent,   visitIf,   visitImport,   visitIndexed,   visitLabelled,   visitLetExpr,   visitLiteral,   visitMethodDef,   visitModifiers,   visitNewArray,   visitNewClass,   visitParens,   visitReturn,   visitSelect,   visitSkip,   visitSwitch,   visitSynchronized,   visitThrow,   visitTopLevel,   visitTree,   visitTry,   visitTypeApply,   visitTypeArray,   visitTypeBoundKind,   visitTypeCast,   visitTypeIdent,   visitTypeParameter,   visitTypeTest,   visitTypeUnion,   visitUnary,   visitVarDef,   visitWhileLoop,   visitWildcard
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.sun.tools.javac.comp.MemberEnter Detail:
 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. 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) }
 JCExpressionStatement SuperCall(TreeMaker make,
    List<Type> typarams,
    List<JCVariableDecl> params,
    boolean based) 
    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.
  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) throws CompletionFailure 
    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. 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.
 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<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 modelMissingTypes(Type t,
    JCExpression tree,
    boolean interfaceExpected) 
 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) 
    Default member enter visitor method: do nothing
 public  void visitVarDef(JCVariableDecl tree)