/** * Creates a new tree field only constructor {@code ANamedTraceDefinition TAG=namedTrace} 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 pathname_ the {@link List} node for the {@code pathname} child of this {@link ANamedTraceDefinition} node * @param terms_ the {@link NodeList} node for the {@code terms} child of this {@link ANamedTraceDefinition} node */ public ANamedTraceDefinition(ILexLocation location_, NameScope nameScope_, Boolean used_, AAccessSpecifierAccessSpecifier access_, Pass pass_, List<? extends ClonableString> pathname_, List<? extends ATraceDefinitionTerm> terms_) { super(location_,null,nameScope_,used_,null,access_,null,pass_); this.setPathname(pathname_); this.setTerms(terms_); }
/** * Creates a new complete constructor {@code ANamedTraceDefinition} 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 pathname_ the {@link List} node for the {@code pathname} child of this {@link ANamedTraceDefinition} node * @param terms_ the {@link NodeList} node for the {@code terms} child of this {@link ANamedTraceDefinition} node */ public ANamedTraceDefinition(ILexLocation location_, ILexNameToken name_, NameScope nameScope_, Boolean used_, SClassDefinition classDefinition_, AAccessSpecifierAccessSpecifier access_, PType type_, Pass pass_, List<? extends ClonableString> pathname_, List<? extends ATraceDefinitionTerm> terms_) { super(location_,name_,nameScope_,used_,classDefinition_,access_,type_,pass_); this.setPathname(pathname_); this.setTerms(terms_); }
public static ANamedTraceDefinition newANamedTraceDefinition( ILexLocation location, List<String> pathname, List<ATraceDefinitionTerm> terms) { ANamedTraceDefinition result = new ANamedTraceDefinition(); // Definition initialization initDefinition(result, Pass.DEFS, location, new LexNameToken(location.getModule(), Utils.listToString(pathname, "_"), location), NameScope.GLOBAL); List<ClonableString> namesClonable = new Vector<ClonableString>(); for (String string : pathname) { namesClonable.add(new ClonableString(string)); } // List<ATraceDefinitionTerm> tracesTerms = new // Vector<ATraceDefinitionTerm>(); // for (ATraceDefinitionTerm list : terms) // { // tracesTerms.add( new ATraceDefinitionTerm(list)); // } result.setPathname(namesClonable); result.setTerms(terms); result.setAccess(af.createPAccessSpecifierAssistant().getPublic()); result.setType(newAOperationType(location)); return result; }