/** * Creates a new tree field only constructor {@code ANewExp TAG=new} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param className_ the {@link ILexIdentifierToken} node for the {@code className} child of this {@link ANewExp} node * @param args_ the {@link NodeList} node for the {@code args} child of this {@link ANewExp} node */ public ANewExp(ILexLocation location_, ILexIdentifierToken className_, List<? extends PExp> args_) { super(null,location_); this.setClassName(className_); this.setArgs(args_); }
/** * Creates a new complete constructor {@code ANewExp} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param className_ the {@link ILexIdentifierToken} node for the {@code className} child of this {@link ANewExp} node * @param args_ the {@link NodeList} node for the {@code args} child of this {@link ANewExp} node * @param classdef_ the {@link SClassDefinition} <b>graph</a> node for the {@code classdef} child of this {@link ANewExp} node. * <i>The parent of this {@code classdef } will not be changed by adding it to this node.</i> * @param ctorDefinition_ the {@link PDefinition} <b>graph</a> node for the {@code ctorDefinition} child of this {@link ANewExp} node. * <i>The parent of this {@code ctorDefinition } will not be changed by adding it to this node.</i> */ public ANewExp(PType type_, ILexLocation location_, ILexIdentifierToken className_, List<? extends PExp> args_, SClassDefinition classdef_, PDefinition ctorDefinition_) { super(type_,location_); this.setClassName(className_); this.setArgs(args_); this.setClassdef(classdef_); this.setCtorDefinition(ctorDefinition_); }
public static ANewExp newANewExp(ILexLocation start, ILexIdentifierToken classname, List<PExp> args) { ANewExp result = new ANewExp(); initExpression(result, start); result.setClassName(classname); result.setArgs(args); classname.getLocation().executable(true); return result; }