public class MemberEnter extends JCTree.Visitor implements Symbol.Completer
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.
Modifier and Type | Field and Description |
---|---|
protected Env<AttrContext> |
env
Visitor argument: the current environment
|
protected static Context.Key<MemberEnter> |
memberEnterKey |
Modifier | Constructor and Description |
---|---|
protected |
MemberEnter(Context context) |
Modifier and Type | Method and Description |
---|---|
void |
complete(Symbol sym)
Complete entering a class.
|
Env<AttrContext> |
getInitEnv(JCTree.JCVariableDecl tree,
Env<AttrContext> env) |
Env<AttrContext> |
getMethodEnv(JCTree.JCMethodDecl tree,
Env<AttrContext> env) |
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.
|
boolean |
needsLazyConstValue(JCTree tree) |
void |
typeAnnotate(JCTree tree,
Env<AttrContext> env,
Symbol sym,
JCDiagnostic.DiagnosticPosition deferPos) |
void |
visitErroneous(JCTree.JCErroneous tree) |
void |
visitImport(JCTree.JCImport tree) |
void |
visitMethodDef(JCTree.JCMethodDecl tree) |
void |
visitTopLevel(JCTree.JCCompilationUnit tree) |
void |
visitTree(JCTree tree)
Default member enter visitor method: do nothing
|
void |
visitVarDef(JCTree.JCVariableDecl tree) |
visitAnnotatedType, visitAnnotation, visitApply, visitAssert, visitAssign, visitAssignop, visitBinary, visitBlock, visitBreak, visitCase, visitCatch, visitClassDef, visitConditional, visitContinue, visitDoLoop, visitExec, visitForeachLoop, visitForLoop, visitIdent, visitIf, visitIndexed, visitLabelled, visitLambda, visitLetExpr, visitLiteral, visitModifiers, visitNewArray, visitNewClass, visitParens, visitReference, visitReturn, visitSelect, visitSkip, visitSwitch, visitSynchronized, visitThrow, visitTry, visitTypeApply, visitTypeArray, visitTypeBoundKind, visitTypeCast, visitTypeIdent, visitTypeIntersection, visitTypeParameter, visitTypeTest, visitTypeUnion, visitUnary, visitWhileLoop, visitWildcard
protected static final Context.Key<MemberEnter> memberEnterKey
protected Env<AttrContext> env
protected MemberEnter(Context context)
public static MemberEnter instance(Context context)
protected void memberEnter(JCTree tree, Env<AttrContext> env)
public void visitTopLevel(JCTree.JCCompilationUnit tree)
visitTopLevel
in class JCTree.Visitor
public void visitImport(JCTree.JCImport tree)
visitImport
in class JCTree.Visitor
public void visitMethodDef(JCTree.JCMethodDecl tree)
visitMethodDef
in class JCTree.Visitor
public void visitVarDef(JCTree.JCVariableDecl tree)
visitVarDef
in class JCTree.Visitor
public boolean needsLazyConstValue(JCTree tree)
public void visitTree(JCTree tree)
visitTree
in class JCTree.Visitor
public void visitErroneous(JCTree.JCErroneous tree)
visitErroneous
in class JCTree.Visitor
public Env<AttrContext> getMethodEnv(JCTree.JCMethodDecl tree, Env<AttrContext> env)
public Env<AttrContext> getInitEnv(JCTree.JCVariableDecl tree, Env<AttrContext> env)
public void complete(Symbol sym) throws Symbol.CompletionFailure
complete
in interface Symbol.Completer
sym
- The symbol of the class to be completed.Symbol.CompletionFailure
public void typeAnnotate(JCTree tree, Env<AttrContext> env, Symbol sym, JCDiagnostic.DiagnosticPosition deferPos)
Copyright © 2017 earcam. All rights reserved.