/** * Creates a new complete constructor {@code AAccessSpecifierAccessSpecifier} 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 access_ the {@link PAccess} node for the {@code access} child of this {@link AAccessSpecifierAccessSpecifier} node * @param static_ the {@link TStatic} node for the {@code static} child of this {@link AAccessSpecifierAccessSpecifier} node * @param async_ the {@link TAsync} node for the {@code async} child of this {@link AAccessSpecifierAccessSpecifier} node * @param pure_ the {@link Boolean} node for the {@code pure} child of this {@link AAccessSpecifierAccessSpecifier} node */ public AAccessSpecifierAccessSpecifier(PAccess access_, TStatic static_, TAsync async_, Boolean pure_) { super(); this.setAccess(access_); this.setStatic(static_); this.setAsync(async_); this.setPure(pure_); }
public static AAccessSpecifierAccessSpecifier newAAccessSpecifierAccessSpecifier( PAccess access, boolean isStatic, boolean isAsync, boolean isPure) { AAccessSpecifierAccessSpecifier result = new AAccessSpecifierAccessSpecifier(); result.setAccess(access); result.setStatic(isStatic ? new TStatic() : null); result.setAsync(isAsync ? new TAsync() : null); result.setPure(isPure); return result; }
private List<PDefinition> readTypes() throws LexException, ParserException { checkFor(VDMToken.TYPES, 2013, "Expected 'types'"); List<PDefinition> list = new Vector<PDefinition>(); while (!newSection()) { try { AAccessSpecifierAccessSpecifier access = readAccessSpecifier(false, false); access.setStatic(new TStatic()); ATypeDefinition def = readTypeDefinition(); // Force all type defs (invs) to be static def.setAccess(access); list.add(def); if (!newSection()) { checkFor(VDMToken.SEMICOLON, 2078, "Missing ';' after type definition"); } } catch (LocatedException e) { report(e, afterArray, sectionArray); } } return list; }
access.setStatic(new TStatic()); def.setAccess(access); } else
access.setStatic(new TStatic()); PDefinition def = readValueDefinition(NameScope.GLOBAL);
public static ATypeDefinition newATypeDefinition(ILexNameToken name, SInvariantType type, PPattern invPattern, PExp invExpression, AEqRelation eqRelation, AOrdRelation ordRelation) { ATypeDefinition result = new ATypeDefinition(); initDefinition(result, Pass.TYPES, name.getLocation(), name, NameScope.TYPENAME); // Force all type defs (invs) to be static. There is no guarantee that // this will say here but is should result.getAccess().setStatic(new TStatic()); result.setInvType(type); result.setInvPattern(invPattern); result.setInvExpression(invExpression); result.setEqRelation(eqRelation); result.setOrdRelation(ordRelation); result.setType(type); if (type != null) { if (type.getDefinitions() == null) { type.setDefinitions(new LinkedList<PDefinition>()); } type.getDefinitions().add(result); } return result; }