|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.tools.javac.tree.JCTree.Visitor
com.sun.tools.javac.comp.Attr
public class Attr
This is the main context-dependent analysis phase in GJC. It encompasses name resolution, type checking and constant folding as subtasks. Some subtasks involve auxiliary classes.
Check,
Resolve,
ConstFold,
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.
| Nested Class Summary | |
|---|---|
private static class |
Attr.BreakAttr
|
private class |
Attr.IdentAttributer
|
| Field Summary | |
|---|---|
(package private) boolean |
allowAnonOuterThis
Switch: allow references to surrounding object from anonymous objects during constructor call? |
(package private) boolean |
allowBoxing
Switch: support boxing and unboxing? |
(package private) boolean |
allowCovariantReturns
Switch: support covariant result types? |
(package private) boolean |
allowEnums
Switch: support enums? |
(package private) boolean |
allowGenerics
Switch: support generics? |
(package private) boolean |
allowVarargs
Switch: allow variable-arity methods. |
(package private) Annotate |
annotate
|
protected static Context.Key<Attr> |
attrKey
|
private JCTree |
breakTree
|
(package private) ConstFold |
cfolder
|
(package private) Check |
chk
|
(package private) JCDiagnostic.Factory |
diags
|
(package private) Enter |
enter
|
(package private) Env<AttrContext> |
env
Visitor argument: the current environment. |
protected java.util.HashMap<java.lang.String,java.lang.Boolean> |
hasCodeFieldsCache
Cache for queries to hasCodeFields. |
private TreeVisitor<Symbol,Env<AttrContext>> |
identAttributer
|
(package private) Log |
log
|
(package private) TreeMaker |
make
|
(package private) MemberEnter |
memberEnter
|
(package private) Names |
names
|
(package private) Warner |
noteWarner
|
(package private) Options |
options
|
(package private) int |
pkind
Visitor argument: the currently expected proto-kind. |
(package private) Type |
pt
Visitor argument: the currently expected proto-type. |
(package private) boolean |
relax
Switch: relax some constraints for retrofit mode. |
(package private) Type |
result
Visitor result: the computed type. |
(package private) Resolve |
rs
|
(package private) Symtab |
syms
|
(package private) Target |
target
|
(package private) Types |
types
|
(package private) boolean |
useBeforeDeclarationWarning
Switch: warn about use of variable before declaration? RFE: 6425594 |
| Constructor Summary | |
|---|---|
protected |
Attr(Context context)
|
| Method Summary | ||
|---|---|---|
private static void |
addVars(List<JCTree.JCStatement> stats,
Scope switchScope)
Add any variables defined in stats to the switch scope. |
|
private void |
assertConvertible(JCTree tree,
Type actual,
Type formal,
Warner warn)
|
|
(package private) void |
attribAnnotationTypes(List<JCTree.JCAnnotation> annotations,
Env<AttrContext> env)
Attribute the type references in a list of annotations. |
|
(package private) List<Type> |
attribArgs(List<JCTree.JCExpression> trees,
Env<AttrContext> env)
Attribute the arguments in a method call, returning a list of types. |
|
(package private) Type |
attribBase(JCTree tree,
Env<AttrContext> env,
boolean classExpected,
boolean interfaceExpected,
boolean checkExtensible)
Attribute type reference in an `extends' or `implements' clause. |
|
(package private) void |
attribBounds(List<JCTree.JCTypeParameter> typarams)
|
|
void |
attribClass(JCDiagnostic.DiagnosticPosition pos,
Symbol.ClassSymbol c)
Main method: attribute class definition associated with given class symbol. |
|
(package private) void |
attribClass(Symbol.ClassSymbol c)
Attribute class definition associated with given class symbol. |
|
private void |
attribClassBody(Env<AttrContext> env,
Symbol.ClassSymbol c)
Finish the attribution of a class. |
|
(package private) Type |
attribExpr(JCTree tree,
Env<AttrContext> env)
Derived visitor method: attribute an expression tree with no constraints on the computed type. |
|
Type |
attribExpr(JCTree tree,
Env<AttrContext> env,
Type pt)
Derived visitor method: attribute an expression tree. |
|
(package private) List<Type> |
attribExprs(List<JCTree.JCExpression> trees,
Env<AttrContext> env,
Type pt)
Attribute a list of expressions, returning a list of types. |
|
Env<AttrContext> |
attribExprToTree(JCTree expr,
Env<AttrContext> env,
JCTree tree)
|
|
Symbol |
attribIdent(JCTree tree,
JCTree.JCCompilationUnit topLevel)
Attribute a parsed identifier. |
|
Type |
attribStat(JCTree tree,
Env<AttrContext> env)
Derived visitor method: attribute a statement or definition tree. |
|
(package private)
|
attribStats(List<T> trees,
Env<AttrContext> env)
Attribute a list of statements, returning nothing. |
|
Env<AttrContext> |
attribStatToTree(JCTree stmt,
Env<AttrContext> env,
JCTree tree)
|
|
(package private) Type |
attribTree(JCTree tree,
Env<AttrContext> env,
int pkind,
Type pt)
Visitor method: attribute a tree, catching any completion failure exceptions. |
|
(package private) Type |
attribType(JCTree tree,
Env<AttrContext> env)
Derived visitor method: attribute a type tree. |
|
Type |
attribType(JCTree node,
Symbol.TypeSymbol sym)
|
|
(package private) List<Type> |
attribTypes(List<JCTree.JCExpression> trees,
Env<AttrContext> env)
Attribute a type argument list, returning a list of types. |
|
(package private) void |
attribTypeVariables(List<JCTree.JCTypeParameter> typarams,
Env<AttrContext> env)
Attribute type variables (of generic classes or methods). |
|
private boolean |
canOwnInitializer(Symbol sym)
Can the given symbol be the owner of code which forms part if class initialization? This is the case if the symbol is a type or field, or if the symbol is the synthetic method. |
|
private Type |
capture(Type type)
|
|
(package private) Type |
check(JCTree tree,
Type owntype,
int ownkind,
int pkind,
Type pt)
Check kind and type of given tree against protokind and prototype. |
|
(package private) void |
checkAssignable(JCDiagnostic.DiagnosticPosition pos,
Symbol.VarSymbol v,
JCTree base,
Env<AttrContext> env)
Check that variable can be assigned to. |
|
protected void |
checkAssignEscapeSafety(JCTree.JCExpression lhs)
|
|
(package private) Type |
checkBase(Type t,
JCTree tree,
Env<AttrContext> env,
boolean classExpected,
boolean interfaceExpected,
boolean checkExtensible)
|
|
protected boolean |
checkDefaultCtorsEscapeSafe(Symbol.MethodSymbol ctor)
|
|
private void |
checkEnumInitializer(JCTree tree,
Env<AttrContext> env,
Symbol.VarSymbol v)
Check for illegal references to static members of enum. |
|
(package private) boolean |
checkFirstConstructorStat(JCTree.JCMethodInvocation tree,
Env<AttrContext> env)
Check that given application node appears as first statement in a constructor call. |
|
(package private) Type |
checkId(JCTree tree,
Type site,
Symbol sym,
Env<AttrContext> env,
int pkind,
Type pt,
boolean useVarargs)
Determine type of identifier or select expression and check that (1) the referenced symbol is not deprecated (2) the symbol's type is safe (@see checkSafe) (3) if symbol is a variable, check that its type and kind are compatible with the prototype and protokind. |
|
private void |
checkInit(JCTree tree,
Env<AttrContext> env,
Symbol.VarSymbol v,
boolean onlyWarning)
Check that variable is initialized and evaluate the variable's initializer, if not yet done. |
|
Type |
checkMethod(Type site,
Symbol sym,
Env<AttrContext> env,
List<JCTree.JCExpression> argtrees,
List<Type> argtypes,
List<Type> typeargtypes,
boolean useVarargs)
Check that method arguments conform to its instantation. |
|
protected boolean |
checkRuntimeExceptionEscapeSafe(Symbol.ClassSymbol clazz)
|
|
private void |
checkSerialVersionUID(JCTree.JCClassDecl tree,
Symbol.ClassSymbol c)
Check that an appropriate serialVersionUID member is defined. |
|
Type |
coerce(Type etype,
Type ttype)
|
|
private Type |
condType(JCDiagnostic.DiagnosticPosition pos,
Type condtype,
Type thentype,
Type elsetype)
Compute the type of a conditional expression, after checking that it exists. |
|
private Type |
condType1(JCDiagnostic.DiagnosticPosition pos,
Type condtype,
Type thentype,
Type elsetype)
Compute the type of a conditional expression, after checking that it exists. |
|
protected void |
cspVariableCheck(Symbol sym,
JCTree tree)
|
|
private Symbol |
enumConstant(JCTree tree,
Type enumType)
Return the selected enumeration constant symbol, or null. |
|
private JCTree |
findJumpTarget(JCDiagnostic.DiagnosticPosition pos,
int tag,
Name label,
Env<AttrContext> env)
Return the target of a break or continue statement, if it exists, report an error if not. |
|
protected boolean |
hasCodeFields(Type type)
Return true if the type has code fields. |
|
protected boolean |
hasCodeFields(Type type,
java.util.HashSet<java.lang.String> visited)
Return true if the type has code fields. |
|
static Attr |
instance(Context context)
|
|
(package private) boolean |
isAssignableAsBlankFinal(Symbol.VarSymbol v,
Env<AttrContext> env)
Is given blank final variable assignable, i.e. |
|
protected boolean |
isClassCloserThanBrackets()
Return true if we are inside brackets, but there is an anonymous inner class even closer: <| ... |
|
protected boolean |
isCodeType(Type memberType)
|
|
protected boolean |
isPrimitiveOrBoxedOrArrayThereof(Type type)
|
|
private boolean |
isSerializable(Symbol.ClassSymbol c)
check if a class is a subtype of Serializable, if that is available. |
|
private boolean |
isStaticEnumField(Symbol.VarSymbol v)
Is the given symbol a static, non-constant field of an Enum? Note: enum literals should not be regarded as such |
|
(package private) boolean |
isStaticReference(JCTree tree)
Does tree represent a static reference to an identifier? It is assumed that tree is either a SELECT or an IDENT. |
|
(package private) static boolean |
isType(Symbol sym)
Is this symbol a type? |
|
(package private) Type |
litType(int tag)
Return the type of a literal with given type tag. |
|
JCTree.JCExpression |
makeNullCheck(JCTree.JCExpression arg)
Make an attributed null check tree. |
|
(package private) Type |
newMethTemplate(List<Type> argtypes,
List<Type> typeargtypes)
Obtain a method type with given argument types. |
|
private Symbol |
selectSym(JCTree.JCFieldAccess tree,
Type site,
Env<AttrContext> env,
Type pt,
int pkind)
Determine symbol referenced by a Select expression, |
|
protected void |
setClosestBracketUnsafe(JCTree tree)
|
|
protected Type |
substList(Type t,
List<Type> from,
List<Type> to)
|
|
(package private) Symbol |
thisSym(JCDiagnostic.DiagnosticPosition pos,
Env<AttrContext> env)
The current `this' symbol. |
|
void |
visitAnnotation(JCTree.JCAnnotation tree)
|
|
void |
visitApply(JCTree.JCMethodInvocation tree)
Visitor method for method invocations. |
|
void |
visitAssert(JCTree.JCAssert tree)
|
|
void |
visitAssign(JCTree.JCAssign tree)
|
|
void |
visitAssignop(JCTree.JCAssignOp tree)
|
|
void |
visitBinary(JCTree.JCBinary tree)
|
|
void |
visitBlock(JCTree.JCBlock tree)
|
|
void |
visitBracketExpr(JCTree.JCBracketExpr tree)
|
|
void |
visitBracketStat(JCTree.JCBracketStat tree)
|
|
void |
visitBreak(JCTree.JCBreak tree)
|
|
void |
visitClassDef(JCTree.JCClassDecl tree)
|
|
void |
visitConditional(JCTree.JCConditional tree)
|
|
void |
visitContinue(JCTree.JCContinue tree)
|
|
void |
visitDoLoop(JCTree.JCDoWhileLoop tree)
|
|
void |
visitErroneous(JCTree.JCErroneous tree)
|
|
void |
visitEscapeExpr(JCTree.JCEscapeExpr tree)
|
|
void |
visitEscapeStat(JCTree.JCEscapeStat tree)
|
|
void |
visitExec(JCTree.JCExpressionStatement tree)
|
|
void |
visitForeachLoop(JCTree.JCEnhancedForLoop tree)
|
|
void |
visitForLoop(JCTree.JCForLoop tree)
|
|
void |
visitIdent(JCTree.JCIdent tree)
|
|
void |
visitIf(JCTree.JCIf tree)
|
|
void |
visitImport(JCTree.JCImport tree)
|
|
void |
visitIndexed(JCTree.JCArrayAccess tree)
|
|
void |
visitLabelled(JCTree.JCLabeledStatement tree)
|
|
void |
visitLetExpr(JCTree.LetExpr tree)
|
|
void |
visitLiteral(JCTree.JCLiteral tree)
|
|
void |
visitMethodDef(JCTree.JCMethodDecl tree)
|
|
void |
visitNewArray(JCTree.JCNewArray tree)
|
|
void |
visitNewClass(JCTree.JCNewClass tree)
|
|
void |
visitParens(JCTree.JCParens tree)
|
|
void |
visitReturn(JCTree.JCReturn tree)
|
|
void |
visitSelect(JCTree.JCFieldAccess tree)
|
|
void |
visitSkip(JCTree.JCSkip tree)
|
|
void |
visitSwitch(JCTree.JCSwitch tree)
|
|
void |
visitSynchronized(JCTree.JCSynchronized tree)
|
|
void |
visitThrow(JCTree.JCThrow tree)
|
|
void |
visitTree(JCTree tree)
Default visitor method for all other trees. |
|
void |
visitTry(JCTree.JCTry tree)
|
|
void |
visitTypeApply(JCTree.JCTypeApply tree)
Visitor method for parameterized types. |
|
void |
visitTypeArray(JCTree.JCArrayTypeTree tree)
|
|
void |
visitTypeCast(JCTree.JCTypeCast tree)
|
|
void |
visitTypeIdent(JCTree.JCPrimitiveTypeTree tree)
|
|
void |
visitTypeParameter(JCTree.JCTypeParameter tree)
|
|
void |
visitTypeTest(JCTree.JCInstanceOf tree)
|
|
void |
visitUnary(JCTree.JCUnary tree)
|
|
void |
visitVarDef(JCTree.JCVariableDecl tree)
|
|
void |
visitWhileLoop(JCTree.JCWhileLoop tree)
|
|
void |
visitWildcard(JCTree.JCWildcard tree)
|
|
| Methods inherited from class com.sun.tools.javac.tree.JCTree.Visitor |
|---|
visitCase, visitCatch, visitModifiers, visitTopLevel, visitTypeBoundKind |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final Context.Key<Attr> attrKey
final Names names
final Log log
final Symtab syms
final Resolve rs
final Check chk
final MemberEnter memberEnter
final TreeMaker make
final ConstFold cfolder
final Enter enter
final Target target
final Types types
final JCDiagnostic.Factory diags
final Annotate annotate
final Options options
boolean relax
boolean allowGenerics
boolean allowVarargs
boolean allowEnums
boolean allowBoxing
boolean allowCovariantReturns
boolean allowAnonOuterThis
boolean useBeforeDeclarationWarning
private TreeVisitor<Symbol,Env<AttrContext>> identAttributer
private JCTree breakTree
Env<AttrContext> env
int pkind
Type pt
Type result
protected java.util.HashMap<java.lang.String,java.lang.Boolean> hasCodeFieldsCache
Warner noteWarner
| Constructor Detail |
|---|
protected Attr(Context context)
| Method Detail |
|---|
public static Attr instance(Context context)
Type check(JCTree tree,
Type owntype,
int ownkind,
int pkind,
Type pt)
tree - The tree whose kind and type is checkedowntype - The computed type of the treeownkind - The computed kind of the treepkind - The expected kind (or: protokind) of the treept - The expected type (or: prototype) of the tree
boolean isAssignableAsBlankFinal(Symbol.VarSymbol v,
Env<AttrContext> env)
v - The blank final variable.env - The current environment.
void checkAssignable(JCDiagnostic.DiagnosticPosition pos,
Symbol.VarSymbol v,
JCTree base,
Env<AttrContext> env)
pos - The current source code position.v - The assigned varaiblebase - If the variable is referred to in a Select, the part
to the left of the `.', null otherwise.env - The current environment.boolean isStaticReference(JCTree tree)
tree - The candidate tree.static boolean isType(Symbol sym)
Symbol thisSym(JCDiagnostic.DiagnosticPosition pos,
Env<AttrContext> env)
env - The current environment.
public Symbol attribIdent(JCTree tree,
JCTree.JCCompilationUnit topLevel)
tree - Parsed identifier nametopLevel - The toplevel to use
public Type coerce(Type etype,
Type ttype)
public Type attribType(JCTree node,
Symbol.TypeSymbol sym)
public Env<AttrContext> attribExprToTree(JCTree expr,
Env<AttrContext> env,
JCTree tree)
public Env<AttrContext> attribStatToTree(JCTree stmt,
Env<AttrContext> env,
JCTree tree)
Type attribTree(JCTree tree,
Env<AttrContext> env,
int pkind,
Type pt)
tree - The tree to be visited.env - The environment visitor argument.pkind - The protokind visitor argument.pt - The prototype visitor argument.
public Type attribExpr(JCTree tree,
Env<AttrContext> env,
Type pt)
Type attribExpr(JCTree tree,
Env<AttrContext> env)
Type attribType(JCTree tree,
Env<AttrContext> env)
public Type attribStat(JCTree tree,
Env<AttrContext> env)
List<Type> attribExprs(List<JCTree.JCExpression> trees,
Env<AttrContext> env,
Type pt)
<T extends JCTree> void attribStats(List<T> trees,
Env<AttrContext> env)
List<Type> attribArgs(List<JCTree.JCExpression> trees,
Env<AttrContext> env)
List<Type> attribTypes(List<JCTree.JCExpression> trees,
Env<AttrContext> env)
void attribTypeVariables(List<JCTree.JCTypeParameter> typarams,
Env<AttrContext> env)
typarams - the type variables to enterenv - the current environmentvoid attribBounds(List<JCTree.JCTypeParameter> typarams)
void attribAnnotationTypes(List<JCTree.JCAnnotation> annotations,
Env<AttrContext> env)
Type attribBase(JCTree tree,
Env<AttrContext> env,
boolean classExpected,
boolean interfaceExpected,
boolean checkExtensible)
tree - The tree making up the type reference.env - The environment current at the reference.classExpected - true if only a class is expected here.interfaceExpected - true if only an interface is expected here.
Type checkBase(Type t,
JCTree tree,
Env<AttrContext> env,
boolean classExpected,
boolean interfaceExpected,
boolean checkExtensible)
public void visitClassDef(JCTree.JCClassDecl tree)
visitClassDef in class JCTree.Visitorpublic void visitMethodDef(JCTree.JCMethodDecl tree)
visitMethodDef in class JCTree.Visitorpublic void visitVarDef(JCTree.JCVariableDecl tree)
visitVarDef in class JCTree.Visitorpublic void visitSkip(JCTree.JCSkip tree)
visitSkip in class JCTree.Visitorpublic void visitBlock(JCTree.JCBlock tree)
visitBlock in class JCTree.Visitorpublic void visitBracketExpr(JCTree.JCBracketExpr tree)
visitBracketExpr in class JCTree.Visitorpublic void visitBracketStat(JCTree.JCBracketStat tree)
visitBracketStat in class JCTree.Visitorpublic void visitEscapeExpr(JCTree.JCEscapeExpr tree)
visitEscapeExpr in class JCTree.Visitorpublic void visitEscapeStat(JCTree.JCEscapeStat tree)
visitEscapeStat in class JCTree.Visitorpublic void visitDoLoop(JCTree.JCDoWhileLoop tree)
visitDoLoop in class JCTree.Visitorpublic void visitWhileLoop(JCTree.JCWhileLoop tree)
visitWhileLoop in class JCTree.Visitorpublic void visitForLoop(JCTree.JCForLoop tree)
visitForLoop in class JCTree.Visitorpublic void visitForeachLoop(JCTree.JCEnhancedForLoop tree)
visitForeachLoop in class JCTree.Visitorpublic void visitLabelled(JCTree.JCLabeledStatement tree)
visitLabelled in class JCTree.Visitorpublic void visitSwitch(JCTree.JCSwitch tree)
visitSwitch in class JCTree.Visitor
private static void addVars(List<JCTree.JCStatement> stats,
Scope switchScope)
private Symbol enumConstant(JCTree tree,
Type enumType)
public void visitSynchronized(JCTree.JCSynchronized tree)
visitSynchronized in class JCTree.Visitorpublic void visitTry(JCTree.JCTry tree)
visitTry in class JCTree.Visitorpublic void visitConditional(JCTree.JCConditional tree)
visitConditional in class JCTree.Visitor
private Type condType(JCDiagnostic.DiagnosticPosition pos,
Type condtype,
Type thentype,
Type elsetype)
pos - The source position to be used for
error diagnostics.condtype - The type of the expression's condition.thentype - The type of the expression's then-part.elsetype - The type of the expression's else-part.
private Type condType1(JCDiagnostic.DiagnosticPosition pos,
Type condtype,
Type thentype,
Type elsetype)
pos - The source position to be used for error
diagnostics.condtype - The type of the expression's condition.thentype - The type of the expression's then-part.elsetype - The type of the expression's else-part.public void visitIf(JCTree.JCIf tree)
visitIf in class JCTree.Visitorpublic void visitExec(JCTree.JCExpressionStatement tree)
visitExec in class JCTree.Visitorpublic void visitBreak(JCTree.JCBreak tree)
visitBreak in class JCTree.Visitorpublic void visitContinue(JCTree.JCContinue tree)
visitContinue in class JCTree.Visitor
private JCTree findJumpTarget(JCDiagnostic.DiagnosticPosition pos,
int tag,
Name label,
Env<AttrContext> env)
pos - The position to be used for error diagnosticstag - The tag of the jump statement. This is either
Tree.BREAK or Tree.CONTINUE.label - The label of the jump statement, or null if no
label is given.env - The environment current at the jump statement.public void visitReturn(JCTree.JCReturn tree)
visitReturn in class JCTree.Visitorprotected boolean checkRuntimeExceptionEscapeSafe(Symbol.ClassSymbol clazz)
public void visitThrow(JCTree.JCThrow tree)
visitThrow in class JCTree.Visitorpublic void visitAssert(JCTree.JCAssert tree)
visitAssert in class JCTree.Visitorprotected boolean isClassCloserThanBrackets()
protected void setClosestBracketUnsafe(JCTree tree)
public void visitApply(JCTree.JCMethodInvocation tree)
visitApply in class JCTree.Visitor
boolean checkFirstConstructorStat(JCTree.JCMethodInvocation tree,
Env<AttrContext> env)
tree - The application nodeenv - The environment current at the application.
Type newMethTemplate(List<Type> argtypes,
List<Type> typeargtypes)
public void visitNewClass(JCTree.JCNewClass tree)
visitNewClass in class JCTree.Visitorprotected boolean checkDefaultCtorsEscapeSafe(Symbol.MethodSymbol ctor)
public JCTree.JCExpression makeNullCheck(JCTree.JCExpression arg)
public void visitNewArray(JCTree.JCNewArray tree)
visitNewArray in class JCTree.Visitorpublic void visitParens(JCTree.JCParens tree)
visitParens in class JCTree.Visitorpublic void visitAssign(JCTree.JCAssign tree)
visitAssign in class JCTree.Visitorprotected void checkAssignEscapeSafety(JCTree.JCExpression lhs)
public void visitAssignop(JCTree.JCAssignOp tree)
visitAssignop in class JCTree.Visitorpublic void visitUnary(JCTree.JCUnary tree)
visitUnary in class JCTree.Visitorpublic void visitBinary(JCTree.JCBinary tree)
visitBinary in class JCTree.Visitorpublic void visitTypeCast(JCTree.JCTypeCast tree)
visitTypeCast in class JCTree.Visitorpublic void visitTypeTest(JCTree.JCInstanceOf tree)
visitTypeTest in class JCTree.Visitorpublic void visitIndexed(JCTree.JCArrayAccess tree)
visitIndexed in class JCTree.Visitorpublic void visitIdent(JCTree.JCIdent tree)
visitIdent in class JCTree.Visitorprotected boolean hasCodeFields(Type type)
type - type to check
protected boolean hasCodeFields(Type type,
java.util.HashSet<java.lang.String> visited)
type - type to checkvisited - hash set of types already visited
protected boolean isCodeType(Type memberType)
protected Type substList(Type t,
List<Type> from,
List<Type> to)
protected boolean isPrimitiveOrBoxedOrArrayThereof(Type type)
protected void cspVariableCheck(Symbol sym,
JCTree tree)
public void visitSelect(JCTree.JCFieldAccess tree)
visitSelect in class JCTree.Visitor
private Symbol selectSym(JCTree.JCFieldAccess tree,
Type site,
Env<AttrContext> env,
Type pt,
int pkind)
tree - The select tree.site - The type of the selected expression,env - The current environment.pt - The current prototype.pkind - The expected kind(s) of the Select expression.
Type checkId(JCTree tree,
Type site,
Symbol sym,
Env<AttrContext> env,
int pkind,
Type pt,
boolean useVarargs)
tree - The syntax tree representing the identifiersite - If this is a select, the type of the selected
expression, otherwise the type of the current class.sym - The symbol representing the identifier.env - The current environment.pkind - The set of expected kinds.pt - The expected type.
private void checkInit(JCTree tree,
Env<AttrContext> env,
Symbol.VarSymbol v,
boolean onlyWarning)
tree - The tree making up the variable reference.env - The current environment.v - The variable's symbol.
private void checkEnumInitializer(JCTree tree,
Env<AttrContext> env,
Symbol.VarSymbol v)
tree - The tree making up the variable reference.env - The current environment.v - The variable's symbol.3rd Ed. (8.9 Enums)private boolean isStaticEnumField(Symbol.VarSymbol v)
private boolean canOwnInitializer(Symbol sym)
public Type checkMethod(Type site,
Symbol sym,
Env<AttrContext> env,
List<JCTree.JCExpression> argtrees,
List<Type> argtypes,
List<Type> typeargtypes,
boolean useVarargs)
private void assertConvertible(JCTree tree,
Type actual,
Type formal,
Warner warn)
public void visitLiteral(JCTree.JCLiteral tree)
visitLiteral in class JCTree.VisitorType litType(int tag)
public void visitTypeIdent(JCTree.JCPrimitiveTypeTree tree)
visitTypeIdent in class JCTree.Visitorpublic void visitTypeArray(JCTree.JCArrayTypeTree tree)
visitTypeArray in class JCTree.Visitorpublic void visitTypeApply(JCTree.JCTypeApply tree)
visitTypeApply in class JCTree.Visitorpublic void visitTypeParameter(JCTree.JCTypeParameter tree)
visitTypeParameter in class JCTree.Visitorpublic void visitWildcard(JCTree.JCWildcard tree)
visitWildcard in class JCTree.Visitorpublic void visitAnnotation(JCTree.JCAnnotation tree)
visitAnnotation in class JCTree.Visitorpublic void visitErroneous(JCTree.JCErroneous tree)
visitErroneous in class JCTree.Visitorpublic void visitTree(JCTree tree)
visitTree in class JCTree.Visitor
public void attribClass(JCDiagnostic.DiagnosticPosition pos,
Symbol.ClassSymbol c)
pos - The source position at which completion errors are to be
reported.c - The class symbol whose definition will be attributed.
void attribClass(Symbol.ClassSymbol c)
throws Symbol.CompletionFailure
c - The class symbol whose definition will be attributed.
Symbol.CompletionFailurepublic void visitImport(JCTree.JCImport tree)
visitImport in class JCTree.Visitorpublic void visitLetExpr(JCTree.LetExpr tree)
visitLetExpr in class JCTree.Visitor
private void attribClassBody(Env<AttrContext> env,
Symbol.ClassSymbol c)
private boolean isSerializable(Symbol.ClassSymbol c)
private void checkSerialVersionUID(JCTree.JCClassDecl tree,
Symbol.ClassSymbol c)
private Type capture(Type type)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||