public static AFieldField newAFieldField(ILexNameToken tagname, String tag, PType type, boolean equalityAbstraction) { AFieldField result = new AFieldField(); result.setAccess(null); result.setTagname(tagname); result.setTag(tag); result.setType(type); result.setEqualityAbstraction(equalityAbstraction); return result; }
/** * Creates a new complete constructor {@code AFieldField} 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 AAccessSpecifierAccessSpecifier} node for the {@code access} child of this {@link AFieldField} node * @param tagname_ the {@link ILexNameToken} node for the {@code tagname} child of this {@link AFieldField} node * @param tag_ the {@link String} node for the {@code tag} child of this {@link AFieldField} node * @param type_ the {@link PType} <b>graph</a> node for the {@code type} child of this {@link AFieldField} node. * <i>The parent of this {@code type } will not be changed by adding it to this node.</i> * @param equalityAbstraction_ the {@link Boolean} node for the {@code equalityAbstraction} child of this {@link AFieldField} node */ public AFieldField(AAccessSpecifierAccessSpecifier access_, ILexNameToken tagname_, String tag_, PType type_, Boolean equalityAbstraction_) { super(); this.setAccess(access_); this.setTagname(tagname_); this.setTag(tag_); this.setType(type_); this.setEqualityAbstraction(equalityAbstraction_); }
@Override public PType caseAFieldField(AFieldField f, Newquestion question) throws AnalysisException { // Recursion defence done by the type f.setType(af.createPTypeAssistant().typeResolve(f.getType(), question.root, question.rootVisitor, question.question)); if (question.question.env.isVDMPP()) { if (f.getType() instanceof AFunctionType) { f.getTagname().setTypeQualifier(((AFunctionType) f.getType()).getParameters()); } else if (f.getType() instanceof AOperationType) { f.getTagname().setTypeQualifier(((AOperationType) f.getType()).getParameters()); } } return f.getType(); }