/** * Creates a new tree field only constructor {@code AThreadDefinition TAG=thread} 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 statement_ the {@link PStm} node for the {@code statement} child of this {@link AThreadDefinition} node * @param operationName_ the {@link ILexNameToken} node for the {@code operationName} child of this {@link AThreadDefinition} node * @param operationDef_ the {@link AExplicitOperationDefinition} node for the {@code operationDef} child of this {@link AThreadDefinition} node */ public AThreadDefinition(ILexLocation location_, NameScope nameScope_, Boolean used_, AAccessSpecifierAccessSpecifier access_, Pass pass_, PStm statement_, ILexNameToken operationName_, AExplicitOperationDefinition operationDef_) { super(location_,null,nameScope_,used_,null,access_,null,pass_); this.setStatement(statement_); this.setOperationName(operationName_); this.setOperationDef(operationDef_); }
/** * Creates a new complete constructor {@code AThreadDefinition} 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 statement_ the {@link PStm} node for the {@code statement} child of this {@link AThreadDefinition} node * @param operationName_ the {@link ILexNameToken} node for the {@code operationName} child of this {@link AThreadDefinition} node * @param operationDef_ the {@link AExplicitOperationDefinition} node for the {@code operationDef} child of this {@link AThreadDefinition} node */ public AThreadDefinition(ILexLocation location_, ILexNameToken name_, NameScope nameScope_, Boolean used_, SClassDefinition classDefinition_, AAccessSpecifierAccessSpecifier access_, PType type_, Pass pass_, PStm statement_, ILexNameToken operationName_, AExplicitOperationDefinition operationDef_) { super(location_,name_,nameScope_,used_,classDefinition_,access_,type_,pass_); this.setStatement(statement_); this.setOperationName(operationName_); this.setOperationDef(operationDef_); }
public static AThreadDefinition newAThreadDefinition(PStm statement) { AThreadDefinition result = new AThreadDefinition(); // Definition initialization initDefinition(result, Pass.DEFS, statement.getLocation(), null, NameScope.GLOBAL); result.setStatement(statement); // used to be a static method on LexNameToken - removed when we went to // interface result.setOperationName(new LexNameToken(statement.getLocation().getModule(), "thread", statement.getLocation())); result.getOperationName().setTypeQualifier(new Vector<PType>()); result.setAccess(af.createPAccessSpecifierAssistant().getProtected()); return result; }