/** * Creates a new tree field only constructor {@code AObjectPattern TAG=object} 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 ILexNameToken} node for the {@code classname} child of this {@link AObjectPattern} node * @param fields_ the {@link NodeList} node for the {@code fields} child of this {@link AObjectPattern} node */ public AObjectPattern(ILexLocation location_, List<? extends PDefinition> definitions_, Boolean resolved_, ILexNameToken classname_, List<? extends ANamePatternPair> fields_) { super(location_,definitions_,resolved_); this.setClassname(classname_); this.setFields(fields_); }
/** * Creates a new complete constructor {@code AObjectPattern} 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 ILexNameToken} node for the {@code classname} child of this {@link AObjectPattern} node * @param fields_ the {@link NodeList} node for the {@code fields} child of this {@link AObjectPattern} node * @param type_ the {@link PType} <b>graph</a> node for the {@code type} child of this {@link AObjectPattern} node. * <i>The parent of this {@code type } will not be changed by adding it to this node.</i> */ public AObjectPattern(ILexLocation location_, List<? extends PDefinition> definitions_, Boolean resolved_, ILexNameToken classname_, List<? extends ANamePatternPair> fields_, PType type_) { super(location_,definitions_,resolved_); this.setClassname(classname_); this.setFields(fields_); this.setType(type_); }
public static AObjectPattern newAObjectPattern(ILexNameToken classname, List<ANamePatternPair> list) { AObjectPattern result = new AObjectPattern(); initPattern(result, classname.getLocation()); result.setFields(list); result.setClassname(classname); result.setType(AstFactory.getAUnresolvedType(classname)); return result; }