< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/tree/JCTree.java

Print this page

        

*** 133,142 **** --- 133,146 ---- /** While-loops, of type WhileLoop. */ WHILELOOP, + /** Withfields, of type WithField. + */ + WITHFIELD, + /** For-loops, of type ForLoop. */ FORLOOP, /** Foreach-loops, of type ForeachLoop.
*** 688,697 **** --- 692,702 ---- return this; } } public static abstract class JCExpression extends JCTree implements ExpressionTree { + boolean questioned = false; @Override public JCExpression setType(Type type) { super.setType(type); return this; }
*** 699,708 **** --- 704,720 ---- public JCExpression setPos(int pos) { super.setPos(pos); return this; } + public void setQuestioned() { + this.questioned = true; + } + public boolean isQuestioned() { + return this.questioned; + } + public boolean isPoly() { return false; } public boolean isStandalone() { return true; } } /**
*** 846,855 **** --- 858,870 ---- public JCBlock body; /** default value, for annotation types */ public JCExpression defaultValue; /** method symbol */ public MethodSymbol sym; + /** nascent value that evolves into the return value for a value factory */ + public VarSymbol factoryProduct; + protected JCMethodDecl(JCModifiers mods, Name name, JCExpression restype, List<JCTypeParameter> typarams, JCVariableDecl recvparam,
*** 1107,1116 **** --- 1122,1161 ---- return WHILELOOP; } } /** + * A withfield expression + */ + public static class JCWithField extends JCExpression implements WithFieldTree { + public JCExpression field; + public JCExpression value; + protected JCWithField(JCExpression field, JCExpression value) { + this.field = field; + this.value = value; + } + @Override + public void accept(Visitor v) { v.visitWithField(this); } + + @DefinedBy(Api.COMPILER_TREE) + public Kind getKind() { return Kind.WITH_FIELD; } + @DefinedBy(Api.COMPILER_TREE) + public JCExpression getField() { return field; } + @DefinedBy(Api.COMPILER_TREE) + public JCExpression getValue() { return value; } + @Override @DefinedBy(Api.COMPILER_TREE) + public <R,D> R accept(TreeVisitor<R,D> v, D d) { + return v.visitWithField(this, d); + } + + @Override + public Tag getTag() { + return WITHFIELD; + } + } + + /** * A for loop. */ public static class JCForLoop extends JCStatement implements ForLoopTree { public List<JCStatement> init; public JCExpression cond;
*** 3176,3185 **** --- 3221,3231 ---- public void visitVarDef(JCVariableDecl that) { visitTree(that); } public void visitSkip(JCSkip that) { visitTree(that); } public void visitBlock(JCBlock that) { visitTree(that); } public void visitDoLoop(JCDoWhileLoop that) { visitTree(that); } public void visitWhileLoop(JCWhileLoop that) { visitTree(that); } + public void visitWithField(JCWithField that) { visitTree(that); } public void visitForLoop(JCForLoop that) { visitTree(that); } public void visitForeachLoop(JCEnhancedForLoop that) { visitTree(that); } public void visitLabelled(JCLabeledStatement that) { visitTree(that); } public void visitSwitch(JCSwitch that) { visitTree(that); } public void visitCase(JCCase that) { visitTree(that); }
< prev index next >