< prev index next >

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

Print this page

        

*** 27,37 **** import java.util.Iterator; import com.sun.source.tree.CaseTree.CaseKind; import com.sun.source.tree.ModuleTree.ModuleKind; - import com.sun.source.tree.Tree.Kind; import com.sun.tools.javac.code.*; import com.sun.tools.javac.code.Attribute.UnresolvedClass; import com.sun.tools.javac.code.Symbol.*; import com.sun.tools.javac.code.Type.*; import com.sun.tools.javac.util.*; --- 27,36 ----
*** 160,174 **** --- 159,185 ---- List<JCTypeParameter> typarams, JCExpression extending, List<JCExpression> implementing, List<JCTree> defs) { + return ClassDef(mods, name, typarams, extending, implementing, List.nil(), defs); + } + + public JCClassDecl ClassDef(JCModifiers mods, + Name name, + List<JCTypeParameter> typarams, + JCExpression extending, + List<JCExpression> implementing, + List<JCExpression> permitting, + List<JCTree> defs) + { JCClassDecl tree = new JCClassDecl(mods, name, typarams, extending, implementing, + permitting, defs, null); tree.pos = pos; return tree; }
*** 209,219 **** tree.pos = pos; return tree; } public JCVariableDecl VarDef(JCModifiers mods, Name name, JCExpression vartype, JCExpression init) { ! JCVariableDecl tree = new JCVariableDecl(mods, name, vartype, init, null); tree.pos = pos; return tree; } public JCVariableDecl ReceiverVarDef(JCModifiers mods, JCExpression name, JCExpression vartype) { --- 220,234 ---- tree.pos = pos; return tree; } public JCVariableDecl VarDef(JCModifiers mods, Name name, JCExpression vartype, JCExpression init) { ! return VarDef(mods, name, vartype, init, null); ! } ! ! public JCVariableDecl VarDef(JCModifiers mods, Name name, JCExpression vartype, JCExpression init, List<Pair<Accessors.Kind, Name>> accessors) { ! JCVariableDecl tree = new JCVariableDecl(mods, name, vartype, init, null, accessors); tree.pos = pos; return tree; } public JCVariableDecl ReceiverVarDef(JCModifiers mods, JCExpression name, JCExpression vartype) {
*** 463,472 **** --- 478,493 ---- JCInstanceOf tree = new JCInstanceOf(expr, clazz); tree.pos = pos; return tree; } + public JCBindingPattern BindingPattern(Name name, JCTree vartype) { + JCBindingPattern tree = new JCBindingPattern(name, null, vartype); + tree.pos = pos; + return tree; + } + public JCArrayAccess Indexed(JCExpression indexed, JCExpression index) { JCArrayAccess tree = new JCArrayAccess(indexed, index); tree.pos = pos; return tree; }
*** 838,848 **** new JCVariableDecl( Modifiers(v.flags(), Annotations(v.getRawAttributes())), v.name, Type(v.type), init, ! v).setPos(pos).setType(v.type); } /** Create annotation trees from annotations. */ public List<JCAnnotation> Annotations(List<Attribute.Compound> attributes) { --- 859,869 ---- new JCVariableDecl( Modifiers(v.flags(), Annotations(v.getRawAttributes())), v.name, Type(v.type), init, ! v, null).setPos(pos).setType(v.type); } /** Create annotation trees from annotations. */ public List<JCAnnotation> Annotations(List<Attribute.Compound> attributes) {
< prev index next >