diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/OpenAPIObject.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/OpenAPIObject.class index bd203fcace4dd67e3b56412e9af854719f074607..38ba44f195165022f18236173cae8a8c8c5d1623 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/OpenAPIObject.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/OpenAPIObject.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/OperationObject.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/OperationObject.class index 9519a3ae51aabf8a4071e39c63f3f40f9c1f1c48..719215edc23435ec2455f733e7c2bc2d65ee53c7 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/OperationObject.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/OperationObject.class differ diff --git a/src/gen-res/BuildInfo.properties b/src/gen-res/BuildInfo.properties index bd0d29ddafffc2e1da247666712da9d7070f1792..94287eeba4005637e94df22387a33a29432c8472 100644 --- a/src/gen-res/BuildInfo.properties +++ b/src/gen-res/BuildInfo.properties @@ -1,7 +1,7 @@ -#Sun, 15 Aug 2021 01:26:00 +0900 +#Fri, 10 Sep 2021 20:26:24 +0900 moduleId=openapispecification moduleName=null moduleVariant=null -timestamp=2021-08-15T01\:26Z -build.date=2021-08-15 +timestamp=2021-09-10T20\:26Z +build.date=2021-09-10 diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ASTNode.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ASTNode.java deleted file mode 100644 index 748606c5ba2679316deca4fee6e31d481fd0cb6e..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ASTNode.java +++ /dev/null @@ -1,495 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @astdecl ASTNode; - * @production ASTNode; - - */ -public class ASTNode<T extends ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public ASTNode() { - super(); - init$Children(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:11 - */ - public void init$Children() { - } - /** - * Cached child index. Child indices are assumed to never change (AST should - * not change after construction). - * @apilevel internal - * @declaredat ASTNode:18 - */ - private int childIndex = -1; - /** @apilevel low-level - * @declaredat ASTNode:21 - */ - public int getIndexOfChild(ASTNode node) { - if (node == null) { - return -1; - } - if (node.childIndex >= 0) { - return node.childIndex; - } - for (int i = 0; children != null && i < children.length; i++) { - if (getChild(i) == node) { - node.childIndex = i; - return i; - } - } - return -1; - } - /** @apilevel internal - * @declaredat ASTNode:38 - */ - public static final boolean generatedWithCacheCycle = true; - /** @apilevel low-level - * @declaredat ASTNode:41 - */ - protected ASTNode parent; - /** @apilevel low-level - * @declaredat ASTNode:44 - */ - protected ASTNode[] children; - /** @apilevel internal - * @declaredat ASTNode:48 - */ - private static ASTState state = new ASTState(); - /** @apilevel internal - * @declaredat ASTNode:51 - */ - public final ASTState state() { - return state; - } - /** @apilevel internal - * @declaredat ASTNode:56 - */ - public final static ASTState resetState() { - return state = new ASTState(); - } - /** - * @return an iterator that can be used to iterate over the children of this node. - * The iterator does not allow removing children. - * @declaredat ASTNode:65 - */ - public java.util.Iterator<T> astChildIterator() { - return new java.util.Iterator<T>() { - private int index = 0; - - @Override - public boolean hasNext() { - return index < getNumChild(); - } - - @Override - public T next() { - return hasNext() ? (T) getChild(index++) : null; - } - - @Override - public void remove() { - throw new UnsupportedOperationException(); - } - }; - } - /** @return an object that can be used to iterate over the children of this node - * @declaredat ASTNode:87 - */ - public Iterable<T> astChildren() { - return new Iterable<T>() { - @Override - public java.util.Iterator<T> iterator() { - return astChildIterator(); - } - }; - } - /** @apilevel low-level - * @declaredat ASTNode:97 - */ - public T getChild(int i) { - ASTNode node = this.getChildNoTransform(i); - if (node != null && node.mayHaveRewrite()) { - ASTNode rewritten = node.rewrittenNode(); - if (rewritten != node) { - rewritten.setParent(this); - node = rewritten; - } - } - return (T) node; - } - /** @apilevel low-level - * @declaredat ASTNode:109 - */ - public void addChild(T node) { - setChild(node, getNumChildNoTransform()); - } - /** - * Gets a child without triggering rewrites. - * @apilevel low-level - * @declaredat ASTNode:116 - */ - public T getChildNoTransform(int i) { - if (children == null) { - return null; - } - T child = (T) children[i]; - return child; - } - /** @apilevel low-level - * @declaredat ASTNode:124 - */ - protected int numChildren; - /** @apilevel low-level - * @declaredat ASTNode:127 - */ - protected int numChildren() { - return numChildren; - } - /** @apilevel low-level - * @declaredat ASTNode:132 - */ - public int getNumChild() { - return numChildren(); - } - /** - * Behaves like getNumChild, but does not invoke AST transformations (rewrites). - * @apilevel low-level - * @declaredat ASTNode:140 - */ - public final int getNumChildNoTransform() { - return numChildren(); - } - /** @apilevel low-level - * @declaredat ASTNode:144 - */ - public void setChild(ASTNode node, int i) { - if (children == null) { - children = new ASTNode[(i + 1 > 4 || !(this instanceof JastAddList)) ? i + 1 : 4]; - } else if (i >= children.length) { - ASTNode c[] = new ASTNode[i << 1]; - System.arraycopy(children, 0, c, 0, children.length); - children = c; - } - children[i] = node; - if (i >= numChildren) { - numChildren = i+1; - } - if (node != null) { - node.setParent(this); - node.childIndex = i; - } - } - /** @apilevel low-level - * @declaredat ASTNode:162 - */ - public void insertChild(ASTNode node, int i) { - if (children == null) { - children = new ASTNode[(i + 1 > 4 || !(this instanceof JastAddList)) ? i + 1 : 4]; - children[i] = node; - } else { - ASTNode c[] = new ASTNode[children.length + 1]; - System.arraycopy(children, 0, c, 0, i); - c[i] = node; - if (i < children.length) { - System.arraycopy(children, i, c, i+1, children.length-i); - for(int j = i+1; j < c.length; ++j) { - if (c[j] != null) { - c[j].childIndex = j; - } - } - } - children = c; - } - numChildren++; - if (node != null) { - node.setParent(this); - node.childIndex = i; - } - } - /** @apilevel low-level - * @declaredat ASTNode:187 - */ - public void removeChild(int i) { - if (children != null) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child.parent = null; - child.childIndex = -1; - } - // Adding a check of this instance to make sure its a List, a move of children doesn't make - // any sense for a node unless its a list. Also, there is a problem if a child of a non-List node is removed - // and siblings are moved one step to the right, with null at the end. - if (this instanceof JastAddList || this instanceof Opt) { - System.arraycopy(children, i+1, children, i, children.length-i-1); - children[children.length-1] = null; - numChildren--; - // fix child indices - for(int j = i; j < numChildren; ++j) { - if (children[j] != null) { - child = (ASTNode) children[j]; - child.childIndex = j; - } - } - } else { - children[i] = null; - } - } - } - /** @apilevel low-level - * @declaredat ASTNode:214 - */ - public ASTNode getParent() { - return (ASTNode) parent; - } - /** @apilevel low-level - * @declaredat ASTNode:218 - */ - public void setParent(ASTNode node) { - parent = node; - } - /** - * Line and column information. - * @declaredat ASTNode:280 - */ - protected int startLine; - /** - * @declaredat ASTNode:281 - */ - protected short startColumn; - /** - * @declaredat ASTNode:282 - */ - protected int endLine; - /** - * @declaredat ASTNode:283 - */ - protected short endColumn; - /** - * @declaredat ASTNode:285 - */ - public int getStartLine() { - return startLine; - } - /** - * @declaredat ASTNode:288 - */ - public short getStartColumn() { - return startColumn; - } - /** - * @declaredat ASTNode:291 - */ - public int getEndLine() { - return endLine; - } - /** - * @declaredat ASTNode:294 - */ - public short getEndColumn() { - return endColumn; - } - /** - * @declaredat ASTNode:298 - */ - public void setStart(int startLine, short startColumn) { - this.startLine = startLine; - this.startColumn = startColumn; - } - /** - * @declaredat ASTNode:302 - */ - public void setEnd(int endLine, short endColumn) { - this.endLine = endLine; - this.endColumn = endColumn; - } - /** - * @apilevel internal - * @declaredat ASTNode:314 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel low-level - * @declaredat ASTNode:318 - */ - public void flushTreeCache() { - flushCache(); - if (children != null) { - for (int i = 0; i < children.length; i++) { - if (children[i] != null) { - ((ASTNode) children[i]).flushTreeCache(); - } - } - } - } - /** @apilevel low-level - * @declaredat ASTNode:329 - */ - public void flushCache() { - flushAttrAndCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:333 - */ - public void flushAttrAndCollectionCache() { - flushAttrCache(); - flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:338 - */ - public void flushAttrCache() { - } - /** @apilevel internal - * @declaredat ASTNode:341 - */ - public void flushCollectionCache() { - } - /** @apilevel internal - * @declaredat ASTNode:344 - */ - public ASTNode<T> clone() throws CloneNotSupportedException { - ASTNode node = (ASTNode) super.clone(); - node.flushAttrAndCollectionCache(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:350 - */ - public ASTNode<T> copy() { - try { - ASTNode node = (ASTNode) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:369 - */ - @Deprecated - public ASTNode<T> fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:379 - */ - public ASTNode<T> treeCopyNoTransform() { - ASTNode tree = (ASTNode) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:399 - */ - public ASTNode<T> treeCopy() { - ASTNode tree = (ASTNode) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Performs a full traversal of the tree using getChild to trigger rewrites - * @apilevel low-level - * @declaredat ASTNode:416 - */ - public void doFullTraversal() { - for (int i = 0; i < getNumChild(); i++) { - getChild(i).doFullTraversal(); - } - } - /** @apilevel internal - * @declaredat ASTNode:422 - */ - protected boolean is$Equal(ASTNode n1, ASTNode n2) { - if (n1 == null && n2 == null) return true; - if (n1 == null || n2 == null) return false; - return n1.is$Equal(n2); - } - /** @apilevel internal - * @declaredat ASTNode:428 - */ - protected boolean is$Equal(ASTNode node) { - if (getClass() != node.getClass()) { - return false; - } - if (numChildren != node.numChildren) { - return false; - } - for (int i = 0; i < numChildren; i++) { - if (children[i] == null && node.children[i] != null) { - return false; - } - if (!((ASTNode)children[i]).is$Equal(((ASTNode)node.children[i]))) { - return false; - } - } - return true; - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return this; - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -public ASTNode rewrittenNode() { throw new Error("rewrittenNode is undefined for ASTNode"); } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ASTNodeAnnotation.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ASTNodeAnnotation.java deleted file mode 100644 index d90ccf90a4560217511f4593c8eff675f6a5e885..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ASTNodeAnnotation.java +++ /dev/null @@ -1,94 +0,0 @@ -package de.tudresden.inf.st.openapi.ast; - -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast class - * @declaredat ASTNode:221 - */ -public class ASTNodeAnnotation extends java.lang.Object { - - @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) - @java.lang.annotation.Target(java.lang.annotation.ElementType.METHOD) - @java.lang.annotation.Documented - public @interface Child { - String name(); - } - - - - @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) - @java.lang.annotation.Target(java.lang.annotation.ElementType.METHOD) - @java.lang.annotation.Documented - public @interface ListChild { - String name(); - } - - - - @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) - @java.lang.annotation.Target(java.lang.annotation.ElementType.METHOD) - @java.lang.annotation.Documented - public @interface OptChild { - String name(); - } - - - - @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) - @java.lang.annotation.Target(java.lang.annotation.ElementType.METHOD) - @java.lang.annotation.Documented - public @interface Token { - String name(); - } - - - - @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) - @java.lang.annotation.Target(java.lang.annotation.ElementType.METHOD) - @java.lang.annotation.Documented - public @interface Attribute { - Kind kind(); - boolean isCircular() default false; - boolean isNTA() default false; - } - - - public enum Kind { SYN, INH, COLL } - - - - @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) - @java.lang.annotation.Target(java.lang.annotation.ElementType.METHOD) - @java.lang.annotation.Documented - public @interface Source { - String aspect() default ""; - String declaredAt() default ""; - } - - - - @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) - @java.lang.annotation.Target(java.lang.annotation.ElementType.CONSTRUCTOR) - @java.lang.annotation.Documented - public @interface Constructor{ - String[] name(); - String[] type(); - String[] kind(); - } - - -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ASTState.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ASTState.java deleted file mode 100644 index c4add0eee267bd626656376e97b51f25af6ee1fb..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ASTState.java +++ /dev/null @@ -1,255 +0,0 @@ -package de.tudresden.inf.st.openapi.ast; - -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** @apilevel internal - * @ast class - * @declaredat ASTState:34 - */ -public class ASTState extends java.lang.Object { - - /** - * This class stores an attribute value tagged with an iteration ID for - * a circular evaluation. - * - * @apilevel internal - */ - protected static class CircularValue { - Object value; - Cycle cycle; - } - - - - /** - * Instances of this class are used to uniquely identify circular evaluation iterations. - * These iteration ID objects are created for each new fixed-point iteration in - * a circular evaluation. - * - * @apilevel internal - */ - protected static class Cycle { - } - - - - /** - * The iteration ID used outside of circular evaluation. - * - * <p>This is the iteration ID when no circular evaluation is ongoing. - */ - public static final Cycle NON_CYCLE = new Cycle(); - - - - /** - * Tracks the state of the current circular evaluation. This class defines a - * stack structure where the next element on the stack is pointed to by the - * {@code next} field. - * - * @apilevel internal - */ - protected static class CircleState { - final CircleState next; - boolean change = false; - - /** Evaluation depth of lazy attributes. */ - int lazyAttribute = 0; - - boolean lastCycle = false; - - /** Cycle ID of the latest cycle in this circular evaluation. */ - Cycle cycle = NON_CYCLE; - - - protected CircleState(CircleState next) { - this.next = next; - } - } - - - - - /** Sentinel circle state representing non-circular evaluation. */ - private static final CircleState CIRCLE_BOTTOM = new CircleState(null); - - - - /** - * Current circular state. - * @apilevel internal - */ - private CircleState circle = CIRCLE_BOTTOM; - - - - /** @apilevel internal */ - protected boolean inCircle() { - return circle != CIRCLE_BOTTOM; - } - - - - /** @apilevel internal */ - protected boolean calledByLazyAttribute() { - return circle.lazyAttribute > 0; - } - - - - /** @apilevel internal */ - protected void enterLazyAttribute() { - circle.lazyAttribute += 1; - } - - - - /** @apilevel internal */ - protected void leaveLazyAttribute() { - circle.lazyAttribute -= 1; - } - - - - /** @apilevel internal */ - protected void enterCircle() { - CircleState next = new CircleState(circle); - circle = next; - } - - - - - /** - * Maps circular attribute to last evaluated cycle index. - * @apilevel internal - */ - private java.util.Map<Object, Integer> visited = new java.util.IdentityHashMap<Object, Integer>(); - - - - /** - * Check if attribute was already visited during the current cycle. - * @apilevel internal - * @return {@code true} if the attribute was already visited. - */ - protected boolean checkAndSetVisited(Object attribute, int cycle) { - boolean result = visited.containsKey(attribute) && visited.get(attribute) == cycle; - visited.put(attribute, cycle); - return result; - } - - - - /** - * Reset visited cycle tracking for this thread. - * @apilevel internal - */ - protected void clearVisited() { - visited.clear(); - } - - - - // TODO(joqvist): may not be necessary. - /** - * Reset visit tracker for a single attribute. - * @apilevel internal - */ - protected void resetVisited(Object attribute) { - visited.remove(attribute); - } - - - - /** @apilevel internal */ - protected void leaveCircle() { - circle = circle.next; - } - - - - /** @apilevel internal */ - protected Cycle nextCycle() { - Cycle cycle = new Cycle(); - circle.cycle = cycle; - return cycle; - } - - - - /** @apilevel internal */ - protected Cycle cycle() { - return circle.cycle; - } - - - - /** @apilevel internal */ - protected CircleState currentCircle() { - return circle; - } - - - - - /** @apilevel internal */ - protected void setChangeInCycle() { - circle.change = true; - } - - - - /** @apilevel internal */ - protected boolean testAndClearChangeInCycle() { - boolean change = circle.change; - circle.change = false; - return change; - } - - - - /** @apilevel internal */ - protected boolean changeInCycle() { - return circle.change; - } - - - - /** @apilevel internal */ - protected boolean lastCycle() { - return circle.lastCycle; - } - - - - /** @apilevel internal */ - protected void startLastCycle() { - circle.lastCycle = true; - } - - - - protected ASTState() { - } - - public void reset() { - // Reset circular evaluation state. - circle = CIRCLE_BOTTOM; - } - - -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/AdditionalProperties.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/AdditionalProperties.java deleted file mode 100644 index 8b9f001df9b1d3c5a42e4e4a2e8183405760d7e8..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/AdditionalProperties.java +++ /dev/null @@ -1,193 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:92 - * @astdecl AdditionalProperties : ASTNode ::= SchemaObject; - * @production AdditionalProperties : {@link ASTNode} ::= <span class="component">{@link SchemaObject}</span>; - - */ -public class AdditionalProperties extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public AdditionalProperties() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"SchemaObject"}, - type = {"SchemaObject"}, - kind = {"Child"} - ) - public AdditionalProperties(SchemaObject p0) { - setChild(p0, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public AdditionalProperties clone() throws CloneNotSupportedException { - AdditionalProperties node = (AdditionalProperties) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public AdditionalProperties copy() { - try { - AdditionalProperties node = (AdditionalProperties) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public AdditionalProperties fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public AdditionalProperties treeCopyNoTransform() { - AdditionalProperties tree = (AdditionalProperties) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public AdditionalProperties treeCopy() { - AdditionalProperties tree = (AdditionalProperties) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node); - } - /** - * Replaces the SchemaObject child. - * @param node The new node to replace the SchemaObject child. - * @apilevel high-level - */ - public void setSchemaObject(SchemaObject node) { - setChild(node, 0); - } - /** - * Retrieves the SchemaObject child. - * @return The current node used as the SchemaObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="SchemaObject") - public SchemaObject getSchemaObject() { - return (SchemaObject) getChild(0); - } - /** - * Retrieves the SchemaObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the SchemaObject child. - * @apilevel low-level - */ - public SchemaObject getSchemaObjectNoTransform() { - return (SchemaObject) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/AllOfSchema.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/AllOfSchema.java deleted file mode 100644 index 33b9b06f6d0a23a781c45d5bd903935a7fd51289..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/AllOfSchema.java +++ /dev/null @@ -1,193 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:98 - * @astdecl AllOfSchema : ASTNode ::= SchemaObject; - * @production AllOfSchema : {@link ASTNode} ::= <span class="component">{@link SchemaObject}</span>; - - */ -public class AllOfSchema extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public AllOfSchema() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"SchemaObject"}, - type = {"SchemaObject"}, - kind = {"Child"} - ) - public AllOfSchema(SchemaObject p0) { - setChild(p0, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public AllOfSchema clone() throws CloneNotSupportedException { - AllOfSchema node = (AllOfSchema) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public AllOfSchema copy() { - try { - AllOfSchema node = (AllOfSchema) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public AllOfSchema fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public AllOfSchema treeCopyNoTransform() { - AllOfSchema tree = (AllOfSchema) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public AllOfSchema treeCopy() { - AllOfSchema tree = (AllOfSchema) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node); - } - /** - * Replaces the SchemaObject child. - * @param node The new node to replace the SchemaObject child. - * @apilevel high-level - */ - public void setSchemaObject(SchemaObject node) { - setChild(node, 0); - } - /** - * Retrieves the SchemaObject child. - * @return The current node used as the SchemaObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="SchemaObject") - public SchemaObject getSchemaObject() { - return (SchemaObject) getChild(0); - } - /** - * Retrieves the SchemaObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the SchemaObject child. - * @apilevel low-level - */ - public SchemaObject getSchemaObjectNoTransform() { - return (SchemaObject) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/AnyOfSchema.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/AnyOfSchema.java deleted file mode 100644 index 539b54e049e7b4132097b2d3f32340811252d6ce..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/AnyOfSchema.java +++ /dev/null @@ -1,193 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:99 - * @astdecl AnyOfSchema : ASTNode ::= SchemaObject; - * @production AnyOfSchema : {@link ASTNode} ::= <span class="component">{@link SchemaObject}</span>; - - */ -public class AnyOfSchema extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public AnyOfSchema() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"SchemaObject"}, - type = {"SchemaObject"}, - kind = {"Child"} - ) - public AnyOfSchema(SchemaObject p0) { - setChild(p0, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public AnyOfSchema clone() throws CloneNotSupportedException { - AnyOfSchema node = (AnyOfSchema) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public AnyOfSchema copy() { - try { - AnyOfSchema node = (AnyOfSchema) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public AnyOfSchema fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public AnyOfSchema treeCopyNoTransform() { - AnyOfSchema tree = (AnyOfSchema) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public AnyOfSchema treeCopy() { - AnyOfSchema tree = (AnyOfSchema) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node); - } - /** - * Replaces the SchemaObject child. - * @param node The new node to replace the SchemaObject child. - * @apilevel high-level - */ - public void setSchemaObject(SchemaObject node) { - setChild(node, 0); - } - /** - * Retrieves the SchemaObject child. - * @return The current node used as the SchemaObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="SchemaObject") - public SchemaObject getSchemaObject() { - return (SchemaObject) getChild(0); - } - /** - * Retrieves the SchemaObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the SchemaObject child. - * @apilevel low-level - */ - public SchemaObject getSchemaObjectNoTransform() { - return (SchemaObject) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/AttributeValue.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/AttributeValue.java deleted file mode 100644 index 68199b9472be4df383328180bce895dc3625744b..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/AttributeValue.java +++ /dev/null @@ -1,62 +0,0 @@ -package de.tudresden.inf.st.openapi.ast; - -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** Wrapper class for storing nullable attribute values. - * @ast class - * @declaredat ASTState:2 - */ -public class AttributeValue<T> extends java.lang.Object { - - /** - * This singleton object is an illegal, unused, attribute value. - * It represents that an attribute has not been memoized, or that - * a circular attribute approximation has not been initialized. - */ - public static final Object NONE = new Object(); - - - - public final T value; - - - - public AttributeValue(T value) { - this.value = value; - } - - - - public static <V> boolean equals(AttributeValue<V> v1, AttributeValue<V> v2) { - if (v1 == null || v2 == null) { - return v1 == v2; - } else { - return equals(v1.value, v2.value); - } - } - - - - public static <V> boolean equals(V v1, V v2) { - if (v1 == null || v2 == null) { - return v1 == v2; - } else { - return v1 == v2 || v1.equals(v2); - } - } - - -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/AuthorizationCode.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/AuthorizationCode.java deleted file mode 100644 index b3a1e113fd5fa9a69cd43bf962d51d3af1f7a179..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/AuthorizationCode.java +++ /dev/null @@ -1,193 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:117 - * @astdecl AuthorizationCode : ASTNode ::= OAuthFlowObject; - * @production AuthorizationCode : {@link ASTNode} ::= <span class="component">{@link OAuthFlowObject}</span>; - - */ -public class AuthorizationCode extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public AuthorizationCode() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"OAuthFlowObject"}, - type = {"OAuthFlowObject"}, - kind = {"Child"} - ) - public AuthorizationCode(OAuthFlowObject p0) { - setChild(p0, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public AuthorizationCode clone() throws CloneNotSupportedException { - AuthorizationCode node = (AuthorizationCode) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public AuthorizationCode copy() { - try { - AuthorizationCode node = (AuthorizationCode) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public AuthorizationCode fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public AuthorizationCode treeCopyNoTransform() { - AuthorizationCode tree = (AuthorizationCode) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public AuthorizationCode treeCopy() { - AuthorizationCode tree = (AuthorizationCode) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node); - } - /** - * Replaces the OAuthFlowObject child. - * @param node The new node to replace the OAuthFlowObject child. - * @apilevel high-level - */ - public void setOAuthFlowObject(OAuthFlowObject node) { - setChild(node, 0); - } - /** - * Retrieves the OAuthFlowObject child. - * @return The current node used as the OAuthFlowObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="OAuthFlowObject") - public OAuthFlowObject getOAuthFlowObject() { - return (OAuthFlowObject) getChild(0); - } - /** - * Retrieves the OAuthFlowObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the OAuthFlowObject child. - * @apilevel low-level - */ - public OAuthFlowObject getOAuthFlowObjectNoTransform() { - return (OAuthFlowObject) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/CallbackObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/CallbackObject.java deleted file mode 100644 index bca9fb150d0788033369043f1a0be7d774eed777..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/CallbackObject.java +++ /dev/null @@ -1,441 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:73 - * @astdecl CallbackObject : ASTNode ::= Expression* Extension* <Ref:String>; - * @production CallbackObject : {@link ASTNode} ::= <span class="component">{@link Expression}*</span> <span class="component">{@link Extension}*</span> <span class="component"><Ref:String></span>; - - */ -public class CallbackObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:536 - */ - public static Callback composeCallback (CallbackObject callbackObject){ - Callback callback = new Callback(); - - if( callbackObject.getNumExpression() != 0 ){ - Map<String, Path> paths = new HashMap<>(); - for( Expression e : callbackObject.getExpressions() ) - paths.put( e.getName(), PathItem.composePath( e.getPathItem() )); - callback.setCallbackPaths(paths); - } - - return callback; - } - /** - * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:537 - */ - public static CallbackObject parseCallback(Callback callback){ - CallbackObject callbackObject = new CallbackObject(); - - if( callback.getCallbackPaths() != null ){ - for( String key : callback.getCallbackPaths().keySet() ) - callbackObject.addExpression(new Expression(key, PathItem.parsePath(callback.getCallbackPath(key)))); - } - - return callbackObject; - } - /** - * @declaredat ASTNode:1 - */ - public CallbackObject() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[2]; - setChild(new JastAddList(), 0); - setChild(new JastAddList(), 1); - } - /** - * @declaredat ASTNode:15 - */ - @ASTNodeAnnotation.Constructor( - name = {"Expression", "Extension", "Ref"}, - type = {"JastAddList<Expression>", "JastAddList<Extension>", "String"}, - kind = {"List", "List", "Token"} - ) - public CallbackObject(JastAddList<Expression> p0, JastAddList<Extension> p1, String p2) { - setChild(p0, 0); - setChild(p1, 1); - setRef(p2); - } - /** @apilevel low-level - * @declaredat ASTNode:26 - */ - protected int numChildren() { - return 2; - } - /** - * @apilevel internal - * @declaredat ASTNode:32 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:44 - */ - public CallbackObject clone() throws CloneNotSupportedException { - CallbackObject node = (CallbackObject) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:49 - */ - public CallbackObject copy() { - try { - CallbackObject node = (CallbackObject) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:68 - */ - @Deprecated - public CallbackObject fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:78 - */ - public CallbackObject treeCopyNoTransform() { - CallbackObject tree = (CallbackObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:98 - */ - public CallbackObject treeCopy() { - CallbackObject tree = (CallbackObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:112 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Ref == ((CallbackObject) node).tokenString_Ref); - } - /** - * Replaces the Expression list. - * @param list The new list node to be used as the Expression list. - * @apilevel high-level - */ - public void setExpressionList(JastAddList<Expression> list) { - setChild(list, 0); - } - /** - * Retrieves the number of children in the Expression list. - * @return Number of children in the Expression list. - * @apilevel high-level - */ - public int getNumExpression() { - return getExpressionList().getNumChild(); - } - /** - * Retrieves the number of children in the Expression list. - * Calling this method will not trigger rewrites. - * @return Number of children in the Expression list. - * @apilevel low-level - */ - public int getNumExpressionNoTransform() { - return getExpressionListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the Expression list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the Expression list. - * @apilevel high-level - */ - public Expression getExpression(int i) { - return (Expression) getExpressionList().getChild(i); - } - /** - * Check whether the Expression list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasExpression() { - return getExpressionList().getNumChild() != 0; - } - /** - * Append an element to the Expression list. - * @param node The element to append to the Expression list. - * @apilevel high-level - */ - public void addExpression(Expression node) { - JastAddList<Expression> list = (parent == null) ? getExpressionListNoTransform() : getExpressionList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addExpressionNoTransform(Expression node) { - JastAddList<Expression> list = getExpressionListNoTransform(); - list.addChild(node); - } - /** - * Replaces the Expression list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setExpression(Expression node, int i) { - JastAddList<Expression> list = getExpressionList(); - list.setChild(node, i); - } - /** - * Retrieves the Expression list. - * @return The node representing the Expression list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="Expression") - public JastAddList<Expression> getExpressionList() { - JastAddList<Expression> list = (JastAddList<Expression>) getChild(0); - return list; - } - /** - * Retrieves the Expression list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the Expression list. - * @apilevel low-level - */ - public JastAddList<Expression> getExpressionListNoTransform() { - return (JastAddList<Expression>) getChildNoTransform(0); - } - /** - * @return the element at index {@code i} in the Expression list without - * triggering rewrites. - */ - public Expression getExpressionNoTransform(int i) { - return (Expression) getExpressionListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the Expression list. - * @return The node representing the Expression list. - * @apilevel high-level - */ - public JastAddList<Expression> getExpressions() { - return getExpressionList(); - } - /** - * Retrieves the Expression list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the Expression list. - * @apilevel low-level - */ - public JastAddList<Expression> getExpressionsNoTransform() { - return getExpressionListNoTransform(); - } - /** - * Replaces the Extension list. - * @param list The new list node to be used as the Extension list. - * @apilevel high-level - */ - public void setExtensionList(JastAddList<Extension> list) { - setChild(list, 1); - } - /** - * Retrieves the number of children in the Extension list. - * @return Number of children in the Extension list. - * @apilevel high-level - */ - public int getNumExtension() { - return getExtensionList().getNumChild(); - } - /** - * Retrieves the number of children in the Extension list. - * Calling this method will not trigger rewrites. - * @return Number of children in the Extension list. - * @apilevel low-level - */ - public int getNumExtensionNoTransform() { - return getExtensionListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the Extension list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the Extension list. - * @apilevel high-level - */ - public Extension getExtension(int i) { - return (Extension) getExtensionList().getChild(i); - } - /** - * Check whether the Extension list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasExtension() { - return getExtensionList().getNumChild() != 0; - } - /** - * Append an element to the Extension list. - * @param node The element to append to the Extension list. - * @apilevel high-level - */ - public void addExtension(Extension node) { - JastAddList<Extension> list = (parent == null) ? getExtensionListNoTransform() : getExtensionList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addExtensionNoTransform(Extension node) { - JastAddList<Extension> list = getExtensionListNoTransform(); - list.addChild(node); - } - /** - * Replaces the Extension list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setExtension(Extension node, int i) { - JastAddList<Extension> list = getExtensionList(); - list.setChild(node, i); - } - /** - * Retrieves the Extension list. - * @return The node representing the Extension list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="Extension") - public JastAddList<Extension> getExtensionList() { - JastAddList<Extension> list = (JastAddList<Extension>) getChild(1); - return list; - } - /** - * Retrieves the Extension list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the Extension list. - * @apilevel low-level - */ - public JastAddList<Extension> getExtensionListNoTransform() { - return (JastAddList<Extension>) getChildNoTransform(1); - } - /** - * @return the element at index {@code i} in the Extension list without - * triggering rewrites. - */ - public Extension getExtensionNoTransform(int i) { - return (Extension) getExtensionListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the Extension list. - * @return The node representing the Extension list. - * @apilevel high-level - */ - public JastAddList<Extension> getExtensions() { - return getExtensionList(); - } - /** - * Retrieves the Extension list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the Extension list. - * @apilevel low-level - */ - public JastAddList<Extension> getExtensionsNoTransform() { - return getExtensionListNoTransform(); - } - /** - * Replaces the lexeme Ref. - * @param value The new value for the lexeme Ref. - * @apilevel high-level - */ - public void setRef(String value) { - tokenString_Ref = value; - } - /** @apilevel internal - */ - protected String tokenString_Ref; - /** - * Retrieves the value for the lexeme Ref. - * @return The value for the lexeme Ref. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Ref") - public String getRef() { - return tokenString_Ref != null ? tokenString_Ref : ""; - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/CallbackTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/CallbackTuple.java deleted file mode 100644 index bb11ead2eb2a532479a0624ec1b05941de4231dc..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/CallbackTuple.java +++ /dev/null @@ -1,214 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:31 - * @astdecl CallbackTuple : ASTNode ::= <Key:String> CallbackObject; - * @production CallbackTuple : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component">{@link CallbackObject}</span>; - - */ -public class CallbackTuple extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public CallbackTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"Key", "CallbackObject"}, - type = {"String", "CallbackObject"}, - kind = {"Token", "Child"} - ) - public CallbackTuple(String p0, CallbackObject p1) { - setKey(p0); - setChild(p1, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:23 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:29 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:33 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:37 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:41 - */ - public CallbackTuple clone() throws CloneNotSupportedException { - CallbackTuple node = (CallbackTuple) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:46 - */ - public CallbackTuple copy() { - try { - CallbackTuple node = (CallbackTuple) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:65 - */ - @Deprecated - public CallbackTuple fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:75 - */ - public CallbackTuple treeCopyNoTransform() { - CallbackTuple tree = (CallbackTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:95 - */ - public CallbackTuple treeCopy() { - CallbackTuple tree = (CallbackTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:109 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Key == ((CallbackTuple) node).tokenString_Key); - } - /** - * Replaces the lexeme Key. - * @param value The new value for the lexeme Key. - * @apilevel high-level - */ - public void setKey(String value) { - tokenString_Key = value; - } - /** @apilevel internal - */ - protected String tokenString_Key; - /** - * Retrieves the value for the lexeme Key. - * @return The value for the lexeme Key. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Key") - public String getKey() { - return tokenString_Key != null ? tokenString_Key : ""; - } - /** - * Replaces the CallbackObject child. - * @param node The new node to replace the CallbackObject child. - * @apilevel high-level - */ - public void setCallbackObject(CallbackObject node) { - setChild(node, 0); - } - /** - * Retrieves the CallbackObject child. - * @return The current node used as the CallbackObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="CallbackObject") - public CallbackObject getCallbackObject() { - return (CallbackObject) getChild(0); - } - /** - * Retrieves the CallbackObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the CallbackObject child. - * @apilevel low-level - */ - public CallbackObject getCallbackObjectNoTransform() { - return (CallbackObject) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ClientCredentials.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ClientCredentials.java deleted file mode 100644 index d6705708288824910a64a93e72d03add907e4336..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ClientCredentials.java +++ /dev/null @@ -1,193 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:116 - * @astdecl ClientCredentials : ASTNode ::= OAuthFlowObject; - * @production ClientCredentials : {@link ASTNode} ::= <span class="component">{@link OAuthFlowObject}</span>; - - */ -public class ClientCredentials extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public ClientCredentials() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"OAuthFlowObject"}, - type = {"OAuthFlowObject"}, - kind = {"Child"} - ) - public ClientCredentials(OAuthFlowObject p0) { - setChild(p0, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public ClientCredentials clone() throws CloneNotSupportedException { - ClientCredentials node = (ClientCredentials) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public ClientCredentials copy() { - try { - ClientCredentials node = (ClientCredentials) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public ClientCredentials fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public ClientCredentials treeCopyNoTransform() { - ClientCredentials tree = (ClientCredentials) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public ClientCredentials treeCopy() { - ClientCredentials tree = (ClientCredentials) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node); - } - /** - * Replaces the OAuthFlowObject child. - * @param node The new node to replace the OAuthFlowObject child. - * @apilevel high-level - */ - public void setOAuthFlowObject(OAuthFlowObject node) { - setChild(node, 0); - } - /** - * Retrieves the OAuthFlowObject child. - * @return The current node used as the OAuthFlowObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="OAuthFlowObject") - public OAuthFlowObject getOAuthFlowObject() { - return (OAuthFlowObject) getChild(0); - } - /** - * Retrieves the OAuthFlowObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the OAuthFlowObject child. - * @apilevel low-level - */ - public OAuthFlowObject getOAuthFlowObjectNoTransform() { - return (OAuthFlowObject) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ComponentsObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ComponentsObject.java deleted file mode 100644 index 8beb6dfcf1274a2fae9d79698e7840f5603cce21..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ComponentsObject.java +++ /dev/null @@ -1,1571 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:22 - * @astdecl ComponentsObject : ASTNode ::= SchemaTuple* ResponseTuple* ParameterTuple* ExampleTuple* RequestBodyTuple* HeaderTuple* SecuritySchemeTuple* LinkTuple* CallbackTuple* Extension*; - * @production ComponentsObject : {@link ASTNode} ::= <span class="component">{@link SchemaTuple}*</span> <span class="component">{@link ResponseTuple}*</span> <span class="component">{@link ParameterTuple}*</span> <span class="component">{@link ExampleTuple}*</span> <span class="component">{@link RequestBodyTuple}*</span> <span class="component">{@link HeaderTuple}*</span> <span class="component">{@link SecuritySchemeTuple}*</span> <span class="component">{@link LinkTuple}*</span> <span class="component">{@link CallbackTuple}*</span> <span class="component">{@link Extension}*</span>; - - */ -public class ComponentsObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:149 - */ - public static Components composeComponents (ComponentsObject componentsObject){ - Components components = new Components(); - - if( componentsObject.getNumSchemaTuple() != 0 ){ - Map<String, org.openapi4j.parser.model.v3.Schema> schemaMap = new HashMap<>(); - for( SchemaTuple t : componentsObject.getSchemaTuples() ){ - if(!t.getSchemaObject().getRef().isEmpty()){ - org.openapi4j.parser.model.v3.Schema schema=new org.openapi4j.parser.model.v3.Schema(); - schema.setRef(t.getSchemaObject().getRef()); - schemaMap.put(t.getKey(),schema); - } - else - schemaMap.put(t.getKey(),SchemaObject.composeSchema(t.getSchemaObject())); - } - components.setSchemas(schemaMap); - } - if( componentsObject.getNumResponseTuple() != 0 ){ - Map<String, Response> responseMap = new HashMap<>(); - for( ResponseTuple t : componentsObject.getResponseTuples() ){ - if( !t.getResponseObject().getRef().isEmpty() ){ - Response response = new Response(); - response.setRef(t.getResponseObject().getRef()); - responseMap.put(t.getKey(), response); - } - else - responseMap.put(t.getKey(), ResponseObject.composeResponse(t.getResponseObject())); - } - components.setResponses(responseMap); - } - if( componentsObject.getNumParameterTuple() != 0 ){ - Map<String, Parameter> parameterMap = new HashMap<>(); - for( ParameterTuple t : componentsObject.getParameterTuples() ){ - if( !t.getParameterObject().getRef().isEmpty() ){ - Parameter parameter = new Parameter(); - parameter.setRef(t.getParameterObject().getRef()); - parameterMap.put(t.getKey(), parameter); - } - else - parameterMap.put(t.getKey(), ParameterObject.composeParameter(t.getParameterObject())); - } - components.setParameters(parameterMap); - } - if( componentsObject.getNumExampleTuple() != 0 ){ - Map<String, Example> exampleMap = new HashMap<>(); - for( ExampleTuple t : componentsObject.getExampleTuples() ) - exampleMap.put(t.getKey(), ExampleObject.composeExample(t.getExampleObject())); - components.setExamples(exampleMap); - } - if( componentsObject.getNumRequestBodyTuple() != 0 ){ - Map<String, RequestBody> requestBodyMap = new HashMap<>(); - for( RequestBodyTuple t : componentsObject.getRequestBodyTuples() ){ - if( !t.getRequestBodyObject().getRef().isEmpty() ){ - RequestBody requestBody = new RequestBody(); - requestBody.setRef(t.getRequestBodyObject().getRef()); - requestBodyMap.put(t.getKey(), requestBody); - } - else - requestBodyMap.put(t.getKey(), RequestBodyObject.composeRequestBody(t.getRequestBodyObject())); - } - components.setRequestBodies(requestBodyMap); - } - if( componentsObject.getNumHeaderTuple() != 0 ){ - Map<String, Header> headerMap = new HashMap<>(); - for( HeaderTuple t : componentsObject.getHeaderTuples() ){ - if( !t.getHeaderObject().getRef().isEmpty() ){ - Header header = new Header(); - header.setRef(t.getHeaderObject().getRef()); - headerMap.put(t.getKey(), header); - } - else - headerMap.put(t.getKey(), HeaderObject.composeHeader(t.getHeaderObject())); - } - components.setHeaders(headerMap); - } - if( componentsObject.getNumSecuritySchemeTuple() != 0 ){ - Map<String, SecurityScheme> securitySchemeMap = new HashMap<>(); - for( SecuritySchemeTuple t : componentsObject.getSecuritySchemeTuples() ){ - if( !t.getSecuritySchemeObject().getRef().isEmpty() ){ - SecurityScheme securityScheme = new SecurityScheme(); - securityScheme.setRef(t.getSecuritySchemeObject().getRef()); - securitySchemeMap.put(t.getKey(), securityScheme); - } - else - securitySchemeMap.put(t.getKey(), SecuritySchemeObject.composeSecurityScheme(t.getSecuritySchemeObject())); - } - components.setSecuritySchemes(securitySchemeMap); - } - if( componentsObject.getNumLinkTuple() != 0 ){ - Map<String, Link> linkMap = new HashMap<>(); - for( LinkTuple t : componentsObject.getLinkTuples() ){ - if( !t.getLinkObject().getRef().isEmpty() ){ - Link link = new Link(); - link.setRef(t.getLinkObject().getRef()); - linkMap.put(t.getKey(), link); - } - else - linkMap.put(t.getKey(), LinkObject.composeLink(t.getLinkObject())); - } - components.setLinks(linkMap); - } - if( componentsObject.getNumCallbackTuple() != 0 ){ - Map<String, Callback> callbackMap = new HashMap<>(); - for( CallbackTuple t : componentsObject.getCallbackTuples() ){ - if( !t.getCallbackObject().getRef().isEmpty() ){ - Callback callback = new Callback(); - callback.setRef(t.getCallbackObject().getRef()); - callbackMap.put(t.getKey(), callback); - } - else - callbackMap.put(t.getKey(), CallbackObject.composeCallback(t.getCallbackObject())); - } - components.setCallbacks(callbackMap); - } - if( componentsObject.getNumExtension() != 0 ){ - Map<String, Object> extensions = new HashMap<>(); - for( Extension e : componentsObject.getExtensions() ) - extensions.put(e.getKey(), e.getValue()); - components.setExtensions(extensions); - } - - return components; - } - /** - * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:121 - */ - public static ComponentsObject parseComponents(Components components){ - ComponentsObject componentsObject = new ComponentsObject(); - - if( components.getSchemas() != null ){ - for( String key : components.getSchemas().keySet() ){ - SchemaTuple schemaTuple = new SchemaTuple(); - if( components.getSchema(key).isRef() ){ - SchemaObject schemaObject = new SchemaObject(); - schemaObject.setRef(components.getSchema(key).getRef()); - schemaTuple.setKey(key); - schemaTuple.setSchemaObject(schemaObject); - componentsObject.addSchemaTuple(schemaTuple); - } - else{ - schemaTuple.setKey(key); - schemaTuple.setSchemaObject(SchemaObject.parseSchema(components.getSchema(key))); - componentsObject.addSchemaTuple(schemaTuple); - } - } - } - if( components.getResponses() != null ){ - for( String key : components.getResponses().keySet() ){ - ResponseTuple responseTuple = new ResponseTuple(); - if( components.getResponse(key).isRef() ){ - ResponseObject responseObject = new ResponseObject(); - responseObject.setRef(components.getResponse(key).getRef()); - responseTuple.setKey(key); - responseTuple.setResponseObject(responseObject); - componentsObject.addResponseTuple(responseTuple); - } - else{ - responseTuple.setKey(key); - responseTuple.setResponseObject(ResponseObject.parseResponse(components.getResponse(key))); - componentsObject.addResponseTuple(responseTuple); - } - } - } - if( components.getParameters() != null ){ - for( String key : components.getParameters().keySet() ){ - ParameterTuple parameterTuple = new ParameterTuple(); - if( components.getParameter(key).isRef() ){ - ParameterObject parameterObject = new ParameterObject(); - parameterObject.setRef(components.getParameter(key).getRef()); - parameterTuple.setKey(key); - parameterTuple.setParameterObject(parameterObject); - componentsObject.addParameterTuple(parameterTuple); - } - else{ - parameterTuple.setKey(key); - parameterTuple.setParameterObject(ParameterObject.parseParameter(components.getParameter(key))); - componentsObject.addParameterTuple(parameterTuple); - } - } - } - if( components.getExamples() != null ){ - for( String key : components.getExamples().keySet() ){ - ExampleTuple exampleTuple = new ExampleTuple(); - ExampleObject exampleObject = new ExampleObject(); - exampleTuple.setKey(key); - exampleTuple.setExampleObject(ExampleObject.parseExample(components.getExample(key))); - componentsObject.addExampleTuple(exampleTuple); - } - } - if( components.getRequestBodies() != null ){ - for( String key : components.getRequestBodies().keySet() ){ - RequestBodyTuple requestBodyTuple = new RequestBodyTuple(); - if( components.getRequestBody(key).isRef() ){ - RequestBodyObject requestBodyObject = new RequestBodyObject(); - requestBodyObject.setRef(components.getRequestBody(key).getRef()); - requestBodyTuple.setKey(key); - requestBodyTuple.setRequestBodyObject(requestBodyObject); - componentsObject.addRequestBodyTuple(requestBodyTuple); - } - else{ - requestBodyTuple.setKey(key); - requestBodyTuple.setRequestBodyObject(RequestBodyObject.parseRequestBody(components.getRequestBody(key))); - componentsObject.addRequestBodyTuple(requestBodyTuple); - } - } - } - if( components.getHeaders() != null ){ - for( String key : components.getHeaders().keySet() ){ - HeaderTuple headerTuple = new HeaderTuple(); - if( components.getHeader(key).isRef() ){ - HeaderObject headerObject = new HeaderObject(); - headerObject.setRef(components.getHeader(key).getRef()); - headerTuple.setKey(key); - headerTuple.setHeaderObject(headerObject); - componentsObject.addHeaderTuple(headerTuple); - } - else{ - headerTuple.setKey(key); - headerTuple.setHeaderObject(HeaderObject.parseHeader(components.getHeader(key))); - componentsObject.addHeaderTuple(headerTuple); - } - } - } - if( components.getSecuritySchemes() != null ){ - for( String key : components.getSecuritySchemes().keySet() ){ - SecuritySchemeTuple securitySchemeTuple = new SecuritySchemeTuple(); - if( components.getSecurityScheme(key).isRef() ){ - SecuritySchemeObject securitySchemeObject = new SecuritySchemeObject(); - securitySchemeObject.setRef(components.getSecurityScheme(key).getRef()); - securitySchemeTuple.setKey(key); - securitySchemeTuple.setSecuritySchemeObject(securitySchemeObject); - componentsObject.addSecuritySchemeTuple(securitySchemeTuple); - } - else{ - securitySchemeTuple.setKey(key); - securitySchemeTuple.setSecuritySchemeObject(SecuritySchemeObject.parseSecurityScheme(components.getSecurityScheme(key))); - componentsObject.addSecuritySchemeTuple(securitySchemeTuple); - } - } - } - if( components.getLinks() != null ){ - for( String key : components.getLinks().keySet() ){ - LinkTuple linkTuple = new LinkTuple(); - if( components.getLink(key).isRef() ){ - LinkObject linkObject = new LinkObject(); - linkObject.setRef(components.getLink(key).getRef()); - linkTuple.setKey(key); - linkTuple.setLinkObject(linkObject); - componentsObject.addLinkTuple(linkTuple); - } - else{ - linkTuple.setKey(key); - linkTuple.setLinkObject(LinkObject.parseLink(components.getLink(key))); - componentsObject.addLinkTuple(linkTuple); - } - } - } - if( components.getCallbacks() != null ){ - for( String key : components.getCallbacks().keySet() ){ - CallbackTuple callbackTuple = new CallbackTuple(); - if( components.getCallback(key).isRef() ){ - CallbackObject callbackObject = new CallbackObject(); - callbackObject.setRef(components.getCallback(key).getRef()); - callbackTuple.setKey(key); - callbackTuple.setCallbackObject(callbackObject); - componentsObject.addCallbackTuple(callbackTuple); - } - else{ - callbackTuple.setKey(key); - callbackTuple.setCallbackObject(CallbackObject.parseCallback(components.getCallback(key))); - componentsObject.addCallbackTuple(callbackTuple); - } - } - } - if( components.getExtensions() != null ){ - for( String key : components.getExtensions().keySet() ) - componentsObject.addExtension(new Extension(key, components.getExtensions().get(key))); - } - - return componentsObject; - } - /** - * @declaredat ASTNode:1 - */ - public ComponentsObject() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[10]; - setChild(new JastAddList(), 0); - setChild(new JastAddList(), 1); - setChild(new JastAddList(), 2); - setChild(new JastAddList(), 3); - setChild(new JastAddList(), 4); - setChild(new JastAddList(), 5); - setChild(new JastAddList(), 6); - setChild(new JastAddList(), 7); - setChild(new JastAddList(), 8); - setChild(new JastAddList(), 9); - } - /** - * @declaredat ASTNode:23 - */ - @ASTNodeAnnotation.Constructor( - name = {"SchemaTuple", "ResponseTuple", "ParameterTuple", "ExampleTuple", "RequestBodyTuple", "HeaderTuple", "SecuritySchemeTuple", "LinkTuple", "CallbackTuple", "Extension"}, - type = {"JastAddList<SchemaTuple>", "JastAddList<ResponseTuple>", "JastAddList<ParameterTuple>", "JastAddList<ExampleTuple>", "JastAddList<RequestBodyTuple>", "JastAddList<HeaderTuple>", "JastAddList<SecuritySchemeTuple>", "JastAddList<LinkTuple>", "JastAddList<CallbackTuple>", "JastAddList<Extension>"}, - kind = {"List", "List", "List", "List", "List", "List", "List", "List", "List", "List"} - ) - public ComponentsObject(JastAddList<SchemaTuple> p0, JastAddList<ResponseTuple> p1, JastAddList<ParameterTuple> p2, JastAddList<ExampleTuple> p3, JastAddList<RequestBodyTuple> p4, JastAddList<HeaderTuple> p5, JastAddList<SecuritySchemeTuple> p6, JastAddList<LinkTuple> p7, JastAddList<CallbackTuple> p8, JastAddList<Extension> p9) { - setChild(p0, 0); - setChild(p1, 1); - setChild(p2, 2); - setChild(p3, 3); - setChild(p4, 4); - setChild(p5, 5); - setChild(p6, 6); - setChild(p7, 7); - setChild(p8, 8); - setChild(p9, 9); - } - /** @apilevel low-level - * @declaredat ASTNode:41 - */ - protected int numChildren() { - return 10; - } - /** - * @apilevel internal - * @declaredat ASTNode:47 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:51 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:55 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:59 - */ - public ComponentsObject clone() throws CloneNotSupportedException { - ComponentsObject node = (ComponentsObject) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:64 - */ - public ComponentsObject copy() { - try { - ComponentsObject node = (ComponentsObject) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:83 - */ - @Deprecated - public ComponentsObject fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:93 - */ - public ComponentsObject treeCopyNoTransform() { - ComponentsObject tree = (ComponentsObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:113 - */ - public ComponentsObject treeCopy() { - ComponentsObject tree = (ComponentsObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:127 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node); - } - /** - * Replaces the SchemaTuple list. - * @param list The new list node to be used as the SchemaTuple list. - * @apilevel high-level - */ - public void setSchemaTupleList(JastAddList<SchemaTuple> list) { - setChild(list, 0); - } - /** - * Retrieves the number of children in the SchemaTuple list. - * @return Number of children in the SchemaTuple list. - * @apilevel high-level - */ - public int getNumSchemaTuple() { - return getSchemaTupleList().getNumChild(); - } - /** - * Retrieves the number of children in the SchemaTuple list. - * Calling this method will not trigger rewrites. - * @return Number of children in the SchemaTuple list. - * @apilevel low-level - */ - public int getNumSchemaTupleNoTransform() { - return getSchemaTupleListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the SchemaTuple list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the SchemaTuple list. - * @apilevel high-level - */ - public SchemaTuple getSchemaTuple(int i) { - return (SchemaTuple) getSchemaTupleList().getChild(i); - } - /** - * Check whether the SchemaTuple list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasSchemaTuple() { - return getSchemaTupleList().getNumChild() != 0; - } - /** - * Append an element to the SchemaTuple list. - * @param node The element to append to the SchemaTuple list. - * @apilevel high-level - */ - public void addSchemaTuple(SchemaTuple node) { - JastAddList<SchemaTuple> list = (parent == null) ? getSchemaTupleListNoTransform() : getSchemaTupleList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addSchemaTupleNoTransform(SchemaTuple node) { - JastAddList<SchemaTuple> list = getSchemaTupleListNoTransform(); - list.addChild(node); - } - /** - * Replaces the SchemaTuple list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setSchemaTuple(SchemaTuple node, int i) { - JastAddList<SchemaTuple> list = getSchemaTupleList(); - list.setChild(node, i); - } - /** - * Retrieves the SchemaTuple list. - * @return The node representing the SchemaTuple list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="SchemaTuple") - public JastAddList<SchemaTuple> getSchemaTupleList() { - JastAddList<SchemaTuple> list = (JastAddList<SchemaTuple>) getChild(0); - return list; - } - /** - * Retrieves the SchemaTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the SchemaTuple list. - * @apilevel low-level - */ - public JastAddList<SchemaTuple> getSchemaTupleListNoTransform() { - return (JastAddList<SchemaTuple>) getChildNoTransform(0); - } - /** - * @return the element at index {@code i} in the SchemaTuple list without - * triggering rewrites. - */ - public SchemaTuple getSchemaTupleNoTransform(int i) { - return (SchemaTuple) getSchemaTupleListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the SchemaTuple list. - * @return The node representing the SchemaTuple list. - * @apilevel high-level - */ - public JastAddList<SchemaTuple> getSchemaTuples() { - return getSchemaTupleList(); - } - /** - * Retrieves the SchemaTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the SchemaTuple list. - * @apilevel low-level - */ - public JastAddList<SchemaTuple> getSchemaTuplesNoTransform() { - return getSchemaTupleListNoTransform(); - } - /** - * Replaces the ResponseTuple list. - * @param list The new list node to be used as the ResponseTuple list. - * @apilevel high-level - */ - public void setResponseTupleList(JastAddList<ResponseTuple> list) { - setChild(list, 1); - } - /** - * Retrieves the number of children in the ResponseTuple list. - * @return Number of children in the ResponseTuple list. - * @apilevel high-level - */ - public int getNumResponseTuple() { - return getResponseTupleList().getNumChild(); - } - /** - * Retrieves the number of children in the ResponseTuple list. - * Calling this method will not trigger rewrites. - * @return Number of children in the ResponseTuple list. - * @apilevel low-level - */ - public int getNumResponseTupleNoTransform() { - return getResponseTupleListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the ResponseTuple list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the ResponseTuple list. - * @apilevel high-level - */ - public ResponseTuple getResponseTuple(int i) { - return (ResponseTuple) getResponseTupleList().getChild(i); - } - /** - * Check whether the ResponseTuple list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasResponseTuple() { - return getResponseTupleList().getNumChild() != 0; - } - /** - * Append an element to the ResponseTuple list. - * @param node The element to append to the ResponseTuple list. - * @apilevel high-level - */ - public void addResponseTuple(ResponseTuple node) { - JastAddList<ResponseTuple> list = (parent == null) ? getResponseTupleListNoTransform() : getResponseTupleList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addResponseTupleNoTransform(ResponseTuple node) { - JastAddList<ResponseTuple> list = getResponseTupleListNoTransform(); - list.addChild(node); - } - /** - * Replaces the ResponseTuple list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setResponseTuple(ResponseTuple node, int i) { - JastAddList<ResponseTuple> list = getResponseTupleList(); - list.setChild(node, i); - } - /** - * Retrieves the ResponseTuple list. - * @return The node representing the ResponseTuple list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="ResponseTuple") - public JastAddList<ResponseTuple> getResponseTupleList() { - JastAddList<ResponseTuple> list = (JastAddList<ResponseTuple>) getChild(1); - return list; - } - /** - * Retrieves the ResponseTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ResponseTuple list. - * @apilevel low-level - */ - public JastAddList<ResponseTuple> getResponseTupleListNoTransform() { - return (JastAddList<ResponseTuple>) getChildNoTransform(1); - } - /** - * @return the element at index {@code i} in the ResponseTuple list without - * triggering rewrites. - */ - public ResponseTuple getResponseTupleNoTransform(int i) { - return (ResponseTuple) getResponseTupleListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the ResponseTuple list. - * @return The node representing the ResponseTuple list. - * @apilevel high-level - */ - public JastAddList<ResponseTuple> getResponseTuples() { - return getResponseTupleList(); - } - /** - * Retrieves the ResponseTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ResponseTuple list. - * @apilevel low-level - */ - public JastAddList<ResponseTuple> getResponseTuplesNoTransform() { - return getResponseTupleListNoTransform(); - } - /** - * Replaces the ParameterTuple list. - * @param list The new list node to be used as the ParameterTuple list. - * @apilevel high-level - */ - public void setParameterTupleList(JastAddList<ParameterTuple> list) { - setChild(list, 2); - } - /** - * Retrieves the number of children in the ParameterTuple list. - * @return Number of children in the ParameterTuple list. - * @apilevel high-level - */ - public int getNumParameterTuple() { - return getParameterTupleList().getNumChild(); - } - /** - * Retrieves the number of children in the ParameterTuple list. - * Calling this method will not trigger rewrites. - * @return Number of children in the ParameterTuple list. - * @apilevel low-level - */ - public int getNumParameterTupleNoTransform() { - return getParameterTupleListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the ParameterTuple list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the ParameterTuple list. - * @apilevel high-level - */ - public ParameterTuple getParameterTuple(int i) { - return (ParameterTuple) getParameterTupleList().getChild(i); - } - /** - * Check whether the ParameterTuple list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasParameterTuple() { - return getParameterTupleList().getNumChild() != 0; - } - /** - * Append an element to the ParameterTuple list. - * @param node The element to append to the ParameterTuple list. - * @apilevel high-level - */ - public void addParameterTuple(ParameterTuple node) { - JastAddList<ParameterTuple> list = (parent == null) ? getParameterTupleListNoTransform() : getParameterTupleList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addParameterTupleNoTransform(ParameterTuple node) { - JastAddList<ParameterTuple> list = getParameterTupleListNoTransform(); - list.addChild(node); - } - /** - * Replaces the ParameterTuple list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setParameterTuple(ParameterTuple node, int i) { - JastAddList<ParameterTuple> list = getParameterTupleList(); - list.setChild(node, i); - } - /** - * Retrieves the ParameterTuple list. - * @return The node representing the ParameterTuple list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="ParameterTuple") - public JastAddList<ParameterTuple> getParameterTupleList() { - JastAddList<ParameterTuple> list = (JastAddList<ParameterTuple>) getChild(2); - return list; - } - /** - * Retrieves the ParameterTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ParameterTuple list. - * @apilevel low-level - */ - public JastAddList<ParameterTuple> getParameterTupleListNoTransform() { - return (JastAddList<ParameterTuple>) getChildNoTransform(2); - } - /** - * @return the element at index {@code i} in the ParameterTuple list without - * triggering rewrites. - */ - public ParameterTuple getParameterTupleNoTransform(int i) { - return (ParameterTuple) getParameterTupleListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the ParameterTuple list. - * @return The node representing the ParameterTuple list. - * @apilevel high-level - */ - public JastAddList<ParameterTuple> getParameterTuples() { - return getParameterTupleList(); - } - /** - * Retrieves the ParameterTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ParameterTuple list. - * @apilevel low-level - */ - public JastAddList<ParameterTuple> getParameterTuplesNoTransform() { - return getParameterTupleListNoTransform(); - } - /** - * Replaces the ExampleTuple list. - * @param list The new list node to be used as the ExampleTuple list. - * @apilevel high-level - */ - public void setExampleTupleList(JastAddList<ExampleTuple> list) { - setChild(list, 3); - } - /** - * Retrieves the number of children in the ExampleTuple list. - * @return Number of children in the ExampleTuple list. - * @apilevel high-level - */ - public int getNumExampleTuple() { - return getExampleTupleList().getNumChild(); - } - /** - * Retrieves the number of children in the ExampleTuple list. - * Calling this method will not trigger rewrites. - * @return Number of children in the ExampleTuple list. - * @apilevel low-level - */ - public int getNumExampleTupleNoTransform() { - return getExampleTupleListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the ExampleTuple list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the ExampleTuple list. - * @apilevel high-level - */ - public ExampleTuple getExampleTuple(int i) { - return (ExampleTuple) getExampleTupleList().getChild(i); - } - /** - * Check whether the ExampleTuple list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasExampleTuple() { - return getExampleTupleList().getNumChild() != 0; - } - /** - * Append an element to the ExampleTuple list. - * @param node The element to append to the ExampleTuple list. - * @apilevel high-level - */ - public void addExampleTuple(ExampleTuple node) { - JastAddList<ExampleTuple> list = (parent == null) ? getExampleTupleListNoTransform() : getExampleTupleList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addExampleTupleNoTransform(ExampleTuple node) { - JastAddList<ExampleTuple> list = getExampleTupleListNoTransform(); - list.addChild(node); - } - /** - * Replaces the ExampleTuple list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setExampleTuple(ExampleTuple node, int i) { - JastAddList<ExampleTuple> list = getExampleTupleList(); - list.setChild(node, i); - } - /** - * Retrieves the ExampleTuple list. - * @return The node representing the ExampleTuple list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="ExampleTuple") - public JastAddList<ExampleTuple> getExampleTupleList() { - JastAddList<ExampleTuple> list = (JastAddList<ExampleTuple>) getChild(3); - return list; - } - /** - * Retrieves the ExampleTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ExampleTuple list. - * @apilevel low-level - */ - public JastAddList<ExampleTuple> getExampleTupleListNoTransform() { - return (JastAddList<ExampleTuple>) getChildNoTransform(3); - } - /** - * @return the element at index {@code i} in the ExampleTuple list without - * triggering rewrites. - */ - public ExampleTuple getExampleTupleNoTransform(int i) { - return (ExampleTuple) getExampleTupleListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the ExampleTuple list. - * @return The node representing the ExampleTuple list. - * @apilevel high-level - */ - public JastAddList<ExampleTuple> getExampleTuples() { - return getExampleTupleList(); - } - /** - * Retrieves the ExampleTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ExampleTuple list. - * @apilevel low-level - */ - public JastAddList<ExampleTuple> getExampleTuplesNoTransform() { - return getExampleTupleListNoTransform(); - } - /** - * Replaces the RequestBodyTuple list. - * @param list The new list node to be used as the RequestBodyTuple list. - * @apilevel high-level - */ - public void setRequestBodyTupleList(JastAddList<RequestBodyTuple> list) { - setChild(list, 4); - } - /** - * Retrieves the number of children in the RequestBodyTuple list. - * @return Number of children in the RequestBodyTuple list. - * @apilevel high-level - */ - public int getNumRequestBodyTuple() { - return getRequestBodyTupleList().getNumChild(); - } - /** - * Retrieves the number of children in the RequestBodyTuple list. - * Calling this method will not trigger rewrites. - * @return Number of children in the RequestBodyTuple list. - * @apilevel low-level - */ - public int getNumRequestBodyTupleNoTransform() { - return getRequestBodyTupleListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the RequestBodyTuple list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the RequestBodyTuple list. - * @apilevel high-level - */ - public RequestBodyTuple getRequestBodyTuple(int i) { - return (RequestBodyTuple) getRequestBodyTupleList().getChild(i); - } - /** - * Check whether the RequestBodyTuple list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasRequestBodyTuple() { - return getRequestBodyTupleList().getNumChild() != 0; - } - /** - * Append an element to the RequestBodyTuple list. - * @param node The element to append to the RequestBodyTuple list. - * @apilevel high-level - */ - public void addRequestBodyTuple(RequestBodyTuple node) { - JastAddList<RequestBodyTuple> list = (parent == null) ? getRequestBodyTupleListNoTransform() : getRequestBodyTupleList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addRequestBodyTupleNoTransform(RequestBodyTuple node) { - JastAddList<RequestBodyTuple> list = getRequestBodyTupleListNoTransform(); - list.addChild(node); - } - /** - * Replaces the RequestBodyTuple list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setRequestBodyTuple(RequestBodyTuple node, int i) { - JastAddList<RequestBodyTuple> list = getRequestBodyTupleList(); - list.setChild(node, i); - } - /** - * Retrieves the RequestBodyTuple list. - * @return The node representing the RequestBodyTuple list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="RequestBodyTuple") - public JastAddList<RequestBodyTuple> getRequestBodyTupleList() { - JastAddList<RequestBodyTuple> list = (JastAddList<RequestBodyTuple>) getChild(4); - return list; - } - /** - * Retrieves the RequestBodyTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the RequestBodyTuple list. - * @apilevel low-level - */ - public JastAddList<RequestBodyTuple> getRequestBodyTupleListNoTransform() { - return (JastAddList<RequestBodyTuple>) getChildNoTransform(4); - } - /** - * @return the element at index {@code i} in the RequestBodyTuple list without - * triggering rewrites. - */ - public RequestBodyTuple getRequestBodyTupleNoTransform(int i) { - return (RequestBodyTuple) getRequestBodyTupleListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the RequestBodyTuple list. - * @return The node representing the RequestBodyTuple list. - * @apilevel high-level - */ - public JastAddList<RequestBodyTuple> getRequestBodyTuples() { - return getRequestBodyTupleList(); - } - /** - * Retrieves the RequestBodyTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the RequestBodyTuple list. - * @apilevel low-level - */ - public JastAddList<RequestBodyTuple> getRequestBodyTuplesNoTransform() { - return getRequestBodyTupleListNoTransform(); - } - /** - * Replaces the HeaderTuple list. - * @param list The new list node to be used as the HeaderTuple list. - * @apilevel high-level - */ - public void setHeaderTupleList(JastAddList<HeaderTuple> list) { - setChild(list, 5); - } - /** - * Retrieves the number of children in the HeaderTuple list. - * @return Number of children in the HeaderTuple list. - * @apilevel high-level - */ - public int getNumHeaderTuple() { - return getHeaderTupleList().getNumChild(); - } - /** - * Retrieves the number of children in the HeaderTuple list. - * Calling this method will not trigger rewrites. - * @return Number of children in the HeaderTuple list. - * @apilevel low-level - */ - public int getNumHeaderTupleNoTransform() { - return getHeaderTupleListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the HeaderTuple list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the HeaderTuple list. - * @apilevel high-level - */ - public HeaderTuple getHeaderTuple(int i) { - return (HeaderTuple) getHeaderTupleList().getChild(i); - } - /** - * Check whether the HeaderTuple list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasHeaderTuple() { - return getHeaderTupleList().getNumChild() != 0; - } - /** - * Append an element to the HeaderTuple list. - * @param node The element to append to the HeaderTuple list. - * @apilevel high-level - */ - public void addHeaderTuple(HeaderTuple node) { - JastAddList<HeaderTuple> list = (parent == null) ? getHeaderTupleListNoTransform() : getHeaderTupleList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addHeaderTupleNoTransform(HeaderTuple node) { - JastAddList<HeaderTuple> list = getHeaderTupleListNoTransform(); - list.addChild(node); - } - /** - * Replaces the HeaderTuple list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setHeaderTuple(HeaderTuple node, int i) { - JastAddList<HeaderTuple> list = getHeaderTupleList(); - list.setChild(node, i); - } - /** - * Retrieves the HeaderTuple list. - * @return The node representing the HeaderTuple list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="HeaderTuple") - public JastAddList<HeaderTuple> getHeaderTupleList() { - JastAddList<HeaderTuple> list = (JastAddList<HeaderTuple>) getChild(5); - return list; - } - /** - * Retrieves the HeaderTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the HeaderTuple list. - * @apilevel low-level - */ - public JastAddList<HeaderTuple> getHeaderTupleListNoTransform() { - return (JastAddList<HeaderTuple>) getChildNoTransform(5); - } - /** - * @return the element at index {@code i} in the HeaderTuple list without - * triggering rewrites. - */ - public HeaderTuple getHeaderTupleNoTransform(int i) { - return (HeaderTuple) getHeaderTupleListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the HeaderTuple list. - * @return The node representing the HeaderTuple list. - * @apilevel high-level - */ - public JastAddList<HeaderTuple> getHeaderTuples() { - return getHeaderTupleList(); - } - /** - * Retrieves the HeaderTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the HeaderTuple list. - * @apilevel low-level - */ - public JastAddList<HeaderTuple> getHeaderTuplesNoTransform() { - return getHeaderTupleListNoTransform(); - } - /** - * Replaces the SecuritySchemeTuple list. - * @param list The new list node to be used as the SecuritySchemeTuple list. - * @apilevel high-level - */ - public void setSecuritySchemeTupleList(JastAddList<SecuritySchemeTuple> list) { - setChild(list, 6); - } - /** - * Retrieves the number of children in the SecuritySchemeTuple list. - * @return Number of children in the SecuritySchemeTuple list. - * @apilevel high-level - */ - public int getNumSecuritySchemeTuple() { - return getSecuritySchemeTupleList().getNumChild(); - } - /** - * Retrieves the number of children in the SecuritySchemeTuple list. - * Calling this method will not trigger rewrites. - * @return Number of children in the SecuritySchemeTuple list. - * @apilevel low-level - */ - public int getNumSecuritySchemeTupleNoTransform() { - return getSecuritySchemeTupleListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the SecuritySchemeTuple list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the SecuritySchemeTuple list. - * @apilevel high-level - */ - public SecuritySchemeTuple getSecuritySchemeTuple(int i) { - return (SecuritySchemeTuple) getSecuritySchemeTupleList().getChild(i); - } - /** - * Check whether the SecuritySchemeTuple list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasSecuritySchemeTuple() { - return getSecuritySchemeTupleList().getNumChild() != 0; - } - /** - * Append an element to the SecuritySchemeTuple list. - * @param node The element to append to the SecuritySchemeTuple list. - * @apilevel high-level - */ - public void addSecuritySchemeTuple(SecuritySchemeTuple node) { - JastAddList<SecuritySchemeTuple> list = (parent == null) ? getSecuritySchemeTupleListNoTransform() : getSecuritySchemeTupleList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addSecuritySchemeTupleNoTransform(SecuritySchemeTuple node) { - JastAddList<SecuritySchemeTuple> list = getSecuritySchemeTupleListNoTransform(); - list.addChild(node); - } - /** - * Replaces the SecuritySchemeTuple list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setSecuritySchemeTuple(SecuritySchemeTuple node, int i) { - JastAddList<SecuritySchemeTuple> list = getSecuritySchemeTupleList(); - list.setChild(node, i); - } - /** - * Retrieves the SecuritySchemeTuple list. - * @return The node representing the SecuritySchemeTuple list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="SecuritySchemeTuple") - public JastAddList<SecuritySchemeTuple> getSecuritySchemeTupleList() { - JastAddList<SecuritySchemeTuple> list = (JastAddList<SecuritySchemeTuple>) getChild(6); - return list; - } - /** - * Retrieves the SecuritySchemeTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the SecuritySchemeTuple list. - * @apilevel low-level - */ - public JastAddList<SecuritySchemeTuple> getSecuritySchemeTupleListNoTransform() { - return (JastAddList<SecuritySchemeTuple>) getChildNoTransform(6); - } - /** - * @return the element at index {@code i} in the SecuritySchemeTuple list without - * triggering rewrites. - */ - public SecuritySchemeTuple getSecuritySchemeTupleNoTransform(int i) { - return (SecuritySchemeTuple) getSecuritySchemeTupleListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the SecuritySchemeTuple list. - * @return The node representing the SecuritySchemeTuple list. - * @apilevel high-level - */ - public JastAddList<SecuritySchemeTuple> getSecuritySchemeTuples() { - return getSecuritySchemeTupleList(); - } - /** - * Retrieves the SecuritySchemeTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the SecuritySchemeTuple list. - * @apilevel low-level - */ - public JastAddList<SecuritySchemeTuple> getSecuritySchemeTuplesNoTransform() { - return getSecuritySchemeTupleListNoTransform(); - } - /** - * Replaces the LinkTuple list. - * @param list The new list node to be used as the LinkTuple list. - * @apilevel high-level - */ - public void setLinkTupleList(JastAddList<LinkTuple> list) { - setChild(list, 7); - } - /** - * Retrieves the number of children in the LinkTuple list. - * @return Number of children in the LinkTuple list. - * @apilevel high-level - */ - public int getNumLinkTuple() { - return getLinkTupleList().getNumChild(); - } - /** - * Retrieves the number of children in the LinkTuple list. - * Calling this method will not trigger rewrites. - * @return Number of children in the LinkTuple list. - * @apilevel low-level - */ - public int getNumLinkTupleNoTransform() { - return getLinkTupleListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the LinkTuple list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the LinkTuple list. - * @apilevel high-level - */ - public LinkTuple getLinkTuple(int i) { - return (LinkTuple) getLinkTupleList().getChild(i); - } - /** - * Check whether the LinkTuple list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasLinkTuple() { - return getLinkTupleList().getNumChild() != 0; - } - /** - * Append an element to the LinkTuple list. - * @param node The element to append to the LinkTuple list. - * @apilevel high-level - */ - public void addLinkTuple(LinkTuple node) { - JastAddList<LinkTuple> list = (parent == null) ? getLinkTupleListNoTransform() : getLinkTupleList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addLinkTupleNoTransform(LinkTuple node) { - JastAddList<LinkTuple> list = getLinkTupleListNoTransform(); - list.addChild(node); - } - /** - * Replaces the LinkTuple list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setLinkTuple(LinkTuple node, int i) { - JastAddList<LinkTuple> list = getLinkTupleList(); - list.setChild(node, i); - } - /** - * Retrieves the LinkTuple list. - * @return The node representing the LinkTuple list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="LinkTuple") - public JastAddList<LinkTuple> getLinkTupleList() { - JastAddList<LinkTuple> list = (JastAddList<LinkTuple>) getChild(7); - return list; - } - /** - * Retrieves the LinkTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the LinkTuple list. - * @apilevel low-level - */ - public JastAddList<LinkTuple> getLinkTupleListNoTransform() { - return (JastAddList<LinkTuple>) getChildNoTransform(7); - } - /** - * @return the element at index {@code i} in the LinkTuple list without - * triggering rewrites. - */ - public LinkTuple getLinkTupleNoTransform(int i) { - return (LinkTuple) getLinkTupleListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the LinkTuple list. - * @return The node representing the LinkTuple list. - * @apilevel high-level - */ - public JastAddList<LinkTuple> getLinkTuples() { - return getLinkTupleList(); - } - /** - * Retrieves the LinkTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the LinkTuple list. - * @apilevel low-level - */ - public JastAddList<LinkTuple> getLinkTuplesNoTransform() { - return getLinkTupleListNoTransform(); - } - /** - * Replaces the CallbackTuple list. - * @param list The new list node to be used as the CallbackTuple list. - * @apilevel high-level - */ - public void setCallbackTupleList(JastAddList<CallbackTuple> list) { - setChild(list, 8); - } - /** - * Retrieves the number of children in the CallbackTuple list. - * @return Number of children in the CallbackTuple list. - * @apilevel high-level - */ - public int getNumCallbackTuple() { - return getCallbackTupleList().getNumChild(); - } - /** - * Retrieves the number of children in the CallbackTuple list. - * Calling this method will not trigger rewrites. - * @return Number of children in the CallbackTuple list. - * @apilevel low-level - */ - public int getNumCallbackTupleNoTransform() { - return getCallbackTupleListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the CallbackTuple list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the CallbackTuple list. - * @apilevel high-level - */ - public CallbackTuple getCallbackTuple(int i) { - return (CallbackTuple) getCallbackTupleList().getChild(i); - } - /** - * Check whether the CallbackTuple list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasCallbackTuple() { - return getCallbackTupleList().getNumChild() != 0; - } - /** - * Append an element to the CallbackTuple list. - * @param node The element to append to the CallbackTuple list. - * @apilevel high-level - */ - public void addCallbackTuple(CallbackTuple node) { - JastAddList<CallbackTuple> list = (parent == null) ? getCallbackTupleListNoTransform() : getCallbackTupleList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addCallbackTupleNoTransform(CallbackTuple node) { - JastAddList<CallbackTuple> list = getCallbackTupleListNoTransform(); - list.addChild(node); - } - /** - * Replaces the CallbackTuple list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setCallbackTuple(CallbackTuple node, int i) { - JastAddList<CallbackTuple> list = getCallbackTupleList(); - list.setChild(node, i); - } - /** - * Retrieves the CallbackTuple list. - * @return The node representing the CallbackTuple list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="CallbackTuple") - public JastAddList<CallbackTuple> getCallbackTupleList() { - JastAddList<CallbackTuple> list = (JastAddList<CallbackTuple>) getChild(8); - return list; - } - /** - * Retrieves the CallbackTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the CallbackTuple list. - * @apilevel low-level - */ - public JastAddList<CallbackTuple> getCallbackTupleListNoTransform() { - return (JastAddList<CallbackTuple>) getChildNoTransform(8); - } - /** - * @return the element at index {@code i} in the CallbackTuple list without - * triggering rewrites. - */ - public CallbackTuple getCallbackTupleNoTransform(int i) { - return (CallbackTuple) getCallbackTupleListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the CallbackTuple list. - * @return The node representing the CallbackTuple list. - * @apilevel high-level - */ - public JastAddList<CallbackTuple> getCallbackTuples() { - return getCallbackTupleList(); - } - /** - * Retrieves the CallbackTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the CallbackTuple list. - * @apilevel low-level - */ - public JastAddList<CallbackTuple> getCallbackTuplesNoTransform() { - return getCallbackTupleListNoTransform(); - } - /** - * Replaces the Extension list. - * @param list The new list node to be used as the Extension list. - * @apilevel high-level - */ - public void setExtensionList(JastAddList<Extension> list) { - setChild(list, 9); - } - /** - * Retrieves the number of children in the Extension list. - * @return Number of children in the Extension list. - * @apilevel high-level - */ - public int getNumExtension() { - return getExtensionList().getNumChild(); - } - /** - * Retrieves the number of children in the Extension list. - * Calling this method will not trigger rewrites. - * @return Number of children in the Extension list. - * @apilevel low-level - */ - public int getNumExtensionNoTransform() { - return getExtensionListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the Extension list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the Extension list. - * @apilevel high-level - */ - public Extension getExtension(int i) { - return (Extension) getExtensionList().getChild(i); - } - /** - * Check whether the Extension list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasExtension() { - return getExtensionList().getNumChild() != 0; - } - /** - * Append an element to the Extension list. - * @param node The element to append to the Extension list. - * @apilevel high-level - */ - public void addExtension(Extension node) { - JastAddList<Extension> list = (parent == null) ? getExtensionListNoTransform() : getExtensionList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addExtensionNoTransform(Extension node) { - JastAddList<Extension> list = getExtensionListNoTransform(); - list.addChild(node); - } - /** - * Replaces the Extension list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setExtension(Extension node, int i) { - JastAddList<Extension> list = getExtensionList(); - list.setChild(node, i); - } - /** - * Retrieves the Extension list. - * @return The node representing the Extension list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="Extension") - public JastAddList<Extension> getExtensionList() { - JastAddList<Extension> list = (JastAddList<Extension>) getChild(9); - return list; - } - /** - * Retrieves the Extension list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the Extension list. - * @apilevel low-level - */ - public JastAddList<Extension> getExtensionListNoTransform() { - return (JastAddList<Extension>) getChildNoTransform(9); - } - /** - * @return the element at index {@code i} in the Extension list without - * triggering rewrites. - */ - public Extension getExtensionNoTransform(int i) { - return (Extension) getExtensionListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the Extension list. - * @return The node representing the Extension list. - * @apilevel high-level - */ - public JastAddList<Extension> getExtensions() { - return getExtensionList(); - } - /** - * Retrieves the Extension list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the Extension list. - * @apilevel low-level - */ - public JastAddList<Extension> getExtensionsNoTransform() { - return getExtensionListNoTransform(); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ContactObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ContactObject.java deleted file mode 100644 index 11eb786e7278c077364951a266e0445758b205a8..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ContactObject.java +++ /dev/null @@ -1,383 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:8 - * @astdecl ContactObject : ASTNode ::= <Name:String> <Url:String> <Email:String> Extension*; - * @production ContactObject : {@link ASTNode} ::= <span class="component"><Name:String></span> <span class="component"><Url:String></span> <span class="component"><Email:String></span> <span class="component">{@link Extension}*</span>; - - */ -public class ContactObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:85 - */ - public static Contact composeContact (ContactObject contactObject){ - Contact contact = new Contact(); - - if( !contactObject.getName().isEmpty() ) - contact.setName( contactObject.getName() ); - if( !contactObject.getUrl().isEmpty() ) - contact.setUrl( contactObject.getUrl() ); - if( !contactObject.getEmail().isEmpty() ) - contact.setEmail( contactObject.getEmail() ); - if( contactObject.getNumExtension() != 0 ){ - Map<String, Object> extensions = new HashMap<>(); - for( Extension e : contactObject.getExtensions() ) - extensions.put(e.getKey(), e.getValue()); - contact.setExtensions(extensions); - } - - return contact; - } - /** - * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:63 - */ - public static ContactObject parseContact(Contact contact){ - ContactObject contactObject = new ContactObject(); - - if( contact.getName() != null ) - contactObject.setName( contact.getName() ); - if( contact.getUrl() != null ) - contactObject.setUrl( contact.getUrl() ); - if( contact.getEmail() != null ) - contactObject.setEmail( contact.getEmail() ); - if( contact.getExtensions() != null ){ - for( String key : contact.getExtensions().keySet() ) - contactObject.addExtension(new Extension(key, contact.getExtensions().get(key))); - } - - return contactObject; - } - /** - * @declaredat ASTNode:1 - */ - public ContactObject() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - setChild(new JastAddList(), 0); - } - /** - * @declaredat ASTNode:14 - */ - @ASTNodeAnnotation.Constructor( - name = {"Name", "Url", "Email", "Extension"}, - type = {"String", "String", "String", "JastAddList<Extension>"}, - kind = {"Token", "Token", "Token", "List"} - ) - public ContactObject(String p0, String p1, String p2, JastAddList<Extension> p3) { - setName(p0); - setUrl(p1); - setEmail(p2); - setChild(p3, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:26 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:32 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:44 - */ - public ContactObject clone() throws CloneNotSupportedException { - ContactObject node = (ContactObject) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:49 - */ - public ContactObject copy() { - try { - ContactObject node = (ContactObject) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:68 - */ - @Deprecated - public ContactObject fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:78 - */ - public ContactObject treeCopyNoTransform() { - ContactObject tree = (ContactObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:98 - */ - public ContactObject treeCopy() { - ContactObject tree = (ContactObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:112 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Name == ((ContactObject) node).tokenString_Name) && (tokenString_Url == ((ContactObject) node).tokenString_Url) && (tokenString_Email == ((ContactObject) node).tokenString_Email); - } - /** - * Replaces the lexeme Name. - * @param value The new value for the lexeme Name. - * @apilevel high-level - */ - public void setName(String value) { - tokenString_Name = value; - } - /** @apilevel internal - */ - protected String tokenString_Name; - /** - * Retrieves the value for the lexeme Name. - * @return The value for the lexeme Name. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Name") - public String getName() { - return tokenString_Name != null ? tokenString_Name : ""; - } - /** - * Replaces the lexeme Url. - * @param value The new value for the lexeme Url. - * @apilevel high-level - */ - public void setUrl(String value) { - tokenString_Url = value; - } - /** @apilevel internal - */ - protected String tokenString_Url; - /** - * Retrieves the value for the lexeme Url. - * @return The value for the lexeme Url. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Url") - public String getUrl() { - return tokenString_Url != null ? tokenString_Url : ""; - } - /** - * Replaces the lexeme Email. - * @param value The new value for the lexeme Email. - * @apilevel high-level - */ - public void setEmail(String value) { - tokenString_Email = value; - } - /** @apilevel internal - */ - protected String tokenString_Email; - /** - * Retrieves the value for the lexeme Email. - * @return The value for the lexeme Email. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Email") - public String getEmail() { - return tokenString_Email != null ? tokenString_Email : ""; - } - /** - * Replaces the Extension list. - * @param list The new list node to be used as the Extension list. - * @apilevel high-level - */ - public void setExtensionList(JastAddList<Extension> list) { - setChild(list, 0); - } - /** - * Retrieves the number of children in the Extension list. - * @return Number of children in the Extension list. - * @apilevel high-level - */ - public int getNumExtension() { - return getExtensionList().getNumChild(); - } - /** - * Retrieves the number of children in the Extension list. - * Calling this method will not trigger rewrites. - * @return Number of children in the Extension list. - * @apilevel low-level - */ - public int getNumExtensionNoTransform() { - return getExtensionListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the Extension list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the Extension list. - * @apilevel high-level - */ - public Extension getExtension(int i) { - return (Extension) getExtensionList().getChild(i); - } - /** - * Check whether the Extension list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasExtension() { - return getExtensionList().getNumChild() != 0; - } - /** - * Append an element to the Extension list. - * @param node The element to append to the Extension list. - * @apilevel high-level - */ - public void addExtension(Extension node) { - JastAddList<Extension> list = (parent == null) ? getExtensionListNoTransform() : getExtensionList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addExtensionNoTransform(Extension node) { - JastAddList<Extension> list = getExtensionListNoTransform(); - list.addChild(node); - } - /** - * Replaces the Extension list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setExtension(Extension node, int i) { - JastAddList<Extension> list = getExtensionList(); - list.setChild(node, i); - } - /** - * Retrieves the Extension list. - * @return The node representing the Extension list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="Extension") - public JastAddList<Extension> getExtensionList() { - JastAddList<Extension> list = (JastAddList<Extension>) getChild(0); - return list; - } - /** - * Retrieves the Extension list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the Extension list. - * @apilevel low-level - */ - public JastAddList<Extension> getExtensionListNoTransform() { - return (JastAddList<Extension>) getChildNoTransform(0); - } - /** - * @return the element at index {@code i} in the Extension list without - * triggering rewrites. - */ - public Extension getExtensionNoTransform(int i) { - return (Extension) getExtensionListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the Extension list. - * @return The node representing the Extension list. - * @apilevel high-level - */ - public JastAddList<Extension> getExtensions() { - return getExtensionList(); - } - /** - * Retrieves the Extension list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the Extension list. - * @apilevel low-level - */ - public JastAddList<Extension> getExtensionsNoTransform() { - return getExtensionListNoTransform(); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ContentTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ContentTuple.java deleted file mode 100644 index 71c08557ba60d8ce82179c93e88e32382a81d10b..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ContentTuple.java +++ /dev/null @@ -1,214 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:57 - * @astdecl ContentTuple : ASTNode ::= <Key:String> MediaTypeObject; - * @production ContentTuple : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component">{@link MediaTypeObject}</span>; - - */ -public class ContentTuple extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public ContentTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"Key", "MediaTypeObject"}, - type = {"String", "MediaTypeObject"}, - kind = {"Token", "Child"} - ) - public ContentTuple(String p0, MediaTypeObject p1) { - setKey(p0); - setChild(p1, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:23 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:29 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:33 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:37 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:41 - */ - public ContentTuple clone() throws CloneNotSupportedException { - ContentTuple node = (ContentTuple) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:46 - */ - public ContentTuple copy() { - try { - ContentTuple node = (ContentTuple) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:65 - */ - @Deprecated - public ContentTuple fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:75 - */ - public ContentTuple treeCopyNoTransform() { - ContentTuple tree = (ContentTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:95 - */ - public ContentTuple treeCopy() { - ContentTuple tree = (ContentTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:109 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Key == ((ContentTuple) node).tokenString_Key); - } - /** - * Replaces the lexeme Key. - * @param value The new value for the lexeme Key. - * @apilevel high-level - */ - public void setKey(String value) { - tokenString_Key = value; - } - /** @apilevel internal - */ - protected String tokenString_Key; - /** - * Retrieves the value for the lexeme Key. - * @return The value for the lexeme Key. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Key") - public String getKey() { - return tokenString_Key != null ? tokenString_Key : ""; - } - /** - * Replaces the MediaTypeObject child. - * @param node The new node to replace the MediaTypeObject child. - * @apilevel high-level - */ - public void setMediaTypeObject(MediaTypeObject node) { - setChild(node, 0); - } - /** - * Retrieves the MediaTypeObject child. - * @return The current node used as the MediaTypeObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="MediaTypeObject") - public MediaTypeObject getMediaTypeObject() { - return (MediaTypeObject) getChild(0); - } - /** - * Retrieves the MediaTypeObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the MediaTypeObject child. - * @apilevel low-level - */ - public MediaTypeObject getMediaTypeObjectNoTransform() { - return (MediaTypeObject) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/Delete.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/Delete.java deleted file mode 100644 index c233010cd774173f9e7f1cf24a9ed097c237aea4..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/Delete.java +++ /dev/null @@ -1,193 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:42 - * @astdecl Delete : ASTNode ::= OperationObject; - * @production Delete : {@link ASTNode} ::= <span class="component">{@link OperationObject}</span>; - - */ -public class Delete extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public Delete() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"OperationObject"}, - type = {"OperationObject"}, - kind = {"Child"} - ) - public Delete(OperationObject p0) { - setChild(p0, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public Delete clone() throws CloneNotSupportedException { - Delete node = (Delete) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public Delete copy() { - try { - Delete node = (Delete) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public Delete fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public Delete treeCopyNoTransform() { - Delete tree = (Delete) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public Delete treeCopy() { - Delete tree = (Delete) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node); - } - /** - * Replaces the OperationObject child. - * @param node The new node to replace the OperationObject child. - * @apilevel high-level - */ - public void setOperationObject(OperationObject node) { - setChild(node, 0); - } - /** - * Retrieves the OperationObject child. - * @return The current node used as the OperationObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="OperationObject") - public OperationObject getOperationObject() { - return (OperationObject) getChild(0); - } - /** - * Retrieves the OperationObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the OperationObject child. - * @apilevel low-level - */ - public OperationObject getOperationObjectNoTransform() { - return (OperationObject) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/DiscriminatorObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/DiscriminatorObject.java deleted file mode 100644 index e9abab9a2cb2a2ac6ac3241807d5d3524ea1dc7c..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/DiscriminatorObject.java +++ /dev/null @@ -1,337 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:103 - * @astdecl DiscriminatorObject : ASTNode ::= <PropertyName:String> MappingTuple*; - * @production DiscriminatorObject : {@link ASTNode} ::= <span class="component"><PropertyName:String></span> <span class="component">{@link MappingTuple}*</span>; - - */ -public class DiscriminatorObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:748 - */ - public static Discriminator composeDiscriminator (DiscriminatorObject discriminatorObject) { - Discriminator discriminator = new Discriminator(); - - if( !discriminatorObject.getPropertyName().isEmpty() ) - discriminator.setPropertyName(discriminatorObject.getPropertyName()); - if( discriminatorObject.getNumMappingTuple() != 0 ){ - Map<String, String> mapping = new HashMap<>(); - for( MappingTuple m : discriminatorObject.getMappingTuples() ) - mapping.put(m.getKey(), m.getValue()); - discriminator.setMapping(mapping); - } - - return discriminator; - } - /** - * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:758 - */ - public static DiscriminatorObject parseDiscriminator (Discriminator discriminator) { - DiscriminatorObject discriminatorObject = new DiscriminatorObject(); - - if( discriminator.getPropertyName() != null ) - discriminatorObject.setPropertyName(discriminator.getPropertyName()); - if( discriminator.getMapping() != null ){ - MappingTuple mapping = new MappingTuple(); - for( String key : discriminator.getMapping().keySet() ){ - mapping.setKey(key); - mapping.setValue(discriminator.getMapping().get(key)); - discriminatorObject.addMappingTuple(mapping); - } - } - - return discriminatorObject; - } - /** - * @declaredat ASTNode:1 - */ - public DiscriminatorObject() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - setChild(new JastAddList(), 0); - } - /** - * @declaredat ASTNode:14 - */ - @ASTNodeAnnotation.Constructor( - name = {"PropertyName", "MappingTuple"}, - type = {"String", "JastAddList<MappingTuple>"}, - kind = {"Token", "List"} - ) - public DiscriminatorObject(String p0, JastAddList<MappingTuple> p1) { - setPropertyName(p0); - setChild(p1, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:24 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:30 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:34 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:38 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:42 - */ - public DiscriminatorObject clone() throws CloneNotSupportedException { - DiscriminatorObject node = (DiscriminatorObject) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:47 - */ - public DiscriminatorObject copy() { - try { - DiscriminatorObject node = (DiscriminatorObject) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:66 - */ - @Deprecated - public DiscriminatorObject fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:76 - */ - public DiscriminatorObject treeCopyNoTransform() { - DiscriminatorObject tree = (DiscriminatorObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:96 - */ - public DiscriminatorObject treeCopy() { - DiscriminatorObject tree = (DiscriminatorObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:110 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_PropertyName == ((DiscriminatorObject) node).tokenString_PropertyName); - } - /** - * Replaces the lexeme PropertyName. - * @param value The new value for the lexeme PropertyName. - * @apilevel high-level - */ - public void setPropertyName(String value) { - tokenString_PropertyName = value; - } - /** @apilevel internal - */ - protected String tokenString_PropertyName; - /** - * Retrieves the value for the lexeme PropertyName. - * @return The value for the lexeme PropertyName. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="PropertyName") - public String getPropertyName() { - return tokenString_PropertyName != null ? tokenString_PropertyName : ""; - } - /** - * Replaces the MappingTuple list. - * @param list The new list node to be used as the MappingTuple list. - * @apilevel high-level - */ - public void setMappingTupleList(JastAddList<MappingTuple> list) { - setChild(list, 0); - } - /** - * Retrieves the number of children in the MappingTuple list. - * @return Number of children in the MappingTuple list. - * @apilevel high-level - */ - public int getNumMappingTuple() { - return getMappingTupleList().getNumChild(); - } - /** - * Retrieves the number of children in the MappingTuple list. - * Calling this method will not trigger rewrites. - * @return Number of children in the MappingTuple list. - * @apilevel low-level - */ - public int getNumMappingTupleNoTransform() { - return getMappingTupleListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the MappingTuple list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the MappingTuple list. - * @apilevel high-level - */ - public MappingTuple getMappingTuple(int i) { - return (MappingTuple) getMappingTupleList().getChild(i); - } - /** - * Check whether the MappingTuple list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasMappingTuple() { - return getMappingTupleList().getNumChild() != 0; - } - /** - * Append an element to the MappingTuple list. - * @param node The element to append to the MappingTuple list. - * @apilevel high-level - */ - public void addMappingTuple(MappingTuple node) { - JastAddList<MappingTuple> list = (parent == null) ? getMappingTupleListNoTransform() : getMappingTupleList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addMappingTupleNoTransform(MappingTuple node) { - JastAddList<MappingTuple> list = getMappingTupleListNoTransform(); - list.addChild(node); - } - /** - * Replaces the MappingTuple list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setMappingTuple(MappingTuple node, int i) { - JastAddList<MappingTuple> list = getMappingTupleList(); - list.setChild(node, i); - } - /** - * Retrieves the MappingTuple list. - * @return The node representing the MappingTuple list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="MappingTuple") - public JastAddList<MappingTuple> getMappingTupleList() { - JastAddList<MappingTuple> list = (JastAddList<MappingTuple>) getChild(0); - return list; - } - /** - * Retrieves the MappingTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the MappingTuple list. - * @apilevel low-level - */ - public JastAddList<MappingTuple> getMappingTupleListNoTransform() { - return (JastAddList<MappingTuple>) getChildNoTransform(0); - } - /** - * @return the element at index {@code i} in the MappingTuple list without - * triggering rewrites. - */ - public MappingTuple getMappingTupleNoTransform(int i) { - return (MappingTuple) getMappingTupleListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the MappingTuple list. - * @return The node representing the MappingTuple list. - * @apilevel high-level - */ - public JastAddList<MappingTuple> getMappingTuples() { - return getMappingTupleList(); - } - /** - * Retrieves the MappingTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the MappingTuple list. - * @apilevel low-level - */ - public JastAddList<MappingTuple> getMappingTuplesNoTransform() { - return getMappingTupleListNoTransform(); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/EncodingObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/EncodingObject.java deleted file mode 100644 index 05bcdf222581b76319b81d3e89ed7c2e653a2b82..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/EncodingObject.java +++ /dev/null @@ -1,526 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:67 - * @astdecl EncodingObject : ASTNode ::= <ContentType:String> HeaderTuple* <Style:String> <Explode:Boolean> <AllowReserved:Boolean> Extension*; - * @production EncodingObject : {@link ASTNode} ::= <span class="component"><ContentType:String></span> <span class="component">{@link HeaderTuple}*</span> <span class="component"><Style:String></span> <span class="component"><Explode:Boolean></span> <span class="component"><AllowReserved:Boolean></span> <span class="component">{@link Extension}*</span>; - - */ -public class EncodingObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:482 - */ - public static EncodingProperty composeEncodingProperty (EncodingObject encodingObject){ - EncodingProperty encodingProperty = new EncodingProperty(); - - if( !encodingObject.getContentType().isEmpty() ) - encodingProperty.setContentType( encodingObject.getContentType() ); - if( encodingObject.getNumHeaderTuple() != 0 ){ - Map<String, Header> headers = new HashMap<>(); - for( HeaderTuple t : encodingObject.getHeaderTuples() ) - headers.put(t.getKey(), HeaderObject.composeHeader(t.getHeaderObject())); - encodingProperty.setHeaders(headers); - } - if( !encodingObject.getStyle().isEmpty() ) - encodingProperty.setStyle(encodingObject.getStyle()); - if( encodingObject.getExplode() != null ) - encodingProperty.setExplode(encodingObject.getExplode()); - if( encodingObject.getNumExtension() != 0 ){ - Map<String, Object> extensionMap = new HashMap<>(); - for( Extension e : encodingObject.getExtensions() ) - extensionMap.put(e.getKey(), e.getValue()); - encodingProperty.setExtensions(extensionMap); - } - - return encodingProperty; - } - /** - * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:493 - */ - public static EncodingObject parseEncoding(EncodingProperty encodingProperty){ - EncodingObject encodingObject = new EncodingObject(); - - if( encodingProperty.getContentType() != null ) - encodingObject.setContentType( encodingProperty.getContentType() ); - if( encodingProperty.getHeaders() != null ){ - for( String key : encodingProperty.getHeaders().keySet() ) - encodingObject.addHeaderTuple(new HeaderTuple(key, HeaderObject.parseHeader(encodingProperty.getHeader(key)))); - } - if( encodingProperty.getStyle() != null ) - encodingObject.setStyle( encodingProperty.getStyle() ); - if( encodingProperty.getExplode() != null ) - encodingObject.setExplode( encodingProperty.getExplode() ); - if( encodingProperty.getExtensions() != null ){ - for( String key : encodingProperty.getExtensions().keySet() ) - encodingObject.addExtension(new Extension(key, encodingProperty.getExtensions().get(key))); - } - - return encodingObject; - } - /** - * @declaredat ASTNode:1 - */ - public EncodingObject() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[2]; - setChild(new JastAddList(), 0); - setChild(new JastAddList(), 1); - } - /** - * @declaredat ASTNode:15 - */ - @ASTNodeAnnotation.Constructor( - name = {"ContentType", "HeaderTuple", "Style", "Explode", "AllowReserved", "Extension"}, - type = {"String", "JastAddList<HeaderTuple>", "String", "Boolean", "Boolean", "JastAddList<Extension>"}, - kind = {"Token", "List", "Token", "Token", "Token", "List"} - ) - public EncodingObject(String p0, JastAddList<HeaderTuple> p1, String p2, Boolean p3, Boolean p4, JastAddList<Extension> p5) { - setContentType(p0); - setChild(p1, 0); - setStyle(p2); - setExplode(p3); - setAllowReserved(p4); - setChild(p5, 1); - } - /** @apilevel low-level - * @declaredat ASTNode:29 - */ - protected int numChildren() { - return 2; - } - /** - * @apilevel internal - * @declaredat ASTNode:35 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:39 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:43 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:47 - */ - public EncodingObject clone() throws CloneNotSupportedException { - EncodingObject node = (EncodingObject) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:52 - */ - public EncodingObject copy() { - try { - EncodingObject node = (EncodingObject) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:71 - */ - @Deprecated - public EncodingObject fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:81 - */ - public EncodingObject treeCopyNoTransform() { - EncodingObject tree = (EncodingObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:101 - */ - public EncodingObject treeCopy() { - EncodingObject tree = (EncodingObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:115 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_ContentType == ((EncodingObject) node).tokenString_ContentType) && (tokenString_Style == ((EncodingObject) node).tokenString_Style) && (tokenBoolean_Explode == ((EncodingObject) node).tokenBoolean_Explode) && (tokenBoolean_AllowReserved == ((EncodingObject) node).tokenBoolean_AllowReserved); - } - /** - * Replaces the lexeme ContentType. - * @param value The new value for the lexeme ContentType. - * @apilevel high-level - */ - public void setContentType(String value) { - tokenString_ContentType = value; - } - /** @apilevel internal - */ - protected String tokenString_ContentType; - /** - * Retrieves the value for the lexeme ContentType. - * @return The value for the lexeme ContentType. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="ContentType") - public String getContentType() { - return tokenString_ContentType != null ? tokenString_ContentType : ""; - } - /** - * Replaces the HeaderTuple list. - * @param list The new list node to be used as the HeaderTuple list. - * @apilevel high-level - */ - public void setHeaderTupleList(JastAddList<HeaderTuple> list) { - setChild(list, 0); - } - /** - * Retrieves the number of children in the HeaderTuple list. - * @return Number of children in the HeaderTuple list. - * @apilevel high-level - */ - public int getNumHeaderTuple() { - return getHeaderTupleList().getNumChild(); - } - /** - * Retrieves the number of children in the HeaderTuple list. - * Calling this method will not trigger rewrites. - * @return Number of children in the HeaderTuple list. - * @apilevel low-level - */ - public int getNumHeaderTupleNoTransform() { - return getHeaderTupleListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the HeaderTuple list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the HeaderTuple list. - * @apilevel high-level - */ - public HeaderTuple getHeaderTuple(int i) { - return (HeaderTuple) getHeaderTupleList().getChild(i); - } - /** - * Check whether the HeaderTuple list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasHeaderTuple() { - return getHeaderTupleList().getNumChild() != 0; - } - /** - * Append an element to the HeaderTuple list. - * @param node The element to append to the HeaderTuple list. - * @apilevel high-level - */ - public void addHeaderTuple(HeaderTuple node) { - JastAddList<HeaderTuple> list = (parent == null) ? getHeaderTupleListNoTransform() : getHeaderTupleList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addHeaderTupleNoTransform(HeaderTuple node) { - JastAddList<HeaderTuple> list = getHeaderTupleListNoTransform(); - list.addChild(node); - } - /** - * Replaces the HeaderTuple list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setHeaderTuple(HeaderTuple node, int i) { - JastAddList<HeaderTuple> list = getHeaderTupleList(); - list.setChild(node, i); - } - /** - * Retrieves the HeaderTuple list. - * @return The node representing the HeaderTuple list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="HeaderTuple") - public JastAddList<HeaderTuple> getHeaderTupleList() { - JastAddList<HeaderTuple> list = (JastAddList<HeaderTuple>) getChild(0); - return list; - } - /** - * Retrieves the HeaderTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the HeaderTuple list. - * @apilevel low-level - */ - public JastAddList<HeaderTuple> getHeaderTupleListNoTransform() { - return (JastAddList<HeaderTuple>) getChildNoTransform(0); - } - /** - * @return the element at index {@code i} in the HeaderTuple list without - * triggering rewrites. - */ - public HeaderTuple getHeaderTupleNoTransform(int i) { - return (HeaderTuple) getHeaderTupleListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the HeaderTuple list. - * @return The node representing the HeaderTuple list. - * @apilevel high-level - */ - public JastAddList<HeaderTuple> getHeaderTuples() { - return getHeaderTupleList(); - } - /** - * Retrieves the HeaderTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the HeaderTuple list. - * @apilevel low-level - */ - public JastAddList<HeaderTuple> getHeaderTuplesNoTransform() { - return getHeaderTupleListNoTransform(); - } - /** - * Replaces the lexeme Style. - * @param value The new value for the lexeme Style. - * @apilevel high-level - */ - public void setStyle(String value) { - tokenString_Style = value; - } - /** @apilevel internal - */ - protected String tokenString_Style; - /** - * Retrieves the value for the lexeme Style. - * @return The value for the lexeme Style. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Style") - public String getStyle() { - return tokenString_Style != null ? tokenString_Style : ""; - } - /** - * Replaces the lexeme Explode. - * @param value The new value for the lexeme Explode. - * @apilevel high-level - */ - public void setExplode(Boolean value) { - tokenBoolean_Explode = value; - } - /** @apilevel internal - */ - protected Boolean tokenBoolean_Explode; - /** - * Retrieves the value for the lexeme Explode. - * @return The value for the lexeme Explode. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Explode") - public Boolean getExplode() { - return tokenBoolean_Explode; - } - /** - * Replaces the lexeme AllowReserved. - * @param value The new value for the lexeme AllowReserved. - * @apilevel high-level - */ - public void setAllowReserved(Boolean value) { - tokenBoolean_AllowReserved = value; - } - /** @apilevel internal - */ - protected Boolean tokenBoolean_AllowReserved; - /** - * Retrieves the value for the lexeme AllowReserved. - * @return The value for the lexeme AllowReserved. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="AllowReserved") - public Boolean getAllowReserved() { - return tokenBoolean_AllowReserved; - } - /** - * Replaces the Extension list. - * @param list The new list node to be used as the Extension list. - * @apilevel high-level - */ - public void setExtensionList(JastAddList<Extension> list) { - setChild(list, 1); - } - /** - * Retrieves the number of children in the Extension list. - * @return Number of children in the Extension list. - * @apilevel high-level - */ - public int getNumExtension() { - return getExtensionList().getNumChild(); - } - /** - * Retrieves the number of children in the Extension list. - * Calling this method will not trigger rewrites. - * @return Number of children in the Extension list. - * @apilevel low-level - */ - public int getNumExtensionNoTransform() { - return getExtensionListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the Extension list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the Extension list. - * @apilevel high-level - */ - public Extension getExtension(int i) { - return (Extension) getExtensionList().getChild(i); - } - /** - * Check whether the Extension list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasExtension() { - return getExtensionList().getNumChild() != 0; - } - /** - * Append an element to the Extension list. - * @param node The element to append to the Extension list. - * @apilevel high-level - */ - public void addExtension(Extension node) { - JastAddList<Extension> list = (parent == null) ? getExtensionListNoTransform() : getExtensionList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addExtensionNoTransform(Extension node) { - JastAddList<Extension> list = getExtensionListNoTransform(); - list.addChild(node); - } - /** - * Replaces the Extension list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setExtension(Extension node, int i) { - JastAddList<Extension> list = getExtensionList(); - list.setChild(node, i); - } - /** - * Retrieves the Extension list. - * @return The node representing the Extension list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="Extension") - public JastAddList<Extension> getExtensionList() { - JastAddList<Extension> list = (JastAddList<Extension>) getChild(1); - return list; - } - /** - * Retrieves the Extension list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the Extension list. - * @apilevel low-level - */ - public JastAddList<Extension> getExtensionListNoTransform() { - return (JastAddList<Extension>) getChildNoTransform(1); - } - /** - * @return the element at index {@code i} in the Extension list without - * triggering rewrites. - */ - public Extension getExtensionNoTransform(int i) { - return (Extension) getExtensionListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the Extension list. - * @return The node representing the Extension list. - * @apilevel high-level - */ - public JastAddList<Extension> getExtensions() { - return getExtensionList(); - } - /** - * Retrieves the Extension list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the Extension list. - * @apilevel low-level - */ - public JastAddList<Extension> getExtensionsNoTransform() { - return getExtensionListNoTransform(); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/EncodingTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/EncodingTuple.java deleted file mode 100644 index 7d746b8e8b7f4314f02204e60d9967ea8133feda..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/EncodingTuple.java +++ /dev/null @@ -1,214 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:64 - * @astdecl EncodingTuple : ASTNode ::= <Key:String> EncodingObject; - * @production EncodingTuple : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component">{@link EncodingObject}</span>; - - */ -public class EncodingTuple extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public EncodingTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"Key", "EncodingObject"}, - type = {"String", "EncodingObject"}, - kind = {"Token", "Child"} - ) - public EncodingTuple(String p0, EncodingObject p1) { - setKey(p0); - setChild(p1, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:23 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:29 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:33 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:37 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:41 - */ - public EncodingTuple clone() throws CloneNotSupportedException { - EncodingTuple node = (EncodingTuple) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:46 - */ - public EncodingTuple copy() { - try { - EncodingTuple node = (EncodingTuple) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:65 - */ - @Deprecated - public EncodingTuple fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:75 - */ - public EncodingTuple treeCopyNoTransform() { - EncodingTuple tree = (EncodingTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:95 - */ - public EncodingTuple treeCopy() { - EncodingTuple tree = (EncodingTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:109 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Key == ((EncodingTuple) node).tokenString_Key); - } - /** - * Replaces the lexeme Key. - * @param value The new value for the lexeme Key. - * @apilevel high-level - */ - public void setKey(String value) { - tokenString_Key = value; - } - /** @apilevel internal - */ - protected String tokenString_Key; - /** - * Retrieves the value for the lexeme Key. - * @return The value for the lexeme Key. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Key") - public String getKey() { - return tokenString_Key != null ? tokenString_Key : ""; - } - /** - * Replaces the EncodingObject child. - * @param node The new node to replace the EncodingObject child. - * @apilevel high-level - */ - public void setEncodingObject(EncodingObject node) { - setChild(node, 0); - } - /** - * Retrieves the EncodingObject child. - * @return The current node used as the EncodingObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="EncodingObject") - public EncodingObject getEncodingObject() { - return (EncodingObject) getChild(0); - } - /** - * Retrieves the EncodingObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the EncodingObject child. - * @apilevel low-level - */ - public EncodingObject getEncodingObjectNoTransform() { - return (EncodingObject) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/Enum.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/Enum.java deleted file mode 100644 index ff0ed8afc98751f125221aa8c270e0cbbee68084..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/Enum.java +++ /dev/null @@ -1,186 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:19 - * @astdecl Enum : ASTNode ::= <EnumValue:String>; - * @production Enum : {@link ASTNode} ::= <span class="component"><EnumValue:String></span>; - - */ -public class Enum extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public Enum() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - } - /** - * @declaredat ASTNode:12 - */ - @ASTNodeAnnotation.Constructor( - name = {"EnumValue"}, - type = {"String"}, - kind = {"Token"} - ) - public Enum(String p0) { - setEnumValue(p0); - } - /** @apilevel low-level - * @declaredat ASTNode:21 - */ - protected int numChildren() { - return 0; - } - /** - * @apilevel internal - * @declaredat ASTNode:27 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:31 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:35 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:39 - */ - public Enum clone() throws CloneNotSupportedException { - Enum node = (Enum) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:44 - */ - public Enum copy() { - try { - Enum node = (Enum) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:63 - */ - @Deprecated - public Enum fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:73 - */ - public Enum treeCopyNoTransform() { - Enum tree = (Enum) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:93 - */ - public Enum treeCopy() { - Enum tree = (Enum) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:107 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_EnumValue == ((Enum) node).tokenString_EnumValue); - } - /** - * Replaces the lexeme EnumValue. - * @param value The new value for the lexeme EnumValue. - * @apilevel high-level - */ - public void setEnumValue(String value) { - tokenString_EnumValue = value; - } - /** @apilevel internal - */ - protected String tokenString_EnumValue; - /** - * Retrieves the value for the lexeme EnumValue. - * @return The value for the lexeme EnumValue. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="EnumValue") - public String getEnumValue() { - return tokenString_EnumValue != null ? tokenString_EnumValue : ""; - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/EnumObj.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/EnumObj.java deleted file mode 100644 index 3a163db98d94148b25df80277b95055439585bbd..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/EnumObj.java +++ /dev/null @@ -1,186 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:93 - * @astdecl EnumObj : ASTNode ::= <EnumOb:Object>; - * @production EnumObj : {@link ASTNode} ::= <span class="component"><EnumOb:Object></span>; - - */ -public class EnumObj extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public EnumObj() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - } - /** - * @declaredat ASTNode:12 - */ - @ASTNodeAnnotation.Constructor( - name = {"EnumOb"}, - type = {"Object"}, - kind = {"Token"} - ) - public EnumObj(Object p0) { - setEnumOb(p0); - } - /** @apilevel low-level - * @declaredat ASTNode:21 - */ - protected int numChildren() { - return 0; - } - /** - * @apilevel internal - * @declaredat ASTNode:27 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:31 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:35 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:39 - */ - public EnumObj clone() throws CloneNotSupportedException { - EnumObj node = (EnumObj) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:44 - */ - public EnumObj copy() { - try { - EnumObj node = (EnumObj) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:63 - */ - @Deprecated - public EnumObj fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:73 - */ - public EnumObj treeCopyNoTransform() { - EnumObj tree = (EnumObj) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:93 - */ - public EnumObj treeCopy() { - EnumObj tree = (EnumObj) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:107 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenObject_EnumOb == ((EnumObj) node).tokenObject_EnumOb); - } - /** - * Replaces the lexeme EnumOb. - * @param value The new value for the lexeme EnumOb. - * @apilevel high-level - */ - public void setEnumOb(Object value) { - tokenObject_EnumOb = value; - } - /** @apilevel internal - */ - protected Object tokenObject_EnumOb; - /** - * Retrieves the value for the lexeme EnumOb. - * @return The value for the lexeme EnumOb. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="EnumOb") - public Object getEnumOb() { - return tokenObject_EnumOb; - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ExampleObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ExampleObject.java deleted file mode 100644 index b0896de2e39a541fbc49812f0d8bd7d729e16ede..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ExampleObject.java +++ /dev/null @@ -1,408 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:78 - * @astdecl ExampleObject : ASTNode ::= <Summary:String> <Description:String> <Value:Object> <ExternalValue:String> Extension*; - * @production ExampleObject : {@link ASTNode} ::= <span class="component"><Summary:String></span> <span class="component"><Description:String></span> <span class="component"><Value:Object></span> <span class="component"><ExternalValue:String></span> <span class="component">{@link Extension}*</span>; - - */ -public class ExampleObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:549 - */ - public static Example composeExample (ExampleObject exampleObject){ - Example example = new Example(); - - if( !exampleObject.getSummary().isEmpty() ) - example.setSummary( exampleObject.getSummary() ); - if( !exampleObject.getDescription().isEmpty() ) - example.setDescription( exampleObject.getDescription() ); - if( exampleObject.getValue() != null ) - example.setValue( exampleObject.getValue() ); - if( !exampleObject.getExternalValue().isEmpty() ) - example.setExternalValue( exampleObject.getExternalValue() ); - if( exampleObject.getNumExtension() != 0 ){ - Map<String, Object> extension = new HashMap<>(); - for( Extension e : exampleObject.getExtensions() ) - extension.put(e.getKey(), e.getValue()); - example.setExtensions(extension); - } - - return example; - } - /** - * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:548 - */ - public static ExampleObject parseExample(Example example){ - ExampleObject exampleObject = new ExampleObject(); - - if( example.getSummary() != null ) - exampleObject.setSummary( example.getSummary() ); - if( example.getDescription() != null ) - exampleObject.setDescription( example.getDescription() ); - if( example.getValue() != null ) - exampleObject.setValue( example.getValue() ); - if( example.getExternalValue() != null ) - exampleObject.setExternalValue( example.getExternalValue() ); - if( example.getExtensions() != null ){ - for( String key : example.getExtensions().keySet() ) - exampleObject.addExtension(new Extension(key, example.getExtensions().get(key))); - } - - return exampleObject; - } - /** - * @declaredat ASTNode:1 - */ - public ExampleObject() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - setChild(new JastAddList(), 0); - } - /** - * @declaredat ASTNode:14 - */ - @ASTNodeAnnotation.Constructor( - name = {"Summary", "Description", "Value", "ExternalValue", "Extension"}, - type = {"String", "String", "Object", "String", "JastAddList<Extension>"}, - kind = {"Token", "Token", "Token", "Token", "List"} - ) - public ExampleObject(String p0, String p1, Object p2, String p3, JastAddList<Extension> p4) { - setSummary(p0); - setDescription(p1); - setValue(p2); - setExternalValue(p3); - setChild(p4, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:27 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:33 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:37 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:41 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public ExampleObject clone() throws CloneNotSupportedException { - ExampleObject node = (ExampleObject) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:50 - */ - public ExampleObject copy() { - try { - ExampleObject node = (ExampleObject) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:69 - */ - @Deprecated - public ExampleObject fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:79 - */ - public ExampleObject treeCopyNoTransform() { - ExampleObject tree = (ExampleObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:99 - */ - public ExampleObject treeCopy() { - ExampleObject tree = (ExampleObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:113 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Summary == ((ExampleObject) node).tokenString_Summary) && (tokenString_Description == ((ExampleObject) node).tokenString_Description) && (tokenObject_Value == ((ExampleObject) node).tokenObject_Value) && (tokenString_ExternalValue == ((ExampleObject) node).tokenString_ExternalValue); - } - /** - * Replaces the lexeme Summary. - * @param value The new value for the lexeme Summary. - * @apilevel high-level - */ - public void setSummary(String value) { - tokenString_Summary = value; - } - /** @apilevel internal - */ - protected String tokenString_Summary; - /** - * Retrieves the value for the lexeme Summary. - * @return The value for the lexeme Summary. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Summary") - public String getSummary() { - return tokenString_Summary != null ? tokenString_Summary : ""; - } - /** - * Replaces the lexeme Description. - * @param value The new value for the lexeme Description. - * @apilevel high-level - */ - public void setDescription(String value) { - tokenString_Description = value; - } - /** @apilevel internal - */ - protected String tokenString_Description; - /** - * Retrieves the value for the lexeme Description. - * @return The value for the lexeme Description. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Description") - public String getDescription() { - return tokenString_Description != null ? tokenString_Description : ""; - } - /** - * Replaces the lexeme Value. - * @param value The new value for the lexeme Value. - * @apilevel high-level - */ - public void setValue(Object value) { - tokenObject_Value = value; - } - /** @apilevel internal - */ - protected Object tokenObject_Value; - /** - * Retrieves the value for the lexeme Value. - * @return The value for the lexeme Value. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Value") - public Object getValue() { - return tokenObject_Value; - } - /** - * Replaces the lexeme ExternalValue. - * @param value The new value for the lexeme ExternalValue. - * @apilevel high-level - */ - public void setExternalValue(String value) { - tokenString_ExternalValue = value; - } - /** @apilevel internal - */ - protected String tokenString_ExternalValue; - /** - * Retrieves the value for the lexeme ExternalValue. - * @return The value for the lexeme ExternalValue. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="ExternalValue") - public String getExternalValue() { - return tokenString_ExternalValue != null ? tokenString_ExternalValue : ""; - } - /** - * Replaces the Extension list. - * @param list The new list node to be used as the Extension list. - * @apilevel high-level - */ - public void setExtensionList(JastAddList<Extension> list) { - setChild(list, 0); - } - /** - * Retrieves the number of children in the Extension list. - * @return Number of children in the Extension list. - * @apilevel high-level - */ - public int getNumExtension() { - return getExtensionList().getNumChild(); - } - /** - * Retrieves the number of children in the Extension list. - * Calling this method will not trigger rewrites. - * @return Number of children in the Extension list. - * @apilevel low-level - */ - public int getNumExtensionNoTransform() { - return getExtensionListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the Extension list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the Extension list. - * @apilevel high-level - */ - public Extension getExtension(int i) { - return (Extension) getExtensionList().getChild(i); - } - /** - * Check whether the Extension list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasExtension() { - return getExtensionList().getNumChild() != 0; - } - /** - * Append an element to the Extension list. - * @param node The element to append to the Extension list. - * @apilevel high-level - */ - public void addExtension(Extension node) { - JastAddList<Extension> list = (parent == null) ? getExtensionListNoTransform() : getExtensionList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addExtensionNoTransform(Extension node) { - JastAddList<Extension> list = getExtensionListNoTransform(); - list.addChild(node); - } - /** - * Replaces the Extension list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setExtension(Extension node, int i) { - JastAddList<Extension> list = getExtensionList(); - list.setChild(node, i); - } - /** - * Retrieves the Extension list. - * @return The node representing the Extension list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="Extension") - public JastAddList<Extension> getExtensionList() { - JastAddList<Extension> list = (JastAddList<Extension>) getChild(0); - return list; - } - /** - * Retrieves the Extension list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the Extension list. - * @apilevel low-level - */ - public JastAddList<Extension> getExtensionListNoTransform() { - return (JastAddList<Extension>) getChildNoTransform(0); - } - /** - * @return the element at index {@code i} in the Extension list without - * triggering rewrites. - */ - public Extension getExtensionNoTransform(int i) { - return (Extension) getExtensionListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the Extension list. - * @return The node representing the Extension list. - * @apilevel high-level - */ - public JastAddList<Extension> getExtensions() { - return getExtensionList(); - } - /** - * Retrieves the Extension list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the Extension list. - * @apilevel low-level - */ - public JastAddList<Extension> getExtensionsNoTransform() { - return getExtensionListNoTransform(); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ExampleTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ExampleTuple.java deleted file mode 100644 index 9a23b2e43098d75b6d3431ac704cf63bf6017ca4..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ExampleTuple.java +++ /dev/null @@ -1,214 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:26 - * @astdecl ExampleTuple : ASTNode ::= <Key:String> ExampleObject; - * @production ExampleTuple : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component">{@link ExampleObject}</span>; - - */ -public class ExampleTuple extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public ExampleTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"Key", "ExampleObject"}, - type = {"String", "ExampleObject"}, - kind = {"Token", "Child"} - ) - public ExampleTuple(String p0, ExampleObject p1) { - setKey(p0); - setChild(p1, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:23 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:29 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:33 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:37 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:41 - */ - public ExampleTuple clone() throws CloneNotSupportedException { - ExampleTuple node = (ExampleTuple) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:46 - */ - public ExampleTuple copy() { - try { - ExampleTuple node = (ExampleTuple) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:65 - */ - @Deprecated - public ExampleTuple fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:75 - */ - public ExampleTuple treeCopyNoTransform() { - ExampleTuple tree = (ExampleTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:95 - */ - public ExampleTuple treeCopy() { - ExampleTuple tree = (ExampleTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:109 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Key == ((ExampleTuple) node).tokenString_Key); - } - /** - * Replaces the lexeme Key. - * @param value The new value for the lexeme Key. - * @apilevel high-level - */ - public void setKey(String value) { - tokenString_Key = value; - } - /** @apilevel internal - */ - protected String tokenString_Key; - /** - * Retrieves the value for the lexeme Key. - * @return The value for the lexeme Key. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Key") - public String getKey() { - return tokenString_Key != null ? tokenString_Key : ""; - } - /** - * Replaces the ExampleObject child. - * @param node The new node to replace the ExampleObject child. - * @apilevel high-level - */ - public void setExampleObject(ExampleObject node) { - setChild(node, 0); - } - /** - * Retrieves the ExampleObject child. - * @return The current node used as the ExampleObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="ExampleObject") - public ExampleObject getExampleObject() { - return (ExampleObject) getChild(0); - } - /** - * Retrieves the ExampleObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the ExampleObject child. - * @apilevel low-level - */ - public ExampleObject getExampleObjectNoTransform() { - return (ExampleObject) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/Expression.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/Expression.java deleted file mode 100644 index 0bddc0d6f2fceb31355f37217635e6c8623d765c..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/Expression.java +++ /dev/null @@ -1,214 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:74 - * @astdecl Expression : ASTNode ::= <Name:String> PathItem; - * @production Expression : {@link ASTNode} ::= <span class="component"><Name:String></span> <span class="component">{@link PathItem}</span>; - - */ -public class Expression extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public Expression() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"Name", "PathItem"}, - type = {"String", "PathItem"}, - kind = {"Token", "Child"} - ) - public Expression(String p0, PathItem p1) { - setName(p0); - setChild(p1, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:23 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:29 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:33 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:37 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:41 - */ - public Expression clone() throws CloneNotSupportedException { - Expression node = (Expression) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:46 - */ - public Expression copy() { - try { - Expression node = (Expression) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:65 - */ - @Deprecated - public Expression fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:75 - */ - public Expression treeCopyNoTransform() { - Expression tree = (Expression) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:95 - */ - public Expression treeCopy() { - Expression tree = (Expression) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:109 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Name == ((Expression) node).tokenString_Name); - } - /** - * Replaces the lexeme Name. - * @param value The new value for the lexeme Name. - * @apilevel high-level - */ - public void setName(String value) { - tokenString_Name = value; - } - /** @apilevel internal - */ - protected String tokenString_Name; - /** - * Retrieves the value for the lexeme Name. - * @return The value for the lexeme Name. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Name") - public String getName() { - return tokenString_Name != null ? tokenString_Name : ""; - } - /** - * Replaces the PathItem child. - * @param node The new node to replace the PathItem child. - * @apilevel high-level - */ - public void setPathItem(PathItem node) { - setChild(node, 0); - } - /** - * Retrieves the PathItem child. - * @return The current node used as the PathItem child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="PathItem") - public PathItem getPathItem() { - return (PathItem) getChild(0); - } - /** - * Retrieves the PathItem child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the PathItem child. - * @apilevel low-level - */ - public PathItem getPathItemNoTransform() { - return (PathItem) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/Extension.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/Extension.java deleted file mode 100644 index 4379f72b67ad5922ea3458194971d6aee1307ba5..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/Extension.java +++ /dev/null @@ -1,207 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:75 - * @astdecl Extension : ASTNode ::= <Key:String> <Value:Object>; - * @production Extension : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component"><Value:Object></span>; - - */ -public class Extension extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public Extension() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - } - /** - * @declaredat ASTNode:12 - */ - @ASTNodeAnnotation.Constructor( - name = {"Key", "Value"}, - type = {"String", "Object"}, - kind = {"Token", "Token"} - ) - public Extension(String p0, Object p1) { - setKey(p0); - setValue(p1); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 0; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public Extension clone() throws CloneNotSupportedException { - Extension node = (Extension) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public Extension copy() { - try { - Extension node = (Extension) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public Extension fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public Extension treeCopyNoTransform() { - Extension tree = (Extension) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public Extension treeCopy() { - Extension tree = (Extension) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Key == ((Extension) node).tokenString_Key) && (tokenObject_Value == ((Extension) node).tokenObject_Value); - } - /** - * Replaces the lexeme Key. - * @param value The new value for the lexeme Key. - * @apilevel high-level - */ - public void setKey(String value) { - tokenString_Key = value; - } - /** @apilevel internal - */ - protected String tokenString_Key; - /** - * Retrieves the value for the lexeme Key. - * @return The value for the lexeme Key. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Key") - public String getKey() { - return tokenString_Key != null ? tokenString_Key : ""; - } - /** - * Replaces the lexeme Value. - * @param value The new value for the lexeme Value. - * @apilevel high-level - */ - public void setValue(Object value) { - tokenObject_Value = value; - } - /** @apilevel internal - */ - protected Object tokenObject_Value; - /** - * Retrieves the value for the lexeme Value. - * @return The value for the lexeme Value. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Value") - public Object getValue() { - return tokenObject_Value; - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ExternalDocObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ExternalDocObject.java deleted file mode 100644 index d51932cc7c6c217febfb447fbcfd8fca745ed926..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ExternalDocObject.java +++ /dev/null @@ -1,359 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:53 - * @astdecl ExternalDocObject : ASTNode ::= <Description:String> <Url:String> Extension*; - * @production ExternalDocObject : {@link ASTNode} ::= <span class="component"><Description:String></span> <span class="component"><Url:String></span> <span class="component">{@link Extension}*</span>; - - */ -public class ExternalDocObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:374 - */ - public static ExternalDocs composeExternalDocs (ExternalDocObject externalDocObject){ - ExternalDocs externalDocs = new ExternalDocs(); - - if( !externalDocObject.getDescription().isEmpty() ) - externalDocs.setDescription(externalDocObject.getDescription()); - if( !externalDocObject.getUrl().isEmpty() ) - externalDocs.setUrl(externalDocObject.getUrl()); - if( externalDocObject.getNumExtension() != 0 ){ - Map<String, Object> extensionMap = new HashMap<>(); - for( Extension e : externalDocObject.getExtensions() ) - extensionMap.put(e.getKey(), e.getValue()); - externalDocs.setExtensions(extensionMap); - } - - return externalDocs; - } - /** - * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:400 - */ - public static ExternalDocObject parseExternalDocs(ExternalDocs externalDocs){ - ExternalDocObject externalDocObject = new ExternalDocObject(); - - - if( externalDocs.getDescription() != null ) - externalDocObject.setDescription(externalDocs.getDescription()); - if( externalDocs.getUrl() != null ) - externalDocObject.setUrl(externalDocs.getUrl()); - if( externalDocs.getExtensions() != null ) { - for( String key : externalDocs.getExtensions().keySet() ) - externalDocObject.addExtension(new Extension(key, externalDocs.getExtensions().get(key))); - } - - return externalDocObject; - } - /** - * @declaredat ASTNode:1 - */ - public ExternalDocObject() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - setChild(new JastAddList(), 0); - } - /** - * @declaredat ASTNode:14 - */ - @ASTNodeAnnotation.Constructor( - name = {"Description", "Url", "Extension"}, - type = {"String", "String", "JastAddList<Extension>"}, - kind = {"Token", "Token", "List"} - ) - public ExternalDocObject(String p0, String p1, JastAddList<Extension> p2) { - setDescription(p0); - setUrl(p1); - setChild(p2, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:25 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:31 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:35 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:39 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:43 - */ - public ExternalDocObject clone() throws CloneNotSupportedException { - ExternalDocObject node = (ExternalDocObject) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:48 - */ - public ExternalDocObject copy() { - try { - ExternalDocObject node = (ExternalDocObject) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:67 - */ - @Deprecated - public ExternalDocObject fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:77 - */ - public ExternalDocObject treeCopyNoTransform() { - ExternalDocObject tree = (ExternalDocObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:97 - */ - public ExternalDocObject treeCopy() { - ExternalDocObject tree = (ExternalDocObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:111 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Description == ((ExternalDocObject) node).tokenString_Description) && (tokenString_Url == ((ExternalDocObject) node).tokenString_Url); - } - /** - * Replaces the lexeme Description. - * @param value The new value for the lexeme Description. - * @apilevel high-level - */ - public void setDescription(String value) { - tokenString_Description = value; - } - /** @apilevel internal - */ - protected String tokenString_Description; - /** - * Retrieves the value for the lexeme Description. - * @return The value for the lexeme Description. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Description") - public String getDescription() { - return tokenString_Description != null ? tokenString_Description : ""; - } - /** - * Replaces the lexeme Url. - * @param value The new value for the lexeme Url. - * @apilevel high-level - */ - public void setUrl(String value) { - tokenString_Url = value; - } - /** @apilevel internal - */ - protected String tokenString_Url; - /** - * Retrieves the value for the lexeme Url. - * @return The value for the lexeme Url. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Url") - public String getUrl() { - return tokenString_Url != null ? tokenString_Url : ""; - } - /** - * Replaces the Extension list. - * @param list The new list node to be used as the Extension list. - * @apilevel high-level - */ - public void setExtensionList(JastAddList<Extension> list) { - setChild(list, 0); - } - /** - * Retrieves the number of children in the Extension list. - * @return Number of children in the Extension list. - * @apilevel high-level - */ - public int getNumExtension() { - return getExtensionList().getNumChild(); - } - /** - * Retrieves the number of children in the Extension list. - * Calling this method will not trigger rewrites. - * @return Number of children in the Extension list. - * @apilevel low-level - */ - public int getNumExtensionNoTransform() { - return getExtensionListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the Extension list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the Extension list. - * @apilevel high-level - */ - public Extension getExtension(int i) { - return (Extension) getExtensionList().getChild(i); - } - /** - * Check whether the Extension list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasExtension() { - return getExtensionList().getNumChild() != 0; - } - /** - * Append an element to the Extension list. - * @param node The element to append to the Extension list. - * @apilevel high-level - */ - public void addExtension(Extension node) { - JastAddList<Extension> list = (parent == null) ? getExtensionListNoTransform() : getExtensionList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addExtensionNoTransform(Extension node) { - JastAddList<Extension> list = getExtensionListNoTransform(); - list.addChild(node); - } - /** - * Replaces the Extension list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setExtension(Extension node, int i) { - JastAddList<Extension> list = getExtensionList(); - list.setChild(node, i); - } - /** - * Retrieves the Extension list. - * @return The node representing the Extension list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="Extension") - public JastAddList<Extension> getExtensionList() { - JastAddList<Extension> list = (JastAddList<Extension>) getChild(0); - return list; - } - /** - * Retrieves the Extension list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the Extension list. - * @apilevel low-level - */ - public JastAddList<Extension> getExtensionListNoTransform() { - return (JastAddList<Extension>) getChildNoTransform(0); - } - /** - * @return the element at index {@code i} in the Extension list without - * triggering rewrites. - */ - public Extension getExtensionNoTransform(int i) { - return (Extension) getExtensionListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the Extension list. - * @return The node representing the Extension list. - * @apilevel high-level - */ - public JastAddList<Extension> getExtensions() { - return getExtensionList(); - } - /** - * Retrieves the Extension list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the Extension list. - * @apilevel low-level - */ - public JastAddList<Extension> getExtensionsNoTransform() { - return getExtensionListNoTransform(); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/Get.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/Get.java deleted file mode 100644 index f7f64225f7042b4eff0b175b1aebb13e2419f3dd..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/Get.java +++ /dev/null @@ -1,193 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:39 - * @astdecl Get : ASTNode ::= OperationObject; - * @production Get : {@link ASTNode} ::= <span class="component">{@link OperationObject}</span>; - - */ -public class Get extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public Get() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"OperationObject"}, - type = {"OperationObject"}, - kind = {"Child"} - ) - public Get(OperationObject p0) { - setChild(p0, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public Get clone() throws CloneNotSupportedException { - Get node = (Get) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public Get copy() { - try { - Get node = (Get) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public Get fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public Get treeCopyNoTransform() { - Get tree = (Get) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public Get treeCopy() { - Get tree = (Get) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node); - } - /** - * Replaces the OperationObject child. - * @param node The new node to replace the OperationObject child. - * @apilevel high-level - */ - public void setOperationObject(OperationObject node) { - setChild(node, 0); - } - /** - * Retrieves the OperationObject child. - * @return The current node used as the OperationObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="OperationObject") - public OperationObject getOperationObject() { - return (OperationObject) getChild(0); - } - /** - * Retrieves the OperationObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the OperationObject child. - * @apilevel low-level - */ - public OperationObject getOperationObjectNoTransform() { - return (OperationObject) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/Head.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/Head.java deleted file mode 100644 index b325bbf011b92dea0cdcdd392cf495b0bf08843c..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/Head.java +++ /dev/null @@ -1,193 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:44 - * @astdecl Head : ASTNode ::= OperationObject; - * @production Head : {@link ASTNode} ::= <span class="component">{@link OperationObject}</span>; - - */ -public class Head extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public Head() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"OperationObject"}, - type = {"OperationObject"}, - kind = {"Child"} - ) - public Head(OperationObject p0) { - setChild(p0, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public Head clone() throws CloneNotSupportedException { - Head node = (Head) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public Head copy() { - try { - Head node = (Head) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public Head fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public Head treeCopyNoTransform() { - Head tree = (Head) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public Head treeCopy() { - Head tree = (Head) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node); - } - /** - * Replaces the OperationObject child. - * @param node The new node to replace the OperationObject child. - * @apilevel high-level - */ - public void setOperationObject(OperationObject node) { - setChild(node, 0); - } - /** - * Retrieves the OperationObject child. - * @return The current node used as the OperationObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="OperationObject") - public OperationObject getOperationObject() { - return (OperationObject) getChild(0); - } - /** - * Retrieves the OperationObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the OperationObject child. - * @apilevel low-level - */ - public OperationObject getOperationObjectNoTransform() { - return (OperationObject) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/HeaderObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/HeaderObject.java deleted file mode 100644 index a774d1de31b221488e668dc436601d140bb6a563..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/HeaderObject.java +++ /dev/null @@ -1,706 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:85 - * @astdecl HeaderObject : ASTNode ::= <Description:String> <Required:Boolean> <DeprecatedBoolean:Boolean> <AllowEmptyValue:Boolean> <Style:String> <Explode:Boolean> <AllowReserved:Boolean> [SchemaObject] <Example:Object> ExampleTuple* ContentTuple* <Ref:String>; - * @production HeaderObject : {@link ASTNode} ::= <span class="component"><Description:String></span> <span class="component"><Required:Boolean></span> <span class="component"><DeprecatedBoolean:Boolean></span> <span class="component"><AllowEmptyValue:Boolean></span> <span class="component"><Style:String></span> <span class="component"><Explode:Boolean></span> <span class="component"><AllowReserved:Boolean></span> <span class="component">[{@link SchemaObject}]</span> <span class="component"><Example:Object></span> <span class="component">{@link ExampleTuple}*</span> <span class="component">{@link ContentTuple}*</span> <span class="component"><Ref:String></span>; - - */ -public class HeaderObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:593 - */ - public static Header composeHeader (HeaderObject headerObject){ - Header header = new Header(); - - if( !headerObject.getRef().isEmpty() ) - header.setRef(headerObject.getRef()); - if( headerObject.getRequired() != null ) - header.setRequired(headerObject.getRequired()); - if( !headerObject.getDescription().isEmpty() ) - header.setDescription( headerObject.getDescription() ); - if( !headerObject.getStyle().isEmpty() ) - header.setStyle(headerObject.getStyle()); - if( headerObject.getExplode() != null ) - header.setExplode(headerObject.getExplode()); - if( headerObject.getAllowReserved() != null ) - header.setAllowReserved(headerObject.getAllowReserved()); - if( headerObject.getExample() != null ) - header.setExample(headerObject.getExample()); - if( headerObject.getNumExampleTuple() != 0 ){ - Map<String, Example> examples = new HashMap<>(); - for( ExampleTuple t : headerObject.getExampleTuples() ) - examples.put(t.getKey(), ExampleObject.composeExample(t.getExampleObject())); - header.setExample(examples); - } - if( headerObject.getNumContentTuple() != 0 ){ - Map<String, MediaType> contents = new HashMap<>(); - for( ContentTuple t : headerObject.getContentTuples() ) - contents.put(t.getKey(), MediaTypeObject.composeMediaType(t.getMediaTypeObject())); - header.setContentMediaTypes(contents); - } - if( headerObject.hasSchemaObject() ) - header.setSchema(SchemaObject.composeSchema(headerObject.getSchemaObject())); - - return header; - } - /** - * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:588 - */ - public static HeaderObject parseHeader(Header header){ - HeaderObject headerObject = new HeaderObject(); - - if( header.isRef() ) - headerObject.setRef(header.getRef()); - if( header.getRequired() != null ) - headerObject.setRequired( header.getRequired() ); - if( header.getDescription() != null ) - headerObject.setDescription( header.getDescription() ); - if( header.getDeprecated() != null ) - headerObject.setDeprecatedBoolean( header.getDeprecated() ); - if( header.getStyle() != null ) - headerObject.setStyle( header.getStyle() ); - if( header.getExplode() != null ) - headerObject.setExplode( header.getExplode() ); - if( header.getAllowReserved() != null ) - headerObject.setExplode( header.getAllowReserved() ); - if( header.getExample() != null ) - headerObject.setExample( header.getExample() ); - if( header.getExamples() != null ){ - for( String key : header.getExamples().keySet() ) - headerObject.addExampleTuple(new ExampleTuple(key, ExampleObject.parseExample(header.getExample(key)))); - } - if( header.getContentMediaTypes() != null ){ - for( String key : header.getContentMediaTypes().keySet() ) - headerObject.addContentTuple(new ContentTuple(key, MediaTypeObject.parseMediaType(header.getContentMediaType(key)))); - } - if( header.getSchema() != null ) - headerObject.setSchemaObject(SchemaObject.parseSchema(header.getSchema())); - - return headerObject; - } - /** - * @declaredat ASTNode:1 - */ - public HeaderObject() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[3]; - setChild(new Opt(), 0); - setChild(new JastAddList(), 1); - setChild(new JastAddList(), 2); - } - /** - * @declaredat ASTNode:16 - */ - @ASTNodeAnnotation.Constructor( - name = {"Description", "Required", "DeprecatedBoolean", "AllowEmptyValue", "Style", "Explode", "AllowReserved", "SchemaObject", "Example", "ExampleTuple", "ContentTuple", "Ref"}, - type = {"String", "Boolean", "Boolean", "Boolean", "String", "Boolean", "Boolean", "Opt<SchemaObject>", "Object", "JastAddList<ExampleTuple>", "JastAddList<ContentTuple>", "String"}, - kind = {"Token", "Token", "Token", "Token", "Token", "Token", "Token", "Opt", "Token", "List", "List", "Token"} - ) - public HeaderObject(String p0, Boolean p1, Boolean p2, Boolean p3, String p4, Boolean p5, Boolean p6, Opt<SchemaObject> p7, Object p8, JastAddList<ExampleTuple> p9, JastAddList<ContentTuple> p10, String p11) { - setDescription(p0); - setRequired(p1); - setDeprecatedBoolean(p2); - setAllowEmptyValue(p3); - setStyle(p4); - setExplode(p5); - setAllowReserved(p6); - setChild(p7, 0); - setExample(p8); - setChild(p9, 1); - setChild(p10, 2); - setRef(p11); - } - /** @apilevel low-level - * @declaredat ASTNode:36 - */ - protected int numChildren() { - return 3; - } - /** - * @apilevel internal - * @declaredat ASTNode:42 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:46 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:50 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:54 - */ - public HeaderObject clone() throws CloneNotSupportedException { - HeaderObject node = (HeaderObject) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:59 - */ - public HeaderObject copy() { - try { - HeaderObject node = (HeaderObject) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:78 - */ - @Deprecated - public HeaderObject fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:88 - */ - public HeaderObject treeCopyNoTransform() { - HeaderObject tree = (HeaderObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:108 - */ - public HeaderObject treeCopy() { - HeaderObject tree = (HeaderObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:122 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Description == ((HeaderObject) node).tokenString_Description) && (tokenBoolean_Required == ((HeaderObject) node).tokenBoolean_Required) && (tokenBoolean_DeprecatedBoolean == ((HeaderObject) node).tokenBoolean_DeprecatedBoolean) && (tokenBoolean_AllowEmptyValue == ((HeaderObject) node).tokenBoolean_AllowEmptyValue) && (tokenString_Style == ((HeaderObject) node).tokenString_Style) && (tokenBoolean_Explode == ((HeaderObject) node).tokenBoolean_Explode) && (tokenBoolean_AllowReserved == ((HeaderObject) node).tokenBoolean_AllowReserved) && (tokenObject_Example == ((HeaderObject) node).tokenObject_Example) && (tokenString_Ref == ((HeaderObject) node).tokenString_Ref); - } - /** - * Replaces the lexeme Description. - * @param value The new value for the lexeme Description. - * @apilevel high-level - */ - public void setDescription(String value) { - tokenString_Description = value; - } - /** @apilevel internal - */ - protected String tokenString_Description; - /** - * Retrieves the value for the lexeme Description. - * @return The value for the lexeme Description. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Description") - public String getDescription() { - return tokenString_Description != null ? tokenString_Description : ""; - } - /** - * Replaces the lexeme Required. - * @param value The new value for the lexeme Required. - * @apilevel high-level - */ - public void setRequired(Boolean value) { - tokenBoolean_Required = value; - } - /** @apilevel internal - */ - protected Boolean tokenBoolean_Required; - /** - * Retrieves the value for the lexeme Required. - * @return The value for the lexeme Required. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Required") - public Boolean getRequired() { - return tokenBoolean_Required; - } - /** - * Replaces the lexeme DeprecatedBoolean. - * @param value The new value for the lexeme DeprecatedBoolean. - * @apilevel high-level - */ - public void setDeprecatedBoolean(Boolean value) { - tokenBoolean_DeprecatedBoolean = value; - } - /** @apilevel internal - */ - protected Boolean tokenBoolean_DeprecatedBoolean; - /** - * Retrieves the value for the lexeme DeprecatedBoolean. - * @return The value for the lexeme DeprecatedBoolean. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="DeprecatedBoolean") - public Boolean getDeprecatedBoolean() { - return tokenBoolean_DeprecatedBoolean; - } - /** - * Replaces the lexeme AllowEmptyValue. - * @param value The new value for the lexeme AllowEmptyValue. - * @apilevel high-level - */ - public void setAllowEmptyValue(Boolean value) { - tokenBoolean_AllowEmptyValue = value; - } - /** @apilevel internal - */ - protected Boolean tokenBoolean_AllowEmptyValue; - /** - * Retrieves the value for the lexeme AllowEmptyValue. - * @return The value for the lexeme AllowEmptyValue. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="AllowEmptyValue") - public Boolean getAllowEmptyValue() { - return tokenBoolean_AllowEmptyValue; - } - /** - * Replaces the lexeme Style. - * @param value The new value for the lexeme Style. - * @apilevel high-level - */ - public void setStyle(String value) { - tokenString_Style = value; - } - /** @apilevel internal - */ - protected String tokenString_Style; - /** - * Retrieves the value for the lexeme Style. - * @return The value for the lexeme Style. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Style") - public String getStyle() { - return tokenString_Style != null ? tokenString_Style : ""; - } - /** - * Replaces the lexeme Explode. - * @param value The new value for the lexeme Explode. - * @apilevel high-level - */ - public void setExplode(Boolean value) { - tokenBoolean_Explode = value; - } - /** @apilevel internal - */ - protected Boolean tokenBoolean_Explode; - /** - * Retrieves the value for the lexeme Explode. - * @return The value for the lexeme Explode. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Explode") - public Boolean getExplode() { - return tokenBoolean_Explode; - } - /** - * Replaces the lexeme AllowReserved. - * @param value The new value for the lexeme AllowReserved. - * @apilevel high-level - */ - public void setAllowReserved(Boolean value) { - tokenBoolean_AllowReserved = value; - } - /** @apilevel internal - */ - protected Boolean tokenBoolean_AllowReserved; - /** - * Retrieves the value for the lexeme AllowReserved. - * @return The value for the lexeme AllowReserved. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="AllowReserved") - public Boolean getAllowReserved() { - return tokenBoolean_AllowReserved; - } - /** - * Replaces the optional node for the SchemaObject child. This is the <code>Opt</code> - * node containing the child SchemaObject, not the actual child! - * @param opt The new node to be used as the optional node for the SchemaObject child. - * @apilevel low-level - */ - public void setSchemaObjectOpt(Opt<SchemaObject> opt) { - setChild(opt, 0); - } - /** - * Replaces the (optional) SchemaObject child. - * @param node The new node to be used as the SchemaObject child. - * @apilevel high-level - */ - public void setSchemaObject(SchemaObject node) { - getSchemaObjectOpt().setChild(node, 0); - } - /** - * Check whether the optional SchemaObject child exists. - * @return {@code true} if the optional SchemaObject child exists, {@code false} if it does not. - * @apilevel high-level - */ - public boolean hasSchemaObject() { - return getSchemaObjectOpt().getNumChild() != 0; - } - /** - * Retrieves the (optional) SchemaObject child. - * @return The SchemaObject child, if it exists. Returns {@code null} otherwise. - * @apilevel low-level - */ - public SchemaObject getSchemaObject() { - return (SchemaObject) getSchemaObjectOpt().getChild(0); - } - /** - * Retrieves the optional node for the SchemaObject child. This is the <code>Opt</code> node containing the child SchemaObject, not the actual child! - * @return The optional node for child the SchemaObject child. - * @apilevel low-level - */ - @ASTNodeAnnotation.OptChild(name="SchemaObject") - public Opt<SchemaObject> getSchemaObjectOpt() { - return (Opt<SchemaObject>) getChild(0); - } - /** - * Retrieves the optional node for child SchemaObject. This is the <code>Opt</code> node containing the child SchemaObject, not the actual child! - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child SchemaObject. - * @apilevel low-level - */ - public Opt<SchemaObject> getSchemaObjectOptNoTransform() { - return (Opt<SchemaObject>) getChildNoTransform(0); - } - /** - * Replaces the lexeme Example. - * @param value The new value for the lexeme Example. - * @apilevel high-level - */ - public void setExample(Object value) { - tokenObject_Example = value; - } - /** @apilevel internal - */ - protected Object tokenObject_Example; - /** - * Retrieves the value for the lexeme Example. - * @return The value for the lexeme Example. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Example") - public Object getExample() { - return tokenObject_Example; - } - /** - * Replaces the ExampleTuple list. - * @param list The new list node to be used as the ExampleTuple list. - * @apilevel high-level - */ - public void setExampleTupleList(JastAddList<ExampleTuple> list) { - setChild(list, 1); - } - /** - * Retrieves the number of children in the ExampleTuple list. - * @return Number of children in the ExampleTuple list. - * @apilevel high-level - */ - public int getNumExampleTuple() { - return getExampleTupleList().getNumChild(); - } - /** - * Retrieves the number of children in the ExampleTuple list. - * Calling this method will not trigger rewrites. - * @return Number of children in the ExampleTuple list. - * @apilevel low-level - */ - public int getNumExampleTupleNoTransform() { - return getExampleTupleListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the ExampleTuple list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the ExampleTuple list. - * @apilevel high-level - */ - public ExampleTuple getExampleTuple(int i) { - return (ExampleTuple) getExampleTupleList().getChild(i); - } - /** - * Check whether the ExampleTuple list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasExampleTuple() { - return getExampleTupleList().getNumChild() != 0; - } - /** - * Append an element to the ExampleTuple list. - * @param node The element to append to the ExampleTuple list. - * @apilevel high-level - */ - public void addExampleTuple(ExampleTuple node) { - JastAddList<ExampleTuple> list = (parent == null) ? getExampleTupleListNoTransform() : getExampleTupleList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addExampleTupleNoTransform(ExampleTuple node) { - JastAddList<ExampleTuple> list = getExampleTupleListNoTransform(); - list.addChild(node); - } - /** - * Replaces the ExampleTuple list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setExampleTuple(ExampleTuple node, int i) { - JastAddList<ExampleTuple> list = getExampleTupleList(); - list.setChild(node, i); - } - /** - * Retrieves the ExampleTuple list. - * @return The node representing the ExampleTuple list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="ExampleTuple") - public JastAddList<ExampleTuple> getExampleTupleList() { - JastAddList<ExampleTuple> list = (JastAddList<ExampleTuple>) getChild(1); - return list; - } - /** - * Retrieves the ExampleTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ExampleTuple list. - * @apilevel low-level - */ - public JastAddList<ExampleTuple> getExampleTupleListNoTransform() { - return (JastAddList<ExampleTuple>) getChildNoTransform(1); - } - /** - * @return the element at index {@code i} in the ExampleTuple list without - * triggering rewrites. - */ - public ExampleTuple getExampleTupleNoTransform(int i) { - return (ExampleTuple) getExampleTupleListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the ExampleTuple list. - * @return The node representing the ExampleTuple list. - * @apilevel high-level - */ - public JastAddList<ExampleTuple> getExampleTuples() { - return getExampleTupleList(); - } - /** - * Retrieves the ExampleTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ExampleTuple list. - * @apilevel low-level - */ - public JastAddList<ExampleTuple> getExampleTuplesNoTransform() { - return getExampleTupleListNoTransform(); - } - /** - * Replaces the ContentTuple list. - * @param list The new list node to be used as the ContentTuple list. - * @apilevel high-level - */ - public void setContentTupleList(JastAddList<ContentTuple> list) { - setChild(list, 2); - } - /** - * Retrieves the number of children in the ContentTuple list. - * @return Number of children in the ContentTuple list. - * @apilevel high-level - */ - public int getNumContentTuple() { - return getContentTupleList().getNumChild(); - } - /** - * Retrieves the number of children in the ContentTuple list. - * Calling this method will not trigger rewrites. - * @return Number of children in the ContentTuple list. - * @apilevel low-level - */ - public int getNumContentTupleNoTransform() { - return getContentTupleListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the ContentTuple list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the ContentTuple list. - * @apilevel high-level - */ - public ContentTuple getContentTuple(int i) { - return (ContentTuple) getContentTupleList().getChild(i); - } - /** - * Check whether the ContentTuple list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasContentTuple() { - return getContentTupleList().getNumChild() != 0; - } - /** - * Append an element to the ContentTuple list. - * @param node The element to append to the ContentTuple list. - * @apilevel high-level - */ - public void addContentTuple(ContentTuple node) { - JastAddList<ContentTuple> list = (parent == null) ? getContentTupleListNoTransform() : getContentTupleList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addContentTupleNoTransform(ContentTuple node) { - JastAddList<ContentTuple> list = getContentTupleListNoTransform(); - list.addChild(node); - } - /** - * Replaces the ContentTuple list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setContentTuple(ContentTuple node, int i) { - JastAddList<ContentTuple> list = getContentTupleList(); - list.setChild(node, i); - } - /** - * Retrieves the ContentTuple list. - * @return The node representing the ContentTuple list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="ContentTuple") - public JastAddList<ContentTuple> getContentTupleList() { - JastAddList<ContentTuple> list = (JastAddList<ContentTuple>) getChild(2); - return list; - } - /** - * Retrieves the ContentTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ContentTuple list. - * @apilevel low-level - */ - public JastAddList<ContentTuple> getContentTupleListNoTransform() { - return (JastAddList<ContentTuple>) getChildNoTransform(2); - } - /** - * @return the element at index {@code i} in the ContentTuple list without - * triggering rewrites. - */ - public ContentTuple getContentTupleNoTransform(int i) { - return (ContentTuple) getContentTupleListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the ContentTuple list. - * @return The node representing the ContentTuple list. - * @apilevel high-level - */ - public JastAddList<ContentTuple> getContentTuples() { - return getContentTupleList(); - } - /** - * Retrieves the ContentTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ContentTuple list. - * @apilevel low-level - */ - public JastAddList<ContentTuple> getContentTuplesNoTransform() { - return getContentTupleListNoTransform(); - } - /** - * Replaces the lexeme Ref. - * @param value The new value for the lexeme Ref. - * @apilevel high-level - */ - public void setRef(String value) { - tokenString_Ref = value; - } - /** @apilevel internal - */ - protected String tokenString_Ref; - /** - * Retrieves the value for the lexeme Ref. - * @return The value for the lexeme Ref. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Ref") - public String getRef() { - return tokenString_Ref != null ? tokenString_Ref : ""; - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/HeaderTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/HeaderTuple.java deleted file mode 100644 index 4f6b5b488d9befa1528bbad53ddaf7e96e50c055..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/HeaderTuple.java +++ /dev/null @@ -1,214 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:28 - * @astdecl HeaderTuple : ASTNode ::= <Key:String> HeaderObject; - * @production HeaderTuple : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component">{@link HeaderObject}</span>; - - */ -public class HeaderTuple extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public HeaderTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"Key", "HeaderObject"}, - type = {"String", "HeaderObject"}, - kind = {"Token", "Child"} - ) - public HeaderTuple(String p0, HeaderObject p1) { - setKey(p0); - setChild(p1, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:23 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:29 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:33 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:37 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:41 - */ - public HeaderTuple clone() throws CloneNotSupportedException { - HeaderTuple node = (HeaderTuple) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:46 - */ - public HeaderTuple copy() { - try { - HeaderTuple node = (HeaderTuple) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:65 - */ - @Deprecated - public HeaderTuple fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:75 - */ - public HeaderTuple treeCopyNoTransform() { - HeaderTuple tree = (HeaderTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:95 - */ - public HeaderTuple treeCopy() { - HeaderTuple tree = (HeaderTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:109 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Key == ((HeaderTuple) node).tokenString_Key); - } - /** - * Replaces the lexeme Key. - * @param value The new value for the lexeme Key. - * @apilevel high-level - */ - public void setKey(String value) { - tokenString_Key = value; - } - /** @apilevel internal - */ - protected String tokenString_Key; - /** - * Retrieves the value for the lexeme Key. - * @return The value for the lexeme Key. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Key") - public String getKey() { - return tokenString_Key != null ? tokenString_Key : ""; - } - /** - * Replaces the HeaderObject child. - * @param node The new node to replace the HeaderObject child. - * @apilevel high-level - */ - public void setHeaderObject(HeaderObject node) { - setChild(node, 0); - } - /** - * Retrieves the HeaderObject child. - * @return The current node used as the HeaderObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="HeaderObject") - public HeaderObject getHeaderObject() { - return (HeaderObject) getChild(0); - } - /** - * Retrieves the HeaderObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the HeaderObject child. - * @apilevel low-level - */ - public HeaderObject getHeaderObjectNoTransform() { - return (HeaderObject) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/Implicit.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/Implicit.java deleted file mode 100644 index 8363ac0fa9963bf0c6dca11893bdef7a12ef0de8..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/Implicit.java +++ /dev/null @@ -1,193 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:114 - * @astdecl Implicit : ASTNode ::= OAuthFlowObject; - * @production Implicit : {@link ASTNode} ::= <span class="component">{@link OAuthFlowObject}</span>; - - */ -public class Implicit extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public Implicit() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"OAuthFlowObject"}, - type = {"OAuthFlowObject"}, - kind = {"Child"} - ) - public Implicit(OAuthFlowObject p0) { - setChild(p0, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public Implicit clone() throws CloneNotSupportedException { - Implicit node = (Implicit) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public Implicit copy() { - try { - Implicit node = (Implicit) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public Implicit fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public Implicit treeCopyNoTransform() { - Implicit tree = (Implicit) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public Implicit treeCopy() { - Implicit tree = (Implicit) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node); - } - /** - * Replaces the OAuthFlowObject child. - * @param node The new node to replace the OAuthFlowObject child. - * @apilevel high-level - */ - public void setOAuthFlowObject(OAuthFlowObject node) { - setChild(node, 0); - } - /** - * Retrieves the OAuthFlowObject child. - * @return The current node used as the OAuthFlowObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="OAuthFlowObject") - public OAuthFlowObject getOAuthFlowObject() { - return (OAuthFlowObject) getChild(0); - } - /** - * Retrieves the OAuthFlowObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the OAuthFlowObject child. - * @apilevel low-level - */ - public OAuthFlowObject getOAuthFlowObjectNoTransform() { - return (OAuthFlowObject) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/InfoObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/InfoObject.java deleted file mode 100644 index 075227381ac63cf2ce39e0fa6843a519d270b511..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/InfoObject.java +++ /dev/null @@ -1,522 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:5 - * @astdecl InfoObject : ASTNode ::= <Title:String> <Description:String> <TermsOfService:String> [ContactObject] [LicenseObject] <Version:String> Extension*; - * @production InfoObject : {@link ASTNode} ::= <span class="component"><Title:String></span> <span class="component"><Description:String></span> <span class="component"><TermsOfService:String></span> <span class="component">[{@link ContactObject}]</span> <span class="component">[{@link LicenseObject}]</span> <span class="component"><Version:String></span> <span class="component">{@link Extension}*</span>; - - */ -public class InfoObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:60 - */ - public static Info composeInfo (InfoObject infoObject){ - Info info = new Info(); - - if( !infoObject.getTitle().isEmpty() ) - info.setTitle(infoObject.getTitle()); - if( !infoObject.getVersion().isEmpty() ) - info.setVersion(infoObject.getVersion()); - if( !infoObject.getDescription().isEmpty() ) - info.setDescription(infoObject.getDescription()); - if( !infoObject.getTermsOfService().isEmpty() ) - info.setTermsOfService(infoObject.getTermsOfService()); - if( infoObject.hasContactObject() ) - info.setContact(ContactObject.composeContact(infoObject.getContactObject())); - if( infoObject.hasLicenseObject() ) - info.setLicense(LicenseObject.composeLicense(infoObject.getLicenseObject())); - if( infoObject.getNumExtension() != 0 ){ - Map<String, Object> extension = new HashMap<>(); - for( Extension e : infoObject.getExtensions() ) - extension.put(e.getKey(), e.getValue()); - info.setExtensions(extension); - } - - return info; - } - /** - * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:40 - */ - public static InfoObject parseInfo(Info info) { - InfoObject infoObject = new InfoObject(); - - if( info.getTitle() != null ) - infoObject.setTitle(info.getTitle()); - if( info.getVersion() != null ) - infoObject.setVersion(info.getVersion()); - if( info.getDescription() != null ) - infoObject.setDescription(info.getDescription()); - if( info.getTermsOfService() != null ) - infoObject.setTermsOfService(info.getTermsOfService()); - if( info.getContact() != null ) - infoObject.setContactObject(ContactObject.parseContact(info.getContact())); - if( info.getLicense() != null ) - infoObject.setLicenseObject(LicenseObject.parseLicense(info.getLicense())); - if( info.getExtensions() != null ){ - for( String key : info.getExtensions().keySet() ) - infoObject.addExtension(new Extension(key, info.getExtensions().get(key))); - } - - return infoObject; - } - /** - * @declaredat ASTNode:1 - */ - public InfoObject() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[3]; - setChild(new Opt(), 0); - setChild(new Opt(), 1); - setChild(new JastAddList(), 2); - } - /** - * @declaredat ASTNode:16 - */ - @ASTNodeAnnotation.Constructor( - name = {"Title", "Description", "TermsOfService", "ContactObject", "LicenseObject", "Version", "Extension"}, - type = {"String", "String", "String", "Opt<ContactObject>", "Opt<LicenseObject>", "String", "JastAddList<Extension>"}, - kind = {"Token", "Token", "Token", "Opt", "Opt", "Token", "List"} - ) - public InfoObject(String p0, String p1, String p2, Opt<ContactObject> p3, Opt<LicenseObject> p4, String p5, JastAddList<Extension> p6) { - setTitle(p0); - setDescription(p1); - setTermsOfService(p2); - setChild(p3, 0); - setChild(p4, 1); - setVersion(p5); - setChild(p6, 2); - } - /** @apilevel low-level - * @declaredat ASTNode:31 - */ - protected int numChildren() { - return 3; - } - /** - * @apilevel internal - * @declaredat ASTNode:37 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:41 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:49 - */ - public InfoObject clone() throws CloneNotSupportedException { - InfoObject node = (InfoObject) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:54 - */ - public InfoObject copy() { - try { - InfoObject node = (InfoObject) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:73 - */ - @Deprecated - public InfoObject fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:83 - */ - public InfoObject treeCopyNoTransform() { - InfoObject tree = (InfoObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:103 - */ - public InfoObject treeCopy() { - InfoObject tree = (InfoObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:117 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Title == ((InfoObject) node).tokenString_Title) && (tokenString_Description == ((InfoObject) node).tokenString_Description) && (tokenString_TermsOfService == ((InfoObject) node).tokenString_TermsOfService) && (tokenString_Version == ((InfoObject) node).tokenString_Version); - } - /** - * Replaces the lexeme Title. - * @param value The new value for the lexeme Title. - * @apilevel high-level - */ - public void setTitle(String value) { - tokenString_Title = value; - } - /** @apilevel internal - */ - protected String tokenString_Title; - /** - * Retrieves the value for the lexeme Title. - * @return The value for the lexeme Title. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Title") - public String getTitle() { - return tokenString_Title != null ? tokenString_Title : ""; - } - /** - * Replaces the lexeme Description. - * @param value The new value for the lexeme Description. - * @apilevel high-level - */ - public void setDescription(String value) { - tokenString_Description = value; - } - /** @apilevel internal - */ - protected String tokenString_Description; - /** - * Retrieves the value for the lexeme Description. - * @return The value for the lexeme Description. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Description") - public String getDescription() { - return tokenString_Description != null ? tokenString_Description : ""; - } - /** - * Replaces the lexeme TermsOfService. - * @param value The new value for the lexeme TermsOfService. - * @apilevel high-level - */ - public void setTermsOfService(String value) { - tokenString_TermsOfService = value; - } - /** @apilevel internal - */ - protected String tokenString_TermsOfService; - /** - * Retrieves the value for the lexeme TermsOfService. - * @return The value for the lexeme TermsOfService. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="TermsOfService") - public String getTermsOfService() { - return tokenString_TermsOfService != null ? tokenString_TermsOfService : ""; - } - /** - * Replaces the optional node for the ContactObject child. This is the <code>Opt</code> - * node containing the child ContactObject, not the actual child! - * @param opt The new node to be used as the optional node for the ContactObject child. - * @apilevel low-level - */ - public void setContactObjectOpt(Opt<ContactObject> opt) { - setChild(opt, 0); - } - /** - * Replaces the (optional) ContactObject child. - * @param node The new node to be used as the ContactObject child. - * @apilevel high-level - */ - public void setContactObject(ContactObject node) { - getContactObjectOpt().setChild(node, 0); - } - /** - * Check whether the optional ContactObject child exists. - * @return {@code true} if the optional ContactObject child exists, {@code false} if it does not. - * @apilevel high-level - */ - public boolean hasContactObject() { - return getContactObjectOpt().getNumChild() != 0; - } - /** - * Retrieves the (optional) ContactObject child. - * @return The ContactObject child, if it exists. Returns {@code null} otherwise. - * @apilevel low-level - */ - public ContactObject getContactObject() { - return (ContactObject) getContactObjectOpt().getChild(0); - } - /** - * Retrieves the optional node for the ContactObject child. This is the <code>Opt</code> node containing the child ContactObject, not the actual child! - * @return The optional node for child the ContactObject child. - * @apilevel low-level - */ - @ASTNodeAnnotation.OptChild(name="ContactObject") - public Opt<ContactObject> getContactObjectOpt() { - return (Opt<ContactObject>) getChild(0); - } - /** - * Retrieves the optional node for child ContactObject. This is the <code>Opt</code> node containing the child ContactObject, not the actual child! - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child ContactObject. - * @apilevel low-level - */ - public Opt<ContactObject> getContactObjectOptNoTransform() { - return (Opt<ContactObject>) getChildNoTransform(0); - } - /** - * Replaces the optional node for the LicenseObject child. This is the <code>Opt</code> - * node containing the child LicenseObject, not the actual child! - * @param opt The new node to be used as the optional node for the LicenseObject child. - * @apilevel low-level - */ - public void setLicenseObjectOpt(Opt<LicenseObject> opt) { - setChild(opt, 1); - } - /** - * Replaces the (optional) LicenseObject child. - * @param node The new node to be used as the LicenseObject child. - * @apilevel high-level - */ - public void setLicenseObject(LicenseObject node) { - getLicenseObjectOpt().setChild(node, 0); - } - /** - * Check whether the optional LicenseObject child exists. - * @return {@code true} if the optional LicenseObject child exists, {@code false} if it does not. - * @apilevel high-level - */ - public boolean hasLicenseObject() { - return getLicenseObjectOpt().getNumChild() != 0; - } - /** - * Retrieves the (optional) LicenseObject child. - * @return The LicenseObject child, if it exists. Returns {@code null} otherwise. - * @apilevel low-level - */ - public LicenseObject getLicenseObject() { - return (LicenseObject) getLicenseObjectOpt().getChild(0); - } - /** - * Retrieves the optional node for the LicenseObject child. This is the <code>Opt</code> node containing the child LicenseObject, not the actual child! - * @return The optional node for child the LicenseObject child. - * @apilevel low-level - */ - @ASTNodeAnnotation.OptChild(name="LicenseObject") - public Opt<LicenseObject> getLicenseObjectOpt() { - return (Opt<LicenseObject>) getChild(1); - } - /** - * Retrieves the optional node for child LicenseObject. This is the <code>Opt</code> node containing the child LicenseObject, not the actual child! - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child LicenseObject. - * @apilevel low-level - */ - public Opt<LicenseObject> getLicenseObjectOptNoTransform() { - return (Opt<LicenseObject>) getChildNoTransform(1); - } - /** - * Replaces the lexeme Version. - * @param value The new value for the lexeme Version. - * @apilevel high-level - */ - public void setVersion(String value) { - tokenString_Version = value; - } - /** @apilevel internal - */ - protected String tokenString_Version; - /** - * Retrieves the value for the lexeme Version. - * @return The value for the lexeme Version. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Version") - public String getVersion() { - return tokenString_Version != null ? tokenString_Version : ""; - } - /** - * Replaces the Extension list. - * @param list The new list node to be used as the Extension list. - * @apilevel high-level - */ - public void setExtensionList(JastAddList<Extension> list) { - setChild(list, 2); - } - /** - * Retrieves the number of children in the Extension list. - * @return Number of children in the Extension list. - * @apilevel high-level - */ - public int getNumExtension() { - return getExtensionList().getNumChild(); - } - /** - * Retrieves the number of children in the Extension list. - * Calling this method will not trigger rewrites. - * @return Number of children in the Extension list. - * @apilevel low-level - */ - public int getNumExtensionNoTransform() { - return getExtensionListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the Extension list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the Extension list. - * @apilevel high-level - */ - public Extension getExtension(int i) { - return (Extension) getExtensionList().getChild(i); - } - /** - * Check whether the Extension list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasExtension() { - return getExtensionList().getNumChild() != 0; - } - /** - * Append an element to the Extension list. - * @param node The element to append to the Extension list. - * @apilevel high-level - */ - public void addExtension(Extension node) { - JastAddList<Extension> list = (parent == null) ? getExtensionListNoTransform() : getExtensionList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addExtensionNoTransform(Extension node) { - JastAddList<Extension> list = getExtensionListNoTransform(); - list.addChild(node); - } - /** - * Replaces the Extension list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setExtension(Extension node, int i) { - JastAddList<Extension> list = getExtensionList(); - list.setChild(node, i); - } - /** - * Retrieves the Extension list. - * @return The node representing the Extension list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="Extension") - public JastAddList<Extension> getExtensionList() { - JastAddList<Extension> list = (JastAddList<Extension>) getChild(2); - return list; - } - /** - * Retrieves the Extension list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the Extension list. - * @apilevel low-level - */ - public JastAddList<Extension> getExtensionListNoTransform() { - return (JastAddList<Extension>) getChildNoTransform(2); - } - /** - * @return the element at index {@code i} in the Extension list without - * triggering rewrites. - */ - public Extension getExtensionNoTransform(int i) { - return (Extension) getExtensionListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the Extension list. - * @return The node representing the Extension list. - * @apilevel high-level - */ - public JastAddList<Extension> getExtensions() { - return getExtensionList(); - } - /** - * Retrieves the Extension list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the Extension list. - * @apilevel low-level - */ - public JastAddList<Extension> getExtensionsNoTransform() { - return getExtensionListNoTransform(); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ItemsSchema.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ItemsSchema.java deleted file mode 100644 index 8456ac18289042f47b48e3e0852a2e692e0090ee..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ItemsSchema.java +++ /dev/null @@ -1,193 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:94 - * @astdecl ItemsSchema : ASTNode ::= SchemaObject; - * @production ItemsSchema : {@link ASTNode} ::= <span class="component">{@link SchemaObject}</span>; - - */ -public class ItemsSchema extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public ItemsSchema() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"SchemaObject"}, - type = {"SchemaObject"}, - kind = {"Child"} - ) - public ItemsSchema(SchemaObject p0) { - setChild(p0, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public ItemsSchema clone() throws CloneNotSupportedException { - ItemsSchema node = (ItemsSchema) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public ItemsSchema copy() { - try { - ItemsSchema node = (ItemsSchema) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public ItemsSchema fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public ItemsSchema treeCopyNoTransform() { - ItemsSchema tree = (ItemsSchema) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public ItemsSchema treeCopy() { - ItemsSchema tree = (ItemsSchema) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node); - } - /** - * Replaces the SchemaObject child. - * @param node The new node to replace the SchemaObject child. - * @apilevel high-level - */ - public void setSchemaObject(SchemaObject node) { - setChild(node, 0); - } - /** - * Retrieves the SchemaObject child. - * @return The current node used as the SchemaObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="SchemaObject") - public SchemaObject getSchemaObject() { - return (SchemaObject) getChild(0); - } - /** - * Retrieves the SchemaObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the SchemaObject child. - * @apilevel low-level - */ - public SchemaObject getSchemaObjectNoTransform() { - return (SchemaObject) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/JastAddList.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/JastAddList.java deleted file mode 100644 index 6098d9f64e8f895be89892a988f2785790ea0905..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/JastAddList.java +++ /dev/null @@ -1,204 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @astdecl JastAddList : ASTNode; - * @production JastAddList : {@link ASTNode}; - - */ -public class JastAddList<T extends ASTNode> extends ASTNode<T> implements Cloneable, Iterable<T> { - /** - * @declaredat ASTNode:1 - */ - public JastAddList() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - } - /** - * @declaredat ASTNode:12 - */ - public JastAddList(T... initialChildren) { - children = new ASTNode[initialChildren.length]; - for (int i = 0; i < children.length; ++i) { - addChild(initialChildren[i]); - } - } - /** - * @declaredat ASTNode:20 - */ - public JastAddList<T> add(T node) { - addChild(node); - return this; - } - /** - * @declaredat ASTNode:25 - */ - public JastAddList<T> addAll(Iterable<? extends T> c) { - for (T node : c) { - addChild(node); - } - return this; - } - /** - * @declaredat ASTNode:32 - */ - public void insertChild(ASTNode node, int i) { - super.insertChild(node, i); - } - /** - * @declaredat ASTNode:36 - */ - public void addChild(T node) { - super.addChild(node); - } - /** @apilevel low-level - * @declaredat ASTNode:41 - */ - public void removeChild(int i) { - super.removeChild(i); - } - /** - * @declaredat ASTNode:45 - */ - public int getNumChild() { - return getNumChildNoTransform(); - } - /** @return an iterator to iterate over elements in this list node. - * @declaredat ASTNode:50 - */ - @Override - public java.util.Iterator<T> iterator() { - return astChildIterator(); - } - /** - * @apilevel internal - * @declaredat ASTNode:57 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:61 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:65 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:69 - */ - public JastAddList<T> clone() throws CloneNotSupportedException { - JastAddList node = (JastAddList) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:74 - */ - public JastAddList<T> copy() { - try { - JastAddList node = (JastAddList) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:93 - */ - @Deprecated - public JastAddList<T> fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:103 - */ - public JastAddList<T> treeCopyNoTransform() { - JastAddList tree = (JastAddList) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:123 - */ - public JastAddList<T> treeCopy() { - JastAddList tree = (JastAddList) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:137 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/LicenseObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/LicenseObject.java deleted file mode 100644 index 254426f25a0dc2aeab2dc6aabbd8449b1f906246..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/LicenseObject.java +++ /dev/null @@ -1,235 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:11 - * @astdecl LicenseObject : ASTNode ::= <Name:String> <Url:String>; - * @production LicenseObject : {@link ASTNode} ::= <span class="component"><Name:String></span> <span class="component"><Url:String></span>; - - */ -public class LicenseObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:104 - */ - public static License composeLicense (LicenseObject licenseObject){ - License license = new License(); - - if( !licenseObject.getName().isEmpty() ) - license.setName( licenseObject.getName() ); - if( !licenseObject.getUrl().isEmpty() ) - license.setUrl( licenseObject.getUrl() ); - - return license; - } - /** - * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:80 - */ - public static LicenseObject parseLicense(License license){ - LicenseObject licenseObject = new LicenseObject(); - - if( license.getName() != null ) - licenseObject.setName( license.getName() ); - if( license.getUrl() != null ) - licenseObject.setUrl( license.getUrl() ); - - return licenseObject; - } - /** - * @declaredat ASTNode:1 - */ - public LicenseObject() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - } - /** - * @declaredat ASTNode:12 - */ - @ASTNodeAnnotation.Constructor( - name = {"Name", "Url"}, - type = {"String", "String"}, - kind = {"Token", "Token"} - ) - public LicenseObject(String p0, String p1) { - setName(p0); - setUrl(p1); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 0; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public LicenseObject clone() throws CloneNotSupportedException { - LicenseObject node = (LicenseObject) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public LicenseObject copy() { - try { - LicenseObject node = (LicenseObject) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public LicenseObject fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public LicenseObject treeCopyNoTransform() { - LicenseObject tree = (LicenseObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public LicenseObject treeCopy() { - LicenseObject tree = (LicenseObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Name == ((LicenseObject) node).tokenString_Name) && (tokenString_Url == ((LicenseObject) node).tokenString_Url); - } - /** - * Replaces the lexeme Name. - * @param value The new value for the lexeme Name. - * @apilevel high-level - */ - public void setName(String value) { - tokenString_Name = value; - } - /** @apilevel internal - */ - protected String tokenString_Name; - /** - * Retrieves the value for the lexeme Name. - * @return The value for the lexeme Name. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Name") - public String getName() { - return tokenString_Name != null ? tokenString_Name : ""; - } - /** - * Replaces the lexeme Url. - * @param value The new value for the lexeme Url. - * @apilevel high-level - */ - public void setUrl(String value) { - tokenString_Url = value; - } - /** @apilevel internal - */ - protected String tokenString_Url; - /** - * Retrieves the value for the lexeme Url. - * @return The value for the lexeme Url. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Url") - public String getUrl() { - return tokenString_Url != null ? tokenString_Url : ""; - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkObject.java deleted file mode 100644 index fa09d64613c16210f344447827aa9090eca5d99c..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkObject.java +++ /dev/null @@ -1,577 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:81 - * @astdecl LinkObject : ASTNode ::= <OperationRef:String> <OperationID:String> LinkParameterTuple* HeaderTuple* <Description:String> [ServerObject] <Ref:String>; - * @production LinkObject : {@link ASTNode} ::= <span class="component"><OperationRef:String></span> <span class="component"><OperationID:String></span> <span class="component">{@link LinkParameterTuple}*</span> <span class="component">{@link HeaderTuple}*</span> <span class="component"><Description:String></span> <span class="component">[{@link ServerObject}]</span> <span class="component"><Ref:String></span>; - - */ -public class LinkObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:570 - */ - public static Link composeLink (LinkObject linkObject){ - Link link = new Link(); - - if( !linkObject.getRef().isEmpty() ) - link.setRef(linkObject.getRef()); - if( !linkObject.getOperationRef().isEmpty() ) - link.setOperationRef( linkObject.getOperationRef() ); - if( !linkObject.getOperationID().isEmpty() ) - link.setOperationId( linkObject.getOperationID() ); - if( linkObject.getNumLinkParameterTuple() != 0 ){ - Map<String, String> parameters = new HashMap<>(); - for( LinkParameterTuple t : linkObject.getLinkParameterTuples() ) - parameters.put( t.getLinkParameterKey(), t.getLinkParameterValue() ); - link.setParameters(parameters); - } - if( !linkObject.getDescription().isEmpty() ) - link.setDescription( linkObject.getDescription() ); - if( linkObject.hasServerObject() ) - link.setServer( ServerObject.composeServer(linkObject.getServerObject()) ); - - return link; - } - /** - * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:567 - */ - public static LinkObject parseLink(Link link){ - LinkObject linkObject = new LinkObject(); - - if( link.isRef() ) - linkObject.setRef(link.getRef()); - if( link.getOperationRef() != null ) - linkObject.setOperationRef( link.getOperationRef() ); - if( link.getOperationId() != null ) - linkObject.setOperationID( link.getOperationId() ); - if( link.getParameters() != null ){ - for( String key : link.getParameters().keySet() ) - linkObject.addLinkParameterTuple(new LinkParameterTuple(key, link.getParameter(key))); - } - if( link.getDescription() != null ) - linkObject.setDescription( link.getDescription() ); - if( link.getServer() != null ) - linkObject.setServerObject( ServerObject.parseServer(link.getServer()) ); - - return linkObject; - } - /** - * @declaredat ASTNode:1 - */ - public LinkObject() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[3]; - setChild(new JastAddList(), 0); - setChild(new JastAddList(), 1); - setChild(new Opt(), 2); - } - /** - * @declaredat ASTNode:16 - */ - @ASTNodeAnnotation.Constructor( - name = {"OperationRef", "OperationID", "LinkParameterTuple", "HeaderTuple", "Description", "ServerObject", "Ref"}, - type = {"String", "String", "JastAddList<LinkParameterTuple>", "JastAddList<HeaderTuple>", "String", "Opt<ServerObject>", "String"}, - kind = {"Token", "Token", "List", "List", "Token", "Opt", "Token"} - ) - public LinkObject(String p0, String p1, JastAddList<LinkParameterTuple> p2, JastAddList<HeaderTuple> p3, String p4, Opt<ServerObject> p5, String p6) { - setOperationRef(p0); - setOperationID(p1); - setChild(p2, 0); - setChild(p3, 1); - setDescription(p4); - setChild(p5, 2); - setRef(p6); - } - /** @apilevel low-level - * @declaredat ASTNode:31 - */ - protected int numChildren() { - return 3; - } - /** - * @apilevel internal - * @declaredat ASTNode:37 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:41 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:49 - */ - public LinkObject clone() throws CloneNotSupportedException { - LinkObject node = (LinkObject) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:54 - */ - public LinkObject copy() { - try { - LinkObject node = (LinkObject) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:73 - */ - @Deprecated - public LinkObject fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:83 - */ - public LinkObject treeCopyNoTransform() { - LinkObject tree = (LinkObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:103 - */ - public LinkObject treeCopy() { - LinkObject tree = (LinkObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:117 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_OperationRef == ((LinkObject) node).tokenString_OperationRef) && (tokenString_OperationID == ((LinkObject) node).tokenString_OperationID) && (tokenString_Description == ((LinkObject) node).tokenString_Description) && (tokenString_Ref == ((LinkObject) node).tokenString_Ref); - } - /** - * Replaces the lexeme OperationRef. - * @param value The new value for the lexeme OperationRef. - * @apilevel high-level - */ - public void setOperationRef(String value) { - tokenString_OperationRef = value; - } - /** @apilevel internal - */ - protected String tokenString_OperationRef; - /** - * Retrieves the value for the lexeme OperationRef. - * @return The value for the lexeme OperationRef. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="OperationRef") - public String getOperationRef() { - return tokenString_OperationRef != null ? tokenString_OperationRef : ""; - } - /** - * Replaces the lexeme OperationID. - * @param value The new value for the lexeme OperationID. - * @apilevel high-level - */ - public void setOperationID(String value) { - tokenString_OperationID = value; - } - /** @apilevel internal - */ - protected String tokenString_OperationID; - /** - * Retrieves the value for the lexeme OperationID. - * @return The value for the lexeme OperationID. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="OperationID") - public String getOperationID() { - return tokenString_OperationID != null ? tokenString_OperationID : ""; - } - /** - * Replaces the LinkParameterTuple list. - * @param list The new list node to be used as the LinkParameterTuple list. - * @apilevel high-level - */ - public void setLinkParameterTupleList(JastAddList<LinkParameterTuple> list) { - setChild(list, 0); - } - /** - * Retrieves the number of children in the LinkParameterTuple list. - * @return Number of children in the LinkParameterTuple list. - * @apilevel high-level - */ - public int getNumLinkParameterTuple() { - return getLinkParameterTupleList().getNumChild(); - } - /** - * Retrieves the number of children in the LinkParameterTuple list. - * Calling this method will not trigger rewrites. - * @return Number of children in the LinkParameterTuple list. - * @apilevel low-level - */ - public int getNumLinkParameterTupleNoTransform() { - return getLinkParameterTupleListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the LinkParameterTuple list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the LinkParameterTuple list. - * @apilevel high-level - */ - public LinkParameterTuple getLinkParameterTuple(int i) { - return (LinkParameterTuple) getLinkParameterTupleList().getChild(i); - } - /** - * Check whether the LinkParameterTuple list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasLinkParameterTuple() { - return getLinkParameterTupleList().getNumChild() != 0; - } - /** - * Append an element to the LinkParameterTuple list. - * @param node The element to append to the LinkParameterTuple list. - * @apilevel high-level - */ - public void addLinkParameterTuple(LinkParameterTuple node) { - JastAddList<LinkParameterTuple> list = (parent == null) ? getLinkParameterTupleListNoTransform() : getLinkParameterTupleList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addLinkParameterTupleNoTransform(LinkParameterTuple node) { - JastAddList<LinkParameterTuple> list = getLinkParameterTupleListNoTransform(); - list.addChild(node); - } - /** - * Replaces the LinkParameterTuple list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setLinkParameterTuple(LinkParameterTuple node, int i) { - JastAddList<LinkParameterTuple> list = getLinkParameterTupleList(); - list.setChild(node, i); - } - /** - * Retrieves the LinkParameterTuple list. - * @return The node representing the LinkParameterTuple list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="LinkParameterTuple") - public JastAddList<LinkParameterTuple> getLinkParameterTupleList() { - JastAddList<LinkParameterTuple> list = (JastAddList<LinkParameterTuple>) getChild(0); - return list; - } - /** - * Retrieves the LinkParameterTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the LinkParameterTuple list. - * @apilevel low-level - */ - public JastAddList<LinkParameterTuple> getLinkParameterTupleListNoTransform() { - return (JastAddList<LinkParameterTuple>) getChildNoTransform(0); - } - /** - * @return the element at index {@code i} in the LinkParameterTuple list without - * triggering rewrites. - */ - public LinkParameterTuple getLinkParameterTupleNoTransform(int i) { - return (LinkParameterTuple) getLinkParameterTupleListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the LinkParameterTuple list. - * @return The node representing the LinkParameterTuple list. - * @apilevel high-level - */ - public JastAddList<LinkParameterTuple> getLinkParameterTuples() { - return getLinkParameterTupleList(); - } - /** - * Retrieves the LinkParameterTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the LinkParameterTuple list. - * @apilevel low-level - */ - public JastAddList<LinkParameterTuple> getLinkParameterTuplesNoTransform() { - return getLinkParameterTupleListNoTransform(); - } - /** - * Replaces the HeaderTuple list. - * @param list The new list node to be used as the HeaderTuple list. - * @apilevel high-level - */ - public void setHeaderTupleList(JastAddList<HeaderTuple> list) { - setChild(list, 1); - } - /** - * Retrieves the number of children in the HeaderTuple list. - * @return Number of children in the HeaderTuple list. - * @apilevel high-level - */ - public int getNumHeaderTuple() { - return getHeaderTupleList().getNumChild(); - } - /** - * Retrieves the number of children in the HeaderTuple list. - * Calling this method will not trigger rewrites. - * @return Number of children in the HeaderTuple list. - * @apilevel low-level - */ - public int getNumHeaderTupleNoTransform() { - return getHeaderTupleListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the HeaderTuple list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the HeaderTuple list. - * @apilevel high-level - */ - public HeaderTuple getHeaderTuple(int i) { - return (HeaderTuple) getHeaderTupleList().getChild(i); - } - /** - * Check whether the HeaderTuple list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasHeaderTuple() { - return getHeaderTupleList().getNumChild() != 0; - } - /** - * Append an element to the HeaderTuple list. - * @param node The element to append to the HeaderTuple list. - * @apilevel high-level - */ - public void addHeaderTuple(HeaderTuple node) { - JastAddList<HeaderTuple> list = (parent == null) ? getHeaderTupleListNoTransform() : getHeaderTupleList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addHeaderTupleNoTransform(HeaderTuple node) { - JastAddList<HeaderTuple> list = getHeaderTupleListNoTransform(); - list.addChild(node); - } - /** - * Replaces the HeaderTuple list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setHeaderTuple(HeaderTuple node, int i) { - JastAddList<HeaderTuple> list = getHeaderTupleList(); - list.setChild(node, i); - } - /** - * Retrieves the HeaderTuple list. - * @return The node representing the HeaderTuple list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="HeaderTuple") - public JastAddList<HeaderTuple> getHeaderTupleList() { - JastAddList<HeaderTuple> list = (JastAddList<HeaderTuple>) getChild(1); - return list; - } - /** - * Retrieves the HeaderTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the HeaderTuple list. - * @apilevel low-level - */ - public JastAddList<HeaderTuple> getHeaderTupleListNoTransform() { - return (JastAddList<HeaderTuple>) getChildNoTransform(1); - } - /** - * @return the element at index {@code i} in the HeaderTuple list without - * triggering rewrites. - */ - public HeaderTuple getHeaderTupleNoTransform(int i) { - return (HeaderTuple) getHeaderTupleListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the HeaderTuple list. - * @return The node representing the HeaderTuple list. - * @apilevel high-level - */ - public JastAddList<HeaderTuple> getHeaderTuples() { - return getHeaderTupleList(); - } - /** - * Retrieves the HeaderTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the HeaderTuple list. - * @apilevel low-level - */ - public JastAddList<HeaderTuple> getHeaderTuplesNoTransform() { - return getHeaderTupleListNoTransform(); - } - /** - * Replaces the lexeme Description. - * @param value The new value for the lexeme Description. - * @apilevel high-level - */ - public void setDescription(String value) { - tokenString_Description = value; - } - /** @apilevel internal - */ - protected String tokenString_Description; - /** - * Retrieves the value for the lexeme Description. - * @return The value for the lexeme Description. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Description") - public String getDescription() { - return tokenString_Description != null ? tokenString_Description : ""; - } - /** - * Replaces the optional node for the ServerObject child. This is the <code>Opt</code> - * node containing the child ServerObject, not the actual child! - * @param opt The new node to be used as the optional node for the ServerObject child. - * @apilevel low-level - */ - public void setServerObjectOpt(Opt<ServerObject> opt) { - setChild(opt, 2); - } - /** - * Replaces the (optional) ServerObject child. - * @param node The new node to be used as the ServerObject child. - * @apilevel high-level - */ - public void setServerObject(ServerObject node) { - getServerObjectOpt().setChild(node, 0); - } - /** - * Check whether the optional ServerObject child exists. - * @return {@code true} if the optional ServerObject child exists, {@code false} if it does not. - * @apilevel high-level - */ - public boolean hasServerObject() { - return getServerObjectOpt().getNumChild() != 0; - } - /** - * Retrieves the (optional) ServerObject child. - * @return The ServerObject child, if it exists. Returns {@code null} otherwise. - * @apilevel low-level - */ - public ServerObject getServerObject() { - return (ServerObject) getServerObjectOpt().getChild(0); - } - /** - * Retrieves the optional node for the ServerObject child. This is the <code>Opt</code> node containing the child ServerObject, not the actual child! - * @return The optional node for child the ServerObject child. - * @apilevel low-level - */ - @ASTNodeAnnotation.OptChild(name="ServerObject") - public Opt<ServerObject> getServerObjectOpt() { - return (Opt<ServerObject>) getChild(2); - } - /** - * Retrieves the optional node for child ServerObject. This is the <code>Opt</code> node containing the child ServerObject, not the actual child! - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child ServerObject. - * @apilevel low-level - */ - public Opt<ServerObject> getServerObjectOptNoTransform() { - return (Opt<ServerObject>) getChildNoTransform(2); - } - /** - * Replaces the lexeme Ref. - * @param value The new value for the lexeme Ref. - * @apilevel high-level - */ - public void setRef(String value) { - tokenString_Ref = value; - } - /** @apilevel internal - */ - protected String tokenString_Ref; - /** - * Retrieves the value for the lexeme Ref. - * @return The value for the lexeme Ref. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Ref") - public String getRef() { - return tokenString_Ref != null ? tokenString_Ref : ""; - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkParameterTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkParameterTuple.java deleted file mode 100644 index 72712a758de713792bc6a1561d0ee953b0039a74..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkParameterTuple.java +++ /dev/null @@ -1,207 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:82 - * @astdecl LinkParameterTuple : ASTNode ::= <LinkParameterKey:String> <LinkParameterValue:String>; - * @production LinkParameterTuple : {@link ASTNode} ::= <span class="component"><LinkParameterKey:String></span> <span class="component"><LinkParameterValue:String></span>; - - */ -public class LinkParameterTuple extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public LinkParameterTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - } - /** - * @declaredat ASTNode:12 - */ - @ASTNodeAnnotation.Constructor( - name = {"LinkParameterKey", "LinkParameterValue"}, - type = {"String", "String"}, - kind = {"Token", "Token"} - ) - public LinkParameterTuple(String p0, String p1) { - setLinkParameterKey(p0); - setLinkParameterValue(p1); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 0; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public LinkParameterTuple clone() throws CloneNotSupportedException { - LinkParameterTuple node = (LinkParameterTuple) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public LinkParameterTuple copy() { - try { - LinkParameterTuple node = (LinkParameterTuple) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public LinkParameterTuple fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public LinkParameterTuple treeCopyNoTransform() { - LinkParameterTuple tree = (LinkParameterTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public LinkParameterTuple treeCopy() { - LinkParameterTuple tree = (LinkParameterTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_LinkParameterKey == ((LinkParameterTuple) node).tokenString_LinkParameterKey) && (tokenString_LinkParameterValue == ((LinkParameterTuple) node).tokenString_LinkParameterValue); - } - /** - * Replaces the lexeme LinkParameterKey. - * @param value The new value for the lexeme LinkParameterKey. - * @apilevel high-level - */ - public void setLinkParameterKey(String value) { - tokenString_LinkParameterKey = value; - } - /** @apilevel internal - */ - protected String tokenString_LinkParameterKey; - /** - * Retrieves the value for the lexeme LinkParameterKey. - * @return The value for the lexeme LinkParameterKey. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="LinkParameterKey") - public String getLinkParameterKey() { - return tokenString_LinkParameterKey != null ? tokenString_LinkParameterKey : ""; - } - /** - * Replaces the lexeme LinkParameterValue. - * @param value The new value for the lexeme LinkParameterValue. - * @apilevel high-level - */ - public void setLinkParameterValue(String value) { - tokenString_LinkParameterValue = value; - } - /** @apilevel internal - */ - protected String tokenString_LinkParameterValue; - /** - * Retrieves the value for the lexeme LinkParameterValue. - * @return The value for the lexeme LinkParameterValue. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="LinkParameterValue") - public String getLinkParameterValue() { - return tokenString_LinkParameterValue != null ? tokenString_LinkParameterValue : ""; - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkTuple.java deleted file mode 100644 index 2d619b681acc5576c911bc126e2e287043bea73f..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkTuple.java +++ /dev/null @@ -1,214 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:30 - * @astdecl LinkTuple : ASTNode ::= <Key:String> LinkObject; - * @production LinkTuple : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component">{@link LinkObject}</span>; - - */ -public class LinkTuple extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public LinkTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"Key", "LinkObject"}, - type = {"String", "LinkObject"}, - kind = {"Token", "Child"} - ) - public LinkTuple(String p0, LinkObject p1) { - setKey(p0); - setChild(p1, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:23 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:29 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:33 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:37 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:41 - */ - public LinkTuple clone() throws CloneNotSupportedException { - LinkTuple node = (LinkTuple) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:46 - */ - public LinkTuple copy() { - try { - LinkTuple node = (LinkTuple) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:65 - */ - @Deprecated - public LinkTuple fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:75 - */ - public LinkTuple treeCopyNoTransform() { - LinkTuple tree = (LinkTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:95 - */ - public LinkTuple treeCopy() { - LinkTuple tree = (LinkTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:109 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Key == ((LinkTuple) node).tokenString_Key); - } - /** - * Replaces the lexeme Key. - * @param value The new value for the lexeme Key. - * @apilevel high-level - */ - public void setKey(String value) { - tokenString_Key = value; - } - /** @apilevel internal - */ - protected String tokenString_Key; - /** - * Retrieves the value for the lexeme Key. - * @return The value for the lexeme Key. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Key") - public String getKey() { - return tokenString_Key != null ? tokenString_Key : ""; - } - /** - * Replaces the LinkObject child. - * @param node The new node to replace the LinkObject child. - * @apilevel high-level - */ - public void setLinkObject(LinkObject node) { - setChild(node, 0); - } - /** - * Retrieves the LinkObject child. - * @return The current node used as the LinkObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="LinkObject") - public LinkObject getLinkObject() { - return (LinkObject) getChild(0); - } - /** - * Retrieves the LinkObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the LinkObject child. - * @apilevel low-level - */ - public LinkObject getLinkObjectNoTransform() { - return (LinkObject) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/MappingTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/MappingTuple.java deleted file mode 100644 index 0023f6c3c1f944354b2935504b4f1713c6b2c4df..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/MappingTuple.java +++ /dev/null @@ -1,207 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:104 - * @astdecl MappingTuple : ASTNode ::= <Key:String> <Value:String>; - * @production MappingTuple : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component"><Value:String></span>; - - */ -public class MappingTuple extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public MappingTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - } - /** - * @declaredat ASTNode:12 - */ - @ASTNodeAnnotation.Constructor( - name = {"Key", "Value"}, - type = {"String", "String"}, - kind = {"Token", "Token"} - ) - public MappingTuple(String p0, String p1) { - setKey(p0); - setValue(p1); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 0; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public MappingTuple clone() throws CloneNotSupportedException { - MappingTuple node = (MappingTuple) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public MappingTuple copy() { - try { - MappingTuple node = (MappingTuple) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public MappingTuple fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public MappingTuple treeCopyNoTransform() { - MappingTuple tree = (MappingTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public MappingTuple treeCopy() { - MappingTuple tree = (MappingTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Key == ((MappingTuple) node).tokenString_Key) && (tokenString_Value == ((MappingTuple) node).tokenString_Value); - } - /** - * Replaces the lexeme Key. - * @param value The new value for the lexeme Key. - * @apilevel high-level - */ - public void setKey(String value) { - tokenString_Key = value; - } - /** @apilevel internal - */ - protected String tokenString_Key; - /** - * Retrieves the value for the lexeme Key. - * @return The value for the lexeme Key. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Key") - public String getKey() { - return tokenString_Key != null ? tokenString_Key : ""; - } - /** - * Replaces the lexeme Value. - * @param value The new value for the lexeme Value. - * @apilevel high-level - */ - public void setValue(String value) { - tokenString_Value = value; - } - /** @apilevel internal - */ - protected String tokenString_Value; - /** - * Retrieves the value for the lexeme Value. - * @return The value for the lexeme Value. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Value") - public String getValue() { - return tokenString_Value != null ? tokenString_Value : ""; - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/MediaTypeObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/MediaTypeObject.java deleted file mode 100644 index 3117de9cb96b607b69fea542e4d9a54ef1d4f738..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/MediaTypeObject.java +++ /dev/null @@ -1,512 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:63 - * @astdecl MediaTypeObject : ASTNode ::= [SchemaObject] <Example:Object> ExampleTuple* EncodingTuple*; - * @production MediaTypeObject : {@link ASTNode} ::= <span class="component">[{@link SchemaObject}]</span> <span class="component"><Example:Object></span> <span class="component">{@link ExampleTuple}*</span> <span class="component">{@link EncodingTuple}*</span>; - - */ -public class MediaTypeObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:459 - */ - public static MediaType composeMediaType (MediaTypeObject mediaTypeObject){ - MediaType mediaType = new MediaType(); - - if( mediaTypeObject.getSchemaObject() != null ) - mediaType.setSchema(SchemaObject.composeSchema(mediaTypeObject.getSchemaObject())); - if( mediaTypeObject.getExample() != null ) - mediaType.setExample(mediaTypeObject.getExample()); - if( mediaTypeObject.getNumExampleTuple() != 0 ){ - Map<String, Example> exampleMap = new HashMap<>(); - for( ExampleTuple t : mediaTypeObject.getExampleTuples() ) - exampleMap.put(t.getKey(), ExampleObject.composeExample(t.getExampleObject())); - mediaType.setExamples(exampleMap); - } - if( mediaTypeObject.getNumEncodingTuple() != 0 ){ - Map<String, EncodingProperty> encodingMap = new HashMap<>(); - for( EncodingTuple t : mediaTypeObject.getEncodingTuples() ) - encodingMap.put(t.getKey(), EncodingObject.composeEncodingProperty(t.getEncodingObject())); - mediaType.setEncodings(encodingMap); - } - - return mediaType; - } - /** - * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:474 - */ - public static MediaTypeObject parseMediaType(MediaType mediaType){ - MediaTypeObject mediaTypeObject = new MediaTypeObject(); - - if( mediaType.getSchema() != null ) - mediaTypeObject.setSchemaObject(SchemaObject.parseSchema(mediaType.getSchema())); - if( mediaType.getExample() != null ) - mediaTypeObject.setExample(mediaType.getExample()); - if( mediaType.getExamples() != null ){ - for( String key : mediaType.getExamples().keySet() ) - mediaTypeObject.addExampleTuple(new ExampleTuple(key, ExampleObject.parseExample(mediaType.getExample(key)))); - } - if( mediaType.getEncodings() != null ){ - for( String key : mediaType.getEncodings().keySet() ) - mediaTypeObject.addEncodingTuple(new EncodingTuple(key, EncodingObject.parseEncoding(mediaType.getEncoding(key)))); - } - - return mediaTypeObject; - } - /** - * @declaredat ASTNode:1 - */ - public MediaTypeObject() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[3]; - setChild(new Opt(), 0); - setChild(new JastAddList(), 1); - setChild(new JastAddList(), 2); - } - /** - * @declaredat ASTNode:16 - */ - @ASTNodeAnnotation.Constructor( - name = {"SchemaObject", "Example", "ExampleTuple", "EncodingTuple"}, - type = {"Opt<SchemaObject>", "Object", "JastAddList<ExampleTuple>", "JastAddList<EncodingTuple>"}, - kind = {"Opt", "Token", "List", "List"} - ) - public MediaTypeObject(Opt<SchemaObject> p0, Object p1, JastAddList<ExampleTuple> p2, JastAddList<EncodingTuple> p3) { - setChild(p0, 0); - setExample(p1); - setChild(p2, 1); - setChild(p3, 2); - } - /** @apilevel low-level - * @declaredat ASTNode:28 - */ - protected int numChildren() { - return 3; - } - /** - * @apilevel internal - * @declaredat ASTNode:34 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:38 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:42 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:46 - */ - public MediaTypeObject clone() throws CloneNotSupportedException { - MediaTypeObject node = (MediaTypeObject) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:51 - */ - public MediaTypeObject copy() { - try { - MediaTypeObject node = (MediaTypeObject) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:70 - */ - @Deprecated - public MediaTypeObject fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:80 - */ - public MediaTypeObject treeCopyNoTransform() { - MediaTypeObject tree = (MediaTypeObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:100 - */ - public MediaTypeObject treeCopy() { - MediaTypeObject tree = (MediaTypeObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:114 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenObject_Example == ((MediaTypeObject) node).tokenObject_Example); - } - /** - * Replaces the optional node for the SchemaObject child. This is the <code>Opt</code> - * node containing the child SchemaObject, not the actual child! - * @param opt The new node to be used as the optional node for the SchemaObject child. - * @apilevel low-level - */ - public void setSchemaObjectOpt(Opt<SchemaObject> opt) { - setChild(opt, 0); - } - /** - * Replaces the (optional) SchemaObject child. - * @param node The new node to be used as the SchemaObject child. - * @apilevel high-level - */ - public void setSchemaObject(SchemaObject node) { - getSchemaObjectOpt().setChild(node, 0); - } - /** - * Check whether the optional SchemaObject child exists. - * @return {@code true} if the optional SchemaObject child exists, {@code false} if it does not. - * @apilevel high-level - */ - public boolean hasSchemaObject() { - return getSchemaObjectOpt().getNumChild() != 0; - } - /** - * Retrieves the (optional) SchemaObject child. - * @return The SchemaObject child, if it exists. Returns {@code null} otherwise. - * @apilevel low-level - */ - public SchemaObject getSchemaObject() { - return (SchemaObject) getSchemaObjectOpt().getChild(0); - } - /** - * Retrieves the optional node for the SchemaObject child. This is the <code>Opt</code> node containing the child SchemaObject, not the actual child! - * @return The optional node for child the SchemaObject child. - * @apilevel low-level - */ - @ASTNodeAnnotation.OptChild(name="SchemaObject") - public Opt<SchemaObject> getSchemaObjectOpt() { - return (Opt<SchemaObject>) getChild(0); - } - /** - * Retrieves the optional node for child SchemaObject. This is the <code>Opt</code> node containing the child SchemaObject, not the actual child! - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child SchemaObject. - * @apilevel low-level - */ - public Opt<SchemaObject> getSchemaObjectOptNoTransform() { - return (Opt<SchemaObject>) getChildNoTransform(0); - } - /** - * Replaces the lexeme Example. - * @param value The new value for the lexeme Example. - * @apilevel high-level - */ - public void setExample(Object value) { - tokenObject_Example = value; - } - /** @apilevel internal - */ - protected Object tokenObject_Example; - /** - * Retrieves the value for the lexeme Example. - * @return The value for the lexeme Example. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Example") - public Object getExample() { - return tokenObject_Example; - } - /** - * Replaces the ExampleTuple list. - * @param list The new list node to be used as the ExampleTuple list. - * @apilevel high-level - */ - public void setExampleTupleList(JastAddList<ExampleTuple> list) { - setChild(list, 1); - } - /** - * Retrieves the number of children in the ExampleTuple list. - * @return Number of children in the ExampleTuple list. - * @apilevel high-level - */ - public int getNumExampleTuple() { - return getExampleTupleList().getNumChild(); - } - /** - * Retrieves the number of children in the ExampleTuple list. - * Calling this method will not trigger rewrites. - * @return Number of children in the ExampleTuple list. - * @apilevel low-level - */ - public int getNumExampleTupleNoTransform() { - return getExampleTupleListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the ExampleTuple list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the ExampleTuple list. - * @apilevel high-level - */ - public ExampleTuple getExampleTuple(int i) { - return (ExampleTuple) getExampleTupleList().getChild(i); - } - /** - * Check whether the ExampleTuple list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasExampleTuple() { - return getExampleTupleList().getNumChild() != 0; - } - /** - * Append an element to the ExampleTuple list. - * @param node The element to append to the ExampleTuple list. - * @apilevel high-level - */ - public void addExampleTuple(ExampleTuple node) { - JastAddList<ExampleTuple> list = (parent == null) ? getExampleTupleListNoTransform() : getExampleTupleList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addExampleTupleNoTransform(ExampleTuple node) { - JastAddList<ExampleTuple> list = getExampleTupleListNoTransform(); - list.addChild(node); - } - /** - * Replaces the ExampleTuple list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setExampleTuple(ExampleTuple node, int i) { - JastAddList<ExampleTuple> list = getExampleTupleList(); - list.setChild(node, i); - } - /** - * Retrieves the ExampleTuple list. - * @return The node representing the ExampleTuple list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="ExampleTuple") - public JastAddList<ExampleTuple> getExampleTupleList() { - JastAddList<ExampleTuple> list = (JastAddList<ExampleTuple>) getChild(1); - return list; - } - /** - * Retrieves the ExampleTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ExampleTuple list. - * @apilevel low-level - */ - public JastAddList<ExampleTuple> getExampleTupleListNoTransform() { - return (JastAddList<ExampleTuple>) getChildNoTransform(1); - } - /** - * @return the element at index {@code i} in the ExampleTuple list without - * triggering rewrites. - */ - public ExampleTuple getExampleTupleNoTransform(int i) { - return (ExampleTuple) getExampleTupleListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the ExampleTuple list. - * @return The node representing the ExampleTuple list. - * @apilevel high-level - */ - public JastAddList<ExampleTuple> getExampleTuples() { - return getExampleTupleList(); - } - /** - * Retrieves the ExampleTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ExampleTuple list. - * @apilevel low-level - */ - public JastAddList<ExampleTuple> getExampleTuplesNoTransform() { - return getExampleTupleListNoTransform(); - } - /** - * Replaces the EncodingTuple list. - * @param list The new list node to be used as the EncodingTuple list. - * @apilevel high-level - */ - public void setEncodingTupleList(JastAddList<EncodingTuple> list) { - setChild(list, 2); - } - /** - * Retrieves the number of children in the EncodingTuple list. - * @return Number of children in the EncodingTuple list. - * @apilevel high-level - */ - public int getNumEncodingTuple() { - return getEncodingTupleList().getNumChild(); - } - /** - * Retrieves the number of children in the EncodingTuple list. - * Calling this method will not trigger rewrites. - * @return Number of children in the EncodingTuple list. - * @apilevel low-level - */ - public int getNumEncodingTupleNoTransform() { - return getEncodingTupleListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the EncodingTuple list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the EncodingTuple list. - * @apilevel high-level - */ - public EncodingTuple getEncodingTuple(int i) { - return (EncodingTuple) getEncodingTupleList().getChild(i); - } - /** - * Check whether the EncodingTuple list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasEncodingTuple() { - return getEncodingTupleList().getNumChild() != 0; - } - /** - * Append an element to the EncodingTuple list. - * @param node The element to append to the EncodingTuple list. - * @apilevel high-level - */ - public void addEncodingTuple(EncodingTuple node) { - JastAddList<EncodingTuple> list = (parent == null) ? getEncodingTupleListNoTransform() : getEncodingTupleList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addEncodingTupleNoTransform(EncodingTuple node) { - JastAddList<EncodingTuple> list = getEncodingTupleListNoTransform(); - list.addChild(node); - } - /** - * Replaces the EncodingTuple list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setEncodingTuple(EncodingTuple node, int i) { - JastAddList<EncodingTuple> list = getEncodingTupleList(); - list.setChild(node, i); - } - /** - * Retrieves the EncodingTuple list. - * @return The node representing the EncodingTuple list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="EncodingTuple") - public JastAddList<EncodingTuple> getEncodingTupleList() { - JastAddList<EncodingTuple> list = (JastAddList<EncodingTuple>) getChild(2); - return list; - } - /** - * Retrieves the EncodingTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the EncodingTuple list. - * @apilevel low-level - */ - public JastAddList<EncodingTuple> getEncodingTupleListNoTransform() { - return (JastAddList<EncodingTuple>) getChildNoTransform(2); - } - /** - * @return the element at index {@code i} in the EncodingTuple list without - * triggering rewrites. - */ - public EncodingTuple getEncodingTupleNoTransform(int i) { - return (EncodingTuple) getEncodingTupleListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the EncodingTuple list. - * @return The node representing the EncodingTuple list. - * @apilevel high-level - */ - public JastAddList<EncodingTuple> getEncodingTuples() { - return getEncodingTupleList(); - } - /** - * Retrieves the EncodingTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the EncodingTuple list. - * @apilevel low-level - */ - public JastAddList<EncodingTuple> getEncodingTuplesNoTransform() { - return getEncodingTupleListNoTransform(); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/NotSchema.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/NotSchema.java deleted file mode 100644 index 406fa2e4d6c03df4caab8392f79fb2665924b395..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/NotSchema.java +++ /dev/null @@ -1,193 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:95 - * @astdecl NotSchema : ASTNode ::= SchemaObject; - * @production NotSchema : {@link ASTNode} ::= <span class="component">{@link SchemaObject}</span>; - - */ -public class NotSchema extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public NotSchema() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"SchemaObject"}, - type = {"SchemaObject"}, - kind = {"Child"} - ) - public NotSchema(SchemaObject p0) { - setChild(p0, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public NotSchema clone() throws CloneNotSupportedException { - NotSchema node = (NotSchema) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public NotSchema copy() { - try { - NotSchema node = (NotSchema) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public NotSchema fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public NotSchema treeCopyNoTransform() { - NotSchema tree = (NotSchema) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public NotSchema treeCopy() { - NotSchema tree = (NotSchema) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node); - } - /** - * Replaces the SchemaObject child. - * @param node The new node to replace the SchemaObject child. - * @apilevel high-level - */ - public void setSchemaObject(SchemaObject node) { - setChild(node, 0); - } - /** - * Retrieves the SchemaObject child. - * @return The current node used as the SchemaObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="SchemaObject") - public SchemaObject getSchemaObject() { - return (SchemaObject) getChild(0); - } - /** - * Retrieves the SchemaObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the SchemaObject child. - * @apilevel low-level - */ - public SchemaObject getSchemaObjectNoTransform() { - return (SchemaObject) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/OAuthFlowObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/OAuthFlowObject.java deleted file mode 100644 index dbf6a9cf0a5d11f7325cfaa003abc29ad977ed6f..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/OAuthFlowObject.java +++ /dev/null @@ -1,402 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:120 - * @astdecl OAuthFlowObject : ASTNode ::= <AuthorizationUrl:String> <TokenUrl:String> <RefreshUrl:String> ScopesTuple* <Configuration:String>; - * @production OAuthFlowObject : {@link ASTNode} ::= <span class="component"><AuthorizationUrl:String></span> <span class="component"><TokenUrl:String></span> <span class="component"><RefreshUrl:String></span> <span class="component">{@link ScopesTuple}*</span> <span class="component"><Configuration:String></span>; - - */ -public class OAuthFlowObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:829 - */ - public static OAuthFlow composeOAuthFlow (OAuthFlowObject oAuthFlowObject){ - OAuthFlow oAuthFlow = new OAuthFlow(); - Map<String, String> scopes = new HashMap<>(); - - if( oAuthFlowObject.getAuthorizationUrl() != null ) - oAuthFlow.setAuthorizationUrl( oAuthFlowObject.getAuthorizationUrl() ); - if( oAuthFlowObject.getTokenUrl() != null ) - oAuthFlow.setTokenUrl( oAuthFlowObject.getTokenUrl() ); - for( ScopesTuple t : oAuthFlowObject.getScopesTuples() ) - scopes.put(t.getScopesKey(), t.getScopesValue()); - oAuthFlow.setScopes(scopes); - - if( oAuthFlowObject.getRefreshUrl() != null ) - oAuthFlow.setRefreshUrl(oAuthFlowObject.getRefreshUrl()); - - return oAuthFlow; - } - /** - * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:846 - */ - public static OAuthFlowObject parseOAuthFlow(OAuthFlow oAuthFlow){ - OAuthFlowObject oAuthFlowObject = new OAuthFlowObject(); - - if( oAuthFlow.getAuthorizationUrl() != null ) - oAuthFlowObject.setAuthorizationUrl( oAuthFlow.getAuthorizationUrl() ); - if( oAuthFlow.getTokenUrl() != null ) - oAuthFlowObject.setTokenUrl( oAuthFlow.getTokenUrl() ); - for( String key : oAuthFlow.getScopes().keySet() ) - oAuthFlowObject.addScopesTuple( new ScopesTuple(key, oAuthFlow.getScope(key)) ); - - if( oAuthFlow.getRefreshUrl() != null ) - oAuthFlowObject.setRefreshUrl( oAuthFlow.getRefreshUrl() ); - - return oAuthFlowObject; - } - /** - * @declaredat ASTNode:1 - */ - public OAuthFlowObject() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - setChild(new JastAddList(), 0); - } - /** - * @declaredat ASTNode:14 - */ - @ASTNodeAnnotation.Constructor( - name = {"AuthorizationUrl", "TokenUrl", "RefreshUrl", "ScopesTuple", "Configuration"}, - type = {"String", "String", "String", "JastAddList<ScopesTuple>", "String"}, - kind = {"Token", "Token", "Token", "List", "Token"} - ) - public OAuthFlowObject(String p0, String p1, String p2, JastAddList<ScopesTuple> p3, String p4) { - setAuthorizationUrl(p0); - setTokenUrl(p1); - setRefreshUrl(p2); - setChild(p3, 0); - setConfiguration(p4); - } - /** @apilevel low-level - * @declaredat ASTNode:27 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:33 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:37 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:41 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public OAuthFlowObject clone() throws CloneNotSupportedException { - OAuthFlowObject node = (OAuthFlowObject) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:50 - */ - public OAuthFlowObject copy() { - try { - OAuthFlowObject node = (OAuthFlowObject) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:69 - */ - @Deprecated - public OAuthFlowObject fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:79 - */ - public OAuthFlowObject treeCopyNoTransform() { - OAuthFlowObject tree = (OAuthFlowObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:99 - */ - public OAuthFlowObject treeCopy() { - OAuthFlowObject tree = (OAuthFlowObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:113 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_AuthorizationUrl == ((OAuthFlowObject) node).tokenString_AuthorizationUrl) && (tokenString_TokenUrl == ((OAuthFlowObject) node).tokenString_TokenUrl) && (tokenString_RefreshUrl == ((OAuthFlowObject) node).tokenString_RefreshUrl) && (tokenString_Configuration == ((OAuthFlowObject) node).tokenString_Configuration); - } - /** - * Replaces the lexeme AuthorizationUrl. - * @param value The new value for the lexeme AuthorizationUrl. - * @apilevel high-level - */ - public void setAuthorizationUrl(String value) { - tokenString_AuthorizationUrl = value; - } - /** @apilevel internal - */ - protected String tokenString_AuthorizationUrl; - /** - * Retrieves the value for the lexeme AuthorizationUrl. - * @return The value for the lexeme AuthorizationUrl. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="AuthorizationUrl") - public String getAuthorizationUrl() { - return tokenString_AuthorizationUrl != null ? tokenString_AuthorizationUrl : ""; - } - /** - * Replaces the lexeme TokenUrl. - * @param value The new value for the lexeme TokenUrl. - * @apilevel high-level - */ - public void setTokenUrl(String value) { - tokenString_TokenUrl = value; - } - /** @apilevel internal - */ - protected String tokenString_TokenUrl; - /** - * Retrieves the value for the lexeme TokenUrl. - * @return The value for the lexeme TokenUrl. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="TokenUrl") - public String getTokenUrl() { - return tokenString_TokenUrl != null ? tokenString_TokenUrl : ""; - } - /** - * Replaces the lexeme RefreshUrl. - * @param value The new value for the lexeme RefreshUrl. - * @apilevel high-level - */ - public void setRefreshUrl(String value) { - tokenString_RefreshUrl = value; - } - /** @apilevel internal - */ - protected String tokenString_RefreshUrl; - /** - * Retrieves the value for the lexeme RefreshUrl. - * @return The value for the lexeme RefreshUrl. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="RefreshUrl") - public String getRefreshUrl() { - return tokenString_RefreshUrl != null ? tokenString_RefreshUrl : ""; - } - /** - * Replaces the ScopesTuple list. - * @param list The new list node to be used as the ScopesTuple list. - * @apilevel high-level - */ - public void setScopesTupleList(JastAddList<ScopesTuple> list) { - setChild(list, 0); - } - /** - * Retrieves the number of children in the ScopesTuple list. - * @return Number of children in the ScopesTuple list. - * @apilevel high-level - */ - public int getNumScopesTuple() { - return getScopesTupleList().getNumChild(); - } - /** - * Retrieves the number of children in the ScopesTuple list. - * Calling this method will not trigger rewrites. - * @return Number of children in the ScopesTuple list. - * @apilevel low-level - */ - public int getNumScopesTupleNoTransform() { - return getScopesTupleListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the ScopesTuple list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the ScopesTuple list. - * @apilevel high-level - */ - public ScopesTuple getScopesTuple(int i) { - return (ScopesTuple) getScopesTupleList().getChild(i); - } - /** - * Check whether the ScopesTuple list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasScopesTuple() { - return getScopesTupleList().getNumChild() != 0; - } - /** - * Append an element to the ScopesTuple list. - * @param node The element to append to the ScopesTuple list. - * @apilevel high-level - */ - public void addScopesTuple(ScopesTuple node) { - JastAddList<ScopesTuple> list = (parent == null) ? getScopesTupleListNoTransform() : getScopesTupleList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addScopesTupleNoTransform(ScopesTuple node) { - JastAddList<ScopesTuple> list = getScopesTupleListNoTransform(); - list.addChild(node); - } - /** - * Replaces the ScopesTuple list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setScopesTuple(ScopesTuple node, int i) { - JastAddList<ScopesTuple> list = getScopesTupleList(); - list.setChild(node, i); - } - /** - * Retrieves the ScopesTuple list. - * @return The node representing the ScopesTuple list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="ScopesTuple") - public JastAddList<ScopesTuple> getScopesTupleList() { - JastAddList<ScopesTuple> list = (JastAddList<ScopesTuple>) getChild(0); - return list; - } - /** - * Retrieves the ScopesTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ScopesTuple list. - * @apilevel low-level - */ - public JastAddList<ScopesTuple> getScopesTupleListNoTransform() { - return (JastAddList<ScopesTuple>) getChildNoTransform(0); - } - /** - * @return the element at index {@code i} in the ScopesTuple list without - * triggering rewrites. - */ - public ScopesTuple getScopesTupleNoTransform(int i) { - return (ScopesTuple) getScopesTupleListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the ScopesTuple list. - * @return The node representing the ScopesTuple list. - * @apilevel high-level - */ - public JastAddList<ScopesTuple> getScopesTuples() { - return getScopesTupleList(); - } - /** - * Retrieves the ScopesTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ScopesTuple list. - * @apilevel low-level - */ - public JastAddList<ScopesTuple> getScopesTuplesNoTransform() { - return getScopesTupleListNoTransform(); - } - /** - * Replaces the lexeme Configuration. - * @param value The new value for the lexeme Configuration. - * @apilevel high-level - */ - public void setConfiguration(String value) { - tokenString_Configuration = value; - } - /** @apilevel internal - */ - protected String tokenString_Configuration; - /** - * Retrieves the value for the lexeme Configuration. - * @return The value for the lexeme Configuration. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Configuration") - public String getConfiguration() { - return tokenString_Configuration != null ? tokenString_Configuration : ""; - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/OAuthFlowsObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/OAuthFlowsObject.java deleted file mode 100644 index 27f398fce71d7790a9973b714f61486cb0d18406..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/OAuthFlowsObject.java +++ /dev/null @@ -1,431 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:113 - * @astdecl OAuthFlowsObject : ASTNode ::= [Implicit] [Password] [ClientCredentials] [AuthorizationCode]; - * @production OAuthFlowsObject : {@link ASTNode} ::= <span class="component">[{@link Implicit}]</span> <span class="component">[{@link Password}]</span> <span class="component">[{@link ClientCredentials}]</span> <span class="component">[{@link AuthorizationCode}]</span>; - - */ -public class OAuthFlowsObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:809 - */ - public static OAuthFlows composeOAuthFlows (OAuthFlowsObject oAuthFlowsObject){ - OAuthFlows oAuthFlows = new OAuthFlows(); - - if( oAuthFlowsObject.hasImplicit() ) - oAuthFlows.setImplicit( OAuthFlowObject.composeOAuthFlow(oAuthFlowsObject.getImplicit().getOAuthFlowObject()) ); - if( oAuthFlowsObject.hasPassword() ){ - //System.out.println("Password eingegangen : " + oAuthFlowsObject.getPassword().getOAuthFlowObject().getAuthorizationUrl() ); - System.out.println("Password eingegangen : " + oAuthFlowsObject.getPassword().getOAuthFlowObject().getConfiguration() ); - System.out.println("Password eingegangen : " + oAuthFlowsObject.getPassword().getOAuthFlowObject().getTokenUrl() ); - System.out.println("Password eingegangen : " + oAuthFlowsObject.getPassword().getOAuthFlowObject().getRefreshUrl() ); - oAuthFlows.setPassword( OAuthFlowObject.composeOAuthFlow(oAuthFlowsObject.getPassword().getOAuthFlowObject()) ); - } - if( oAuthFlowsObject.hasClientCredentials() ) - oAuthFlows.setClientCredentials( OAuthFlowObject.composeOAuthFlow(oAuthFlowsObject.getClientCredentials().getOAuthFlowObject()) ); - if( oAuthFlowsObject.hasAuthorizationCode() ) - oAuthFlows.setAuthorizationCode( OAuthFlowObject.composeOAuthFlow(oAuthFlowsObject.getAuthorizationCode().getOAuthFlowObject()) ); - - return oAuthFlows; - } - /** - * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:819 - */ - public static OAuthFlowsObject parseOAuthFlows(OAuthFlows oAuthFlows){ - OAuthFlowsObject oAuthFlowsObject = new OAuthFlowsObject(); - Implicit implicit = new Implicit(); - Password password = new Password(); - ClientCredentials clientCredentials = new ClientCredentials(); - AuthorizationCode authorizationCode = new AuthorizationCode(); - - if( oAuthFlows.getImplicit() != null ){ - implicit.setOAuthFlowObject( OAuthFlowObject.parseOAuthFlow(oAuthFlows.getImplicit()) ); - oAuthFlowsObject.setImplicit(implicit); - } - if( oAuthFlows.getPassword() != null ){ - password.setOAuthFlowObject(OAuthFlowObject.parseOAuthFlow(oAuthFlows.getPassword())); - oAuthFlowsObject.setPassword(password); - } - if( oAuthFlows.getClientCredentials() != null ){ - clientCredentials.setOAuthFlowObject(OAuthFlowObject.parseOAuthFlow(oAuthFlows.getClientCredentials())); - oAuthFlowsObject.setClientCredentials(clientCredentials); - } - if( oAuthFlows.getAuthorizationCode() != null ){ - authorizationCode.setOAuthFlowObject(OAuthFlowObject.parseOAuthFlow(oAuthFlows.getAuthorizationCode())); - oAuthFlowsObject.setAuthorizationCode(authorizationCode); - } - - return oAuthFlowsObject; - } - /** - * @declaredat ASTNode:1 - */ - public OAuthFlowsObject() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[4]; - setChild(new Opt(), 0); - setChild(new Opt(), 1); - setChild(new Opt(), 2); - setChild(new Opt(), 3); - } - /** - * @declaredat ASTNode:17 - */ - @ASTNodeAnnotation.Constructor( - name = {"Implicit", "Password", "ClientCredentials", "AuthorizationCode"}, - type = {"Opt<Implicit>", "Opt<Password>", "Opt<ClientCredentials>", "Opt<AuthorizationCode>"}, - kind = {"Opt", "Opt", "Opt", "Opt"} - ) - public OAuthFlowsObject(Opt<Implicit> p0, Opt<Password> p1, Opt<ClientCredentials> p2, Opt<AuthorizationCode> p3) { - setChild(p0, 0); - setChild(p1, 1); - setChild(p2, 2); - setChild(p3, 3); - } - /** @apilevel low-level - * @declaredat ASTNode:29 - */ - protected int numChildren() { - return 4; - } - /** - * @apilevel internal - * @declaredat ASTNode:35 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:39 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:43 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:47 - */ - public OAuthFlowsObject clone() throws CloneNotSupportedException { - OAuthFlowsObject node = (OAuthFlowsObject) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:52 - */ - public OAuthFlowsObject copy() { - try { - OAuthFlowsObject node = (OAuthFlowsObject) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:71 - */ - @Deprecated - public OAuthFlowsObject fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:81 - */ - public OAuthFlowsObject treeCopyNoTransform() { - OAuthFlowsObject tree = (OAuthFlowsObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:101 - */ - public OAuthFlowsObject treeCopy() { - OAuthFlowsObject tree = (OAuthFlowsObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:115 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node); - } - /** - * Replaces the optional node for the Implicit child. This is the <code>Opt</code> - * node containing the child Implicit, not the actual child! - * @param opt The new node to be used as the optional node for the Implicit child. - * @apilevel low-level - */ - public void setImplicitOpt(Opt<Implicit> opt) { - setChild(opt, 0); - } - /** - * Replaces the (optional) Implicit child. - * @param node The new node to be used as the Implicit child. - * @apilevel high-level - */ - public void setImplicit(Implicit node) { - getImplicitOpt().setChild(node, 0); - } - /** - * Check whether the optional Implicit child exists. - * @return {@code true} if the optional Implicit child exists, {@code false} if it does not. - * @apilevel high-level - */ - public boolean hasImplicit() { - return getImplicitOpt().getNumChild() != 0; - } - /** - * Retrieves the (optional) Implicit child. - * @return The Implicit child, if it exists. Returns {@code null} otherwise. - * @apilevel low-level - */ - public Implicit getImplicit() { - return (Implicit) getImplicitOpt().getChild(0); - } - /** - * Retrieves the optional node for the Implicit child. This is the <code>Opt</code> node containing the child Implicit, not the actual child! - * @return The optional node for child the Implicit child. - * @apilevel low-level - */ - @ASTNodeAnnotation.OptChild(name="Implicit") - public Opt<Implicit> getImplicitOpt() { - return (Opt<Implicit>) getChild(0); - } - /** - * Retrieves the optional node for child Implicit. This is the <code>Opt</code> node containing the child Implicit, not the actual child! - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child Implicit. - * @apilevel low-level - */ - public Opt<Implicit> getImplicitOptNoTransform() { - return (Opt<Implicit>) getChildNoTransform(0); - } - /** - * Replaces the optional node for the Password child. This is the <code>Opt</code> - * node containing the child Password, not the actual child! - * @param opt The new node to be used as the optional node for the Password child. - * @apilevel low-level - */ - public void setPasswordOpt(Opt<Password> opt) { - setChild(opt, 1); - } - /** - * Replaces the (optional) Password child. - * @param node The new node to be used as the Password child. - * @apilevel high-level - */ - public void setPassword(Password node) { - getPasswordOpt().setChild(node, 0); - } - /** - * Check whether the optional Password child exists. - * @return {@code true} if the optional Password child exists, {@code false} if it does not. - * @apilevel high-level - */ - public boolean hasPassword() { - return getPasswordOpt().getNumChild() != 0; - } - /** - * Retrieves the (optional) Password child. - * @return The Password child, if it exists. Returns {@code null} otherwise. - * @apilevel low-level - */ - public Password getPassword() { - return (Password) getPasswordOpt().getChild(0); - } - /** - * Retrieves the optional node for the Password child. This is the <code>Opt</code> node containing the child Password, not the actual child! - * @return The optional node for child the Password child. - * @apilevel low-level - */ - @ASTNodeAnnotation.OptChild(name="Password") - public Opt<Password> getPasswordOpt() { - return (Opt<Password>) getChild(1); - } - /** - * Retrieves the optional node for child Password. This is the <code>Opt</code> node containing the child Password, not the actual child! - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child Password. - * @apilevel low-level - */ - public Opt<Password> getPasswordOptNoTransform() { - return (Opt<Password>) getChildNoTransform(1); - } - /** - * Replaces the optional node for the ClientCredentials child. This is the <code>Opt</code> - * node containing the child ClientCredentials, not the actual child! - * @param opt The new node to be used as the optional node for the ClientCredentials child. - * @apilevel low-level - */ - public void setClientCredentialsOpt(Opt<ClientCredentials> opt) { - setChild(opt, 2); - } - /** - * Replaces the (optional) ClientCredentials child. - * @param node The new node to be used as the ClientCredentials child. - * @apilevel high-level - */ - public void setClientCredentials(ClientCredentials node) { - getClientCredentialsOpt().setChild(node, 0); - } - /** - * Check whether the optional ClientCredentials child exists. - * @return {@code true} if the optional ClientCredentials child exists, {@code false} if it does not. - * @apilevel high-level - */ - public boolean hasClientCredentials() { - return getClientCredentialsOpt().getNumChild() != 0; - } - /** - * Retrieves the (optional) ClientCredentials child. - * @return The ClientCredentials child, if it exists. Returns {@code null} otherwise. - * @apilevel low-level - */ - public ClientCredentials getClientCredentials() { - return (ClientCredentials) getClientCredentialsOpt().getChild(0); - } - /** - * Retrieves the optional node for the ClientCredentials child. This is the <code>Opt</code> node containing the child ClientCredentials, not the actual child! - * @return The optional node for child the ClientCredentials child. - * @apilevel low-level - */ - @ASTNodeAnnotation.OptChild(name="ClientCredentials") - public Opt<ClientCredentials> getClientCredentialsOpt() { - return (Opt<ClientCredentials>) getChild(2); - } - /** - * Retrieves the optional node for child ClientCredentials. This is the <code>Opt</code> node containing the child ClientCredentials, not the actual child! - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child ClientCredentials. - * @apilevel low-level - */ - public Opt<ClientCredentials> getClientCredentialsOptNoTransform() { - return (Opt<ClientCredentials>) getChildNoTransform(2); - } - /** - * Replaces the optional node for the AuthorizationCode child. This is the <code>Opt</code> - * node containing the child AuthorizationCode, not the actual child! - * @param opt The new node to be used as the optional node for the AuthorizationCode child. - * @apilevel low-level - */ - public void setAuthorizationCodeOpt(Opt<AuthorizationCode> opt) { - setChild(opt, 3); - } - /** - * Replaces the (optional) AuthorizationCode child. - * @param node The new node to be used as the AuthorizationCode child. - * @apilevel high-level - */ - public void setAuthorizationCode(AuthorizationCode node) { - getAuthorizationCodeOpt().setChild(node, 0); - } - /** - * Check whether the optional AuthorizationCode child exists. - * @return {@code true} if the optional AuthorizationCode child exists, {@code false} if it does not. - * @apilevel high-level - */ - public boolean hasAuthorizationCode() { - return getAuthorizationCodeOpt().getNumChild() != 0; - } - /** - * Retrieves the (optional) AuthorizationCode child. - * @return The AuthorizationCode child, if it exists. Returns {@code null} otherwise. - * @apilevel low-level - */ - public AuthorizationCode getAuthorizationCode() { - return (AuthorizationCode) getAuthorizationCodeOpt().getChild(0); - } - /** - * Retrieves the optional node for the AuthorizationCode child. This is the <code>Opt</code> node containing the child AuthorizationCode, not the actual child! - * @return The optional node for child the AuthorizationCode child. - * @apilevel low-level - */ - @ASTNodeAnnotation.OptChild(name="AuthorizationCode") - public Opt<AuthorizationCode> getAuthorizationCodeOpt() { - return (Opt<AuthorizationCode>) getChild(3); - } - /** - * Retrieves the optional node for child AuthorizationCode. This is the <code>Opt</code> node containing the child AuthorizationCode, not the actual child! - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child AuthorizationCode. - * @apilevel low-level - */ - public Opt<AuthorizationCode> getAuthorizationCodeOptNoTransform() { - return (Opt<AuthorizationCode>) getChildNoTransform(3); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/OneOfSchema.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/OneOfSchema.java deleted file mode 100644 index ac7c15770cc6f38db48b789e5c455f57ede9bfeb..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/OneOfSchema.java +++ /dev/null @@ -1,193 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:100 - * @astdecl OneOfSchema : ASTNode ::= SchemaObject; - * @production OneOfSchema : {@link ASTNode} ::= <span class="component">{@link SchemaObject}</span>; - - */ -public class OneOfSchema extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public OneOfSchema() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"SchemaObject"}, - type = {"SchemaObject"}, - kind = {"Child"} - ) - public OneOfSchema(SchemaObject p0) { - setChild(p0, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public OneOfSchema clone() throws CloneNotSupportedException { - OneOfSchema node = (OneOfSchema) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public OneOfSchema copy() { - try { - OneOfSchema node = (OneOfSchema) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public OneOfSchema fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public OneOfSchema treeCopyNoTransform() { - OneOfSchema tree = (OneOfSchema) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public OneOfSchema treeCopy() { - OneOfSchema tree = (OneOfSchema) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node); - } - /** - * Replaces the SchemaObject child. - * @param node The new node to replace the SchemaObject child. - * @apilevel high-level - */ - public void setSchemaObject(SchemaObject node) { - setChild(node, 0); - } - /** - * Retrieves the SchemaObject child. - * @return The current node used as the SchemaObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="SchemaObject") - public SchemaObject getSchemaObject() { - return (SchemaObject) getChild(0); - } - /** - * Retrieves the SchemaObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the SchemaObject child. - * @apilevel low-level - */ - public SchemaObject getSchemaObjectNoTransform() { - return (SchemaObject) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/OpenAPIObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/OpenAPIObject.java deleted file mode 100644 index c9ad5f3cfa5c28c66f940715b5e29dc0f55fd85f..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/OpenAPIObject.java +++ /dev/null @@ -1,1028 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:2 - * @astdecl OpenAPIObject : ASTNode ::= <OpenAPI:String> [InfoObject] ServerObject* PathsObject* [ComponentsObject] SecurityRequirementObject* TagObject* [ExternalDocObject] <Context:OAIContext> Extension*; - * @production OpenAPIObject : {@link ASTNode} ::= <span class="component"><OpenAPI:String></span> <span class="component">[{@link InfoObject}]</span> <span class="component">{@link ServerObject}*</span> <span class="component">{@link PathsObject}*</span> <span class="component">[{@link ComponentsObject}]</span> <span class="component">{@link SecurityRequirementObject}*</span> <span class="component">{@link TagObject}*</span> <span class="component">[{@link ExternalDocObject}]</span> <span class="component"><Context:OAIContext></span> <span class="component">{@link Extension}*</span>; - - */ -public class OpenAPIObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:13 - */ - public static OpenApi3 composeOpenAPI (OpenAPIObject openapi){ - OpenApi3 api3 = new OpenApi3(); - - if( !openapi.getOpenAPI().isEmpty() ) - api3.setOpenapi(openapi.getOpenAPI()); - if( openapi.hasInfoObject() ) - api3.setInfo(InfoObject.composeInfo(openapi.getInfoObject())); - if( openapi.getNumServerObject() != 0 ){ - List<org.openapi4j.parser.model.v3.Server> servers = new ArrayList<>(); - for( ServerObject s : openapi.getServerObjects() ) - servers.add(ServerObject.composeServer(s)); - api3.setServers(servers); - } - if( openapi.getNumPathsObject() != 0 ){ - Map<String, Path> paths = new HashMap<>(); - for( PathsObject p : openapi.getPathsObjects() ) - paths.put( p.getRef(), PathItem.composePath(p.getPathItem()) ); - api3.setPaths(paths); - } - if( openapi.hasComponentsObject() ) - api3.setComponents( ComponentsObject.composeComponents(openapi.getComponentsObject()) ); - if( openapi.getNumSecurityRequirementObject() != 0 ){ - List<SecurityRequirement> securityRequirements = new ArrayList<>(); - for( SecurityRequirementObject s : openapi.getSecurityRequirementObjects() ) - securityRequirements.add( SecurityRequirementObject.composeSecurityRequirement( s ) ); - api3.setSecurityRequirements(securityRequirements); - } - if( openapi.getNumTagObject() != 0 ){ - List<org.openapi4j.parser.model.v3.Tag> tags = new ArrayList<>(); - for( TagObject t : openapi.getTagObjects() ) - tags.add( TagObject.composeTag(t) ); - api3.setTags( tags ); - } - if( openapi.hasExternalDocObject() ) - api3.setExternalDocs(ExternalDocObject.composeExternalDocs(openapi.getExternalDocObject())); - if( openapi.getContext() != null ) - api3.setContext(openapi.getContext()); - if( openapi.getNumExtension() != 0 ){ - Map<String, Object> extensionMap = new HashMap<>(); - for( Extension e : openapi.getExtensions() ) - extensionMap.put(e.getKey(), e.getValue()); - api3.setExtensions(extensionMap); - } - - return api3; - } - /** - * @aspect RandomRequestGenerator - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\RandomRequestGenerator.jadd:12 - */ - public void generateRequests() throws Exception { - String baseUrl = this.getServerObject(0).getUrl(); - - for( PathsObject p : this.getPathsObjects() ) - p.sendRandomRequests(baseUrl); - - } - /** - * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:3 - */ - public static OpenAPIObject parseOpenAPI(OpenApi3 api) throws IOException, ResolutionException, ValidationException { - OpenAPIObject openapi = new OpenAPIObject(); - - if( api.getOpenapi() != null ) - openapi.setOpenAPI(api.getOpenapi()); - if( api.getInfo() != null ) - openapi.setInfoObject(InfoObject.parseInfo(api.getInfo())); - if( api.getPaths() != null ){ - for( String key : api.getPaths().keySet() ) - openapi.addPathsObject(new PathsObject( key, PathItem.parsePath(api.getPath(key)))); - } - if( api.getServers() != null ){ - for( Server s : api.getServers() ) - openapi.addServerObject(ServerObject.parseServer(s)); - } - if( api.getComponents() != null ) - openapi.setComponentsObject(ComponentsObject.parseComponents(api.getComponents())); - if( api.getSecurityRequirements() != null ){ - for( SecurityRequirement s : api.getSecurityRequirements() ) - openapi.addSecurityRequirementObject(SecurityRequirementObject.parseSecurityRequirement(s)); - } - if( api.getTags() != null ){ - for( org.openapi4j.parser.model.v3.Tag t : api.getTags() ) - openapi.addTagObject(TagObject.parseTag(t)); - } - if( api.getExternalDocs() != null ) - openapi.setExternalDocObject(ExternalDocObject.parseExternalDocs(api.getExternalDocs())); - if( api.getContext() != null ) - openapi.setContext(api.getContext()); - if( api.getExtensions() != null ){ - for( String key : api.getExtensions().keySet() ) - openapi.addExtension(new Extension(key, api.getExtensions().get(key))); - } - - return openapi; - } - /** - * @declaredat ASTNode:1 - */ - public OpenAPIObject() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[8]; - setChild(new Opt(), 0); - setChild(new JastAddList(), 1); - setChild(new JastAddList(), 2); - setChild(new Opt(), 3); - setChild(new JastAddList(), 4); - setChild(new JastAddList(), 5); - setChild(new Opt(), 6); - setChild(new JastAddList(), 7); - } - /** - * @declaredat ASTNode:21 - */ - @ASTNodeAnnotation.Constructor( - name = {"OpenAPI", "InfoObject", "ServerObject", "PathsObject", "ComponentsObject", "SecurityRequirementObject", "TagObject", "ExternalDocObject", "Context", "Extension"}, - type = {"String", "Opt<InfoObject>", "JastAddList<ServerObject>", "JastAddList<PathsObject>", "Opt<ComponentsObject>", "JastAddList<SecurityRequirementObject>", "JastAddList<TagObject>", "Opt<ExternalDocObject>", "OAIContext", "JastAddList<Extension>"}, - kind = {"Token", "Opt", "List", "List", "Opt", "List", "List", "Opt", "Token", "List"} - ) - public OpenAPIObject(String p0, Opt<InfoObject> p1, JastAddList<ServerObject> p2, JastAddList<PathsObject> p3, Opt<ComponentsObject> p4, JastAddList<SecurityRequirementObject> p5, JastAddList<TagObject> p6, Opt<ExternalDocObject> p7, OAIContext p8, JastAddList<Extension> p9) { - setOpenAPI(p0); - setChild(p1, 0); - setChild(p2, 1); - setChild(p3, 2); - setChild(p4, 3); - setChild(p5, 4); - setChild(p6, 5); - setChild(p7, 6); - setContext(p8); - setChild(p9, 7); - } - /** @apilevel low-level - * @declaredat ASTNode:39 - */ - protected int numChildren() { - return 8; - } - /** - * @apilevel internal - * @declaredat ASTNode:45 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:49 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:53 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:57 - */ - public OpenAPIObject clone() throws CloneNotSupportedException { - OpenAPIObject node = (OpenAPIObject) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:62 - */ - public OpenAPIObject copy() { - try { - OpenAPIObject node = (OpenAPIObject) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:81 - */ - @Deprecated - public OpenAPIObject fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:91 - */ - public OpenAPIObject treeCopyNoTransform() { - OpenAPIObject tree = (OpenAPIObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:111 - */ - public OpenAPIObject treeCopy() { - OpenAPIObject tree = (OpenAPIObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:125 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_OpenAPI == ((OpenAPIObject) node).tokenString_OpenAPI) && (tokenOAIContext_Context == ((OpenAPIObject) node).tokenOAIContext_Context); - } - /** - * Replaces the lexeme OpenAPI. - * @param value The new value for the lexeme OpenAPI. - * @apilevel high-level - */ - public void setOpenAPI(String value) { - tokenString_OpenAPI = value; - } - /** @apilevel internal - */ - protected String tokenString_OpenAPI; - /** - * Retrieves the value for the lexeme OpenAPI. - * @return The value for the lexeme OpenAPI. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="OpenAPI") - public String getOpenAPI() { - return tokenString_OpenAPI != null ? tokenString_OpenAPI : ""; - } - /** - * Replaces the optional node for the InfoObject child. This is the <code>Opt</code> - * node containing the child InfoObject, not the actual child! - * @param opt The new node to be used as the optional node for the InfoObject child. - * @apilevel low-level - */ - public void setInfoObjectOpt(Opt<InfoObject> opt) { - setChild(opt, 0); - } - /** - * Replaces the (optional) InfoObject child. - * @param node The new node to be used as the InfoObject child. - * @apilevel high-level - */ - public void setInfoObject(InfoObject node) { - getInfoObjectOpt().setChild(node, 0); - } - /** - * Check whether the optional InfoObject child exists. - * @return {@code true} if the optional InfoObject child exists, {@code false} if it does not. - * @apilevel high-level - */ - public boolean hasInfoObject() { - return getInfoObjectOpt().getNumChild() != 0; - } - /** - * Retrieves the (optional) InfoObject child. - * @return The InfoObject child, if it exists. Returns {@code null} otherwise. - * @apilevel low-level - */ - public InfoObject getInfoObject() { - return (InfoObject) getInfoObjectOpt().getChild(0); - } - /** - * Retrieves the optional node for the InfoObject child. This is the <code>Opt</code> node containing the child InfoObject, not the actual child! - * @return The optional node for child the InfoObject child. - * @apilevel low-level - */ - @ASTNodeAnnotation.OptChild(name="InfoObject") - public Opt<InfoObject> getInfoObjectOpt() { - return (Opt<InfoObject>) getChild(0); - } - /** - * Retrieves the optional node for child InfoObject. This is the <code>Opt</code> node containing the child InfoObject, not the actual child! - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child InfoObject. - * @apilevel low-level - */ - public Opt<InfoObject> getInfoObjectOptNoTransform() { - return (Opt<InfoObject>) getChildNoTransform(0); - } - /** - * Replaces the ServerObject list. - * @param list The new list node to be used as the ServerObject list. - * @apilevel high-level - */ - public void setServerObjectList(JastAddList<ServerObject> list) { - setChild(list, 1); - } - /** - * Retrieves the number of children in the ServerObject list. - * @return Number of children in the ServerObject list. - * @apilevel high-level - */ - public int getNumServerObject() { - return getServerObjectList().getNumChild(); - } - /** - * Retrieves the number of children in the ServerObject list. - * Calling this method will not trigger rewrites. - * @return Number of children in the ServerObject list. - * @apilevel low-level - */ - public int getNumServerObjectNoTransform() { - return getServerObjectListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the ServerObject list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the ServerObject list. - * @apilevel high-level - */ - public ServerObject getServerObject(int i) { - return (ServerObject) getServerObjectList().getChild(i); - } - /** - * Check whether the ServerObject list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasServerObject() { - return getServerObjectList().getNumChild() != 0; - } - /** - * Append an element to the ServerObject list. - * @param node The element to append to the ServerObject list. - * @apilevel high-level - */ - public void addServerObject(ServerObject node) { - JastAddList<ServerObject> list = (parent == null) ? getServerObjectListNoTransform() : getServerObjectList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addServerObjectNoTransform(ServerObject node) { - JastAddList<ServerObject> list = getServerObjectListNoTransform(); - list.addChild(node); - } - /** - * Replaces the ServerObject list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setServerObject(ServerObject node, int i) { - JastAddList<ServerObject> list = getServerObjectList(); - list.setChild(node, i); - } - /** - * Retrieves the ServerObject list. - * @return The node representing the ServerObject list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="ServerObject") - public JastAddList<ServerObject> getServerObjectList() { - JastAddList<ServerObject> list = (JastAddList<ServerObject>) getChild(1); - return list; - } - /** - * Retrieves the ServerObject list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ServerObject list. - * @apilevel low-level - */ - public JastAddList<ServerObject> getServerObjectListNoTransform() { - return (JastAddList<ServerObject>) getChildNoTransform(1); - } - /** - * @return the element at index {@code i} in the ServerObject list without - * triggering rewrites. - */ - public ServerObject getServerObjectNoTransform(int i) { - return (ServerObject) getServerObjectListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the ServerObject list. - * @return The node representing the ServerObject list. - * @apilevel high-level - */ - public JastAddList<ServerObject> getServerObjects() { - return getServerObjectList(); - } - /** - * Retrieves the ServerObject list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ServerObject list. - * @apilevel low-level - */ - public JastAddList<ServerObject> getServerObjectsNoTransform() { - return getServerObjectListNoTransform(); - } - /** - * Replaces the PathsObject list. - * @param list The new list node to be used as the PathsObject list. - * @apilevel high-level - */ - public void setPathsObjectList(JastAddList<PathsObject> list) { - setChild(list, 2); - } - /** - * Retrieves the number of children in the PathsObject list. - * @return Number of children in the PathsObject list. - * @apilevel high-level - */ - public int getNumPathsObject() { - return getPathsObjectList().getNumChild(); - } - /** - * Retrieves the number of children in the PathsObject list. - * Calling this method will not trigger rewrites. - * @return Number of children in the PathsObject list. - * @apilevel low-level - */ - public int getNumPathsObjectNoTransform() { - return getPathsObjectListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the PathsObject list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the PathsObject list. - * @apilevel high-level - */ - public PathsObject getPathsObject(int i) { - return (PathsObject) getPathsObjectList().getChild(i); - } - /** - * Check whether the PathsObject list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasPathsObject() { - return getPathsObjectList().getNumChild() != 0; - } - /** - * Append an element to the PathsObject list. - * @param node The element to append to the PathsObject list. - * @apilevel high-level - */ - public void addPathsObject(PathsObject node) { - JastAddList<PathsObject> list = (parent == null) ? getPathsObjectListNoTransform() : getPathsObjectList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addPathsObjectNoTransform(PathsObject node) { - JastAddList<PathsObject> list = getPathsObjectListNoTransform(); - list.addChild(node); - } - /** - * Replaces the PathsObject list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setPathsObject(PathsObject node, int i) { - JastAddList<PathsObject> list = getPathsObjectList(); - list.setChild(node, i); - } - /** - * Retrieves the PathsObject list. - * @return The node representing the PathsObject list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="PathsObject") - public JastAddList<PathsObject> getPathsObjectList() { - JastAddList<PathsObject> list = (JastAddList<PathsObject>) getChild(2); - return list; - } - /** - * Retrieves the PathsObject list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the PathsObject list. - * @apilevel low-level - */ - public JastAddList<PathsObject> getPathsObjectListNoTransform() { - return (JastAddList<PathsObject>) getChildNoTransform(2); - } - /** - * @return the element at index {@code i} in the PathsObject list without - * triggering rewrites. - */ - public PathsObject getPathsObjectNoTransform(int i) { - return (PathsObject) getPathsObjectListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the PathsObject list. - * @return The node representing the PathsObject list. - * @apilevel high-level - */ - public JastAddList<PathsObject> getPathsObjects() { - return getPathsObjectList(); - } - /** - * Retrieves the PathsObject list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the PathsObject list. - * @apilevel low-level - */ - public JastAddList<PathsObject> getPathsObjectsNoTransform() { - return getPathsObjectListNoTransform(); - } - /** - * Replaces the optional node for the ComponentsObject child. This is the <code>Opt</code> - * node containing the child ComponentsObject, not the actual child! - * @param opt The new node to be used as the optional node for the ComponentsObject child. - * @apilevel low-level - */ - public void setComponentsObjectOpt(Opt<ComponentsObject> opt) { - setChild(opt, 3); - } - /** - * Replaces the (optional) ComponentsObject child. - * @param node The new node to be used as the ComponentsObject child. - * @apilevel high-level - */ - public void setComponentsObject(ComponentsObject node) { - getComponentsObjectOpt().setChild(node, 0); - } - /** - * Check whether the optional ComponentsObject child exists. - * @return {@code true} if the optional ComponentsObject child exists, {@code false} if it does not. - * @apilevel high-level - */ - public boolean hasComponentsObject() { - return getComponentsObjectOpt().getNumChild() != 0; - } - /** - * Retrieves the (optional) ComponentsObject child. - * @return The ComponentsObject child, if it exists. Returns {@code null} otherwise. - * @apilevel low-level - */ - public ComponentsObject getComponentsObject() { - return (ComponentsObject) getComponentsObjectOpt().getChild(0); - } - /** - * Retrieves the optional node for the ComponentsObject child. This is the <code>Opt</code> node containing the child ComponentsObject, not the actual child! - * @return The optional node for child the ComponentsObject child. - * @apilevel low-level - */ - @ASTNodeAnnotation.OptChild(name="ComponentsObject") - public Opt<ComponentsObject> getComponentsObjectOpt() { - return (Opt<ComponentsObject>) getChild(3); - } - /** - * Retrieves the optional node for child ComponentsObject. This is the <code>Opt</code> node containing the child ComponentsObject, not the actual child! - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child ComponentsObject. - * @apilevel low-level - */ - public Opt<ComponentsObject> getComponentsObjectOptNoTransform() { - return (Opt<ComponentsObject>) getChildNoTransform(3); - } - /** - * Replaces the SecurityRequirementObject list. - * @param list The new list node to be used as the SecurityRequirementObject list. - * @apilevel high-level - */ - public void setSecurityRequirementObjectList(JastAddList<SecurityRequirementObject> list) { - setChild(list, 4); - } - /** - * Retrieves the number of children in the SecurityRequirementObject list. - * @return Number of children in the SecurityRequirementObject list. - * @apilevel high-level - */ - public int getNumSecurityRequirementObject() { - return getSecurityRequirementObjectList().getNumChild(); - } - /** - * Retrieves the number of children in the SecurityRequirementObject list. - * Calling this method will not trigger rewrites. - * @return Number of children in the SecurityRequirementObject list. - * @apilevel low-level - */ - public int getNumSecurityRequirementObjectNoTransform() { - return getSecurityRequirementObjectListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the SecurityRequirementObject list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the SecurityRequirementObject list. - * @apilevel high-level - */ - public SecurityRequirementObject getSecurityRequirementObject(int i) { - return (SecurityRequirementObject) getSecurityRequirementObjectList().getChild(i); - } - /** - * Check whether the SecurityRequirementObject list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasSecurityRequirementObject() { - return getSecurityRequirementObjectList().getNumChild() != 0; - } - /** - * Append an element to the SecurityRequirementObject list. - * @param node The element to append to the SecurityRequirementObject list. - * @apilevel high-level - */ - public void addSecurityRequirementObject(SecurityRequirementObject node) { - JastAddList<SecurityRequirementObject> list = (parent == null) ? getSecurityRequirementObjectListNoTransform() : getSecurityRequirementObjectList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addSecurityRequirementObjectNoTransform(SecurityRequirementObject node) { - JastAddList<SecurityRequirementObject> list = getSecurityRequirementObjectListNoTransform(); - list.addChild(node); - } - /** - * Replaces the SecurityRequirementObject list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setSecurityRequirementObject(SecurityRequirementObject node, int i) { - JastAddList<SecurityRequirementObject> list = getSecurityRequirementObjectList(); - list.setChild(node, i); - } - /** - * Retrieves the SecurityRequirementObject list. - * @return The node representing the SecurityRequirementObject list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="SecurityRequirementObject") - public JastAddList<SecurityRequirementObject> getSecurityRequirementObjectList() { - JastAddList<SecurityRequirementObject> list = (JastAddList<SecurityRequirementObject>) getChild(4); - return list; - } - /** - * Retrieves the SecurityRequirementObject list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the SecurityRequirementObject list. - * @apilevel low-level - */ - public JastAddList<SecurityRequirementObject> getSecurityRequirementObjectListNoTransform() { - return (JastAddList<SecurityRequirementObject>) getChildNoTransform(4); - } - /** - * @return the element at index {@code i} in the SecurityRequirementObject list without - * triggering rewrites. - */ - public SecurityRequirementObject getSecurityRequirementObjectNoTransform(int i) { - return (SecurityRequirementObject) getSecurityRequirementObjectListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the SecurityRequirementObject list. - * @return The node representing the SecurityRequirementObject list. - * @apilevel high-level - */ - public JastAddList<SecurityRequirementObject> getSecurityRequirementObjects() { - return getSecurityRequirementObjectList(); - } - /** - * Retrieves the SecurityRequirementObject list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the SecurityRequirementObject list. - * @apilevel low-level - */ - public JastAddList<SecurityRequirementObject> getSecurityRequirementObjectsNoTransform() { - return getSecurityRequirementObjectListNoTransform(); - } - /** - * Replaces the TagObject list. - * @param list The new list node to be used as the TagObject list. - * @apilevel high-level - */ - public void setTagObjectList(JastAddList<TagObject> list) { - setChild(list, 5); - } - /** - * Retrieves the number of children in the TagObject list. - * @return Number of children in the TagObject list. - * @apilevel high-level - */ - public int getNumTagObject() { - return getTagObjectList().getNumChild(); - } - /** - * Retrieves the number of children in the TagObject list. - * Calling this method will not trigger rewrites. - * @return Number of children in the TagObject list. - * @apilevel low-level - */ - public int getNumTagObjectNoTransform() { - return getTagObjectListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the TagObject list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the TagObject list. - * @apilevel high-level - */ - public TagObject getTagObject(int i) { - return (TagObject) getTagObjectList().getChild(i); - } - /** - * Check whether the TagObject list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasTagObject() { - return getTagObjectList().getNumChild() != 0; - } - /** - * Append an element to the TagObject list. - * @param node The element to append to the TagObject list. - * @apilevel high-level - */ - public void addTagObject(TagObject node) { - JastAddList<TagObject> list = (parent == null) ? getTagObjectListNoTransform() : getTagObjectList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addTagObjectNoTransform(TagObject node) { - JastAddList<TagObject> list = getTagObjectListNoTransform(); - list.addChild(node); - } - /** - * Replaces the TagObject list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setTagObject(TagObject node, int i) { - JastAddList<TagObject> list = getTagObjectList(); - list.setChild(node, i); - } - /** - * Retrieves the TagObject list. - * @return The node representing the TagObject list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="TagObject") - public JastAddList<TagObject> getTagObjectList() { - JastAddList<TagObject> list = (JastAddList<TagObject>) getChild(5); - return list; - } - /** - * Retrieves the TagObject list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the TagObject list. - * @apilevel low-level - */ - public JastAddList<TagObject> getTagObjectListNoTransform() { - return (JastAddList<TagObject>) getChildNoTransform(5); - } - /** - * @return the element at index {@code i} in the TagObject list without - * triggering rewrites. - */ - public TagObject getTagObjectNoTransform(int i) { - return (TagObject) getTagObjectListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the TagObject list. - * @return The node representing the TagObject list. - * @apilevel high-level - */ - public JastAddList<TagObject> getTagObjects() { - return getTagObjectList(); - } - /** - * Retrieves the TagObject list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the TagObject list. - * @apilevel low-level - */ - public JastAddList<TagObject> getTagObjectsNoTransform() { - return getTagObjectListNoTransform(); - } - /** - * Replaces the optional node for the ExternalDocObject child. This is the <code>Opt</code> - * node containing the child ExternalDocObject, not the actual child! - * @param opt The new node to be used as the optional node for the ExternalDocObject child. - * @apilevel low-level - */ - public void setExternalDocObjectOpt(Opt<ExternalDocObject> opt) { - setChild(opt, 6); - } - /** - * Replaces the (optional) ExternalDocObject child. - * @param node The new node to be used as the ExternalDocObject child. - * @apilevel high-level - */ - public void setExternalDocObject(ExternalDocObject node) { - getExternalDocObjectOpt().setChild(node, 0); - } - /** - * Check whether the optional ExternalDocObject child exists. - * @return {@code true} if the optional ExternalDocObject child exists, {@code false} if it does not. - * @apilevel high-level - */ - public boolean hasExternalDocObject() { - return getExternalDocObjectOpt().getNumChild() != 0; - } - /** - * Retrieves the (optional) ExternalDocObject child. - * @return The ExternalDocObject child, if it exists. Returns {@code null} otherwise. - * @apilevel low-level - */ - public ExternalDocObject getExternalDocObject() { - return (ExternalDocObject) getExternalDocObjectOpt().getChild(0); - } - /** - * Retrieves the optional node for the ExternalDocObject child. This is the <code>Opt</code> node containing the child ExternalDocObject, not the actual child! - * @return The optional node for child the ExternalDocObject child. - * @apilevel low-level - */ - @ASTNodeAnnotation.OptChild(name="ExternalDocObject") - public Opt<ExternalDocObject> getExternalDocObjectOpt() { - return (Opt<ExternalDocObject>) getChild(6); - } - /** - * Retrieves the optional node for child ExternalDocObject. This is the <code>Opt</code> node containing the child ExternalDocObject, not the actual child! - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child ExternalDocObject. - * @apilevel low-level - */ - public Opt<ExternalDocObject> getExternalDocObjectOptNoTransform() { - return (Opt<ExternalDocObject>) getChildNoTransform(6); - } - /** - * Replaces the lexeme Context. - * @param value The new value for the lexeme Context. - * @apilevel high-level - */ - public void setContext(OAIContext value) { - tokenOAIContext_Context = value; - } - /** @apilevel internal - */ - protected OAIContext tokenOAIContext_Context; - /** - * Retrieves the value for the lexeme Context. - * @return The value for the lexeme Context. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Context") - public OAIContext getContext() { - return tokenOAIContext_Context; - } - /** - * Replaces the Extension list. - * @param list The new list node to be used as the Extension list. - * @apilevel high-level - */ - public void setExtensionList(JastAddList<Extension> list) { - setChild(list, 7); - } - /** - * Retrieves the number of children in the Extension list. - * @return Number of children in the Extension list. - * @apilevel high-level - */ - public int getNumExtension() { - return getExtensionList().getNumChild(); - } - /** - * Retrieves the number of children in the Extension list. - * Calling this method will not trigger rewrites. - * @return Number of children in the Extension list. - * @apilevel low-level - */ - public int getNumExtensionNoTransform() { - return getExtensionListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the Extension list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the Extension list. - * @apilevel high-level - */ - public Extension getExtension(int i) { - return (Extension) getExtensionList().getChild(i); - } - /** - * Check whether the Extension list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasExtension() { - return getExtensionList().getNumChild() != 0; - } - /** - * Append an element to the Extension list. - * @param node The element to append to the Extension list. - * @apilevel high-level - */ - public void addExtension(Extension node) { - JastAddList<Extension> list = (parent == null) ? getExtensionListNoTransform() : getExtensionList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addExtensionNoTransform(Extension node) { - JastAddList<Extension> list = getExtensionListNoTransform(); - list.addChild(node); - } - /** - * Replaces the Extension list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setExtension(Extension node, int i) { - JastAddList<Extension> list = getExtensionList(); - list.setChild(node, i); - } - /** - * Retrieves the Extension list. - * @return The node representing the Extension list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="Extension") - public JastAddList<Extension> getExtensionList() { - JastAddList<Extension> list = (JastAddList<Extension>) getChild(7); - return list; - } - /** - * Retrieves the Extension list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the Extension list. - * @apilevel low-level - */ - public JastAddList<Extension> getExtensionListNoTransform() { - return (JastAddList<Extension>) getChildNoTransform(7); - } - /** - * @return the element at index {@code i} in the Extension list without - * triggering rewrites. - */ - public Extension getExtensionNoTransform(int i) { - return (Extension) getExtensionListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the Extension list. - * @return The node representing the Extension list. - * @apilevel high-level - */ - public JastAddList<Extension> getExtensions() { - return getExtensionList(); - } - /** - * Retrieves the Extension list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the Extension list. - * @apilevel low-level - */ - public JastAddList<Extension> getExtensionsNoTransform() { - return getExtensionListNoTransform(); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/OperationObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/OperationObject.java deleted file mode 100644 index 641cb06a0852c6c2beb429d4577cd9f188b9423b..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/OperationObject.java +++ /dev/null @@ -1,1415 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:49 - * @astdecl OperationObject : ASTNode ::= Tag* <Summary:String> <Description:String> [ExternalDocObject] <OperationID:String> ParameterObject* [RequestBodyObject] ResponseTuple* CallbackTuple* <DeprecatedBoolean:Boolean> SecurityRequirementObject* ServerObject* <Required:Boolean> Extension*; - * @production OperationObject : {@link ASTNode} ::= <span class="component">{@link Tag}*</span> <span class="component"><Summary:String></span> <span class="component"><Description:String></span> <span class="component">[{@link ExternalDocObject}]</span> <span class="component"><OperationID:String></span> <span class="component">{@link ParameterObject}*</span> <span class="component">[{@link RequestBodyObject}]</span> <span class="component">{@link ResponseTuple}*</span> <span class="component">{@link CallbackTuple}*</span> <span class="component"><DeprecatedBoolean:Boolean></span> <span class="component">{@link SecurityRequirementObject}*</span> <span class="component">{@link ServerObject}*</span> <span class="component"><Required:Boolean></span> <span class="component">{@link Extension}*</span>; - - */ -public class OperationObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:314 - */ - public static Operation composeOperation (OperationObject operationObject){ - Operation operation = new Operation(); - - if( operationObject.getNumTag() != 0 ){ - for( de.tudresden.inf.st.openapi.ast.Tag t : operationObject.getTags() ) - operation.addTag(t.getTag()); - } - if( !operationObject.getSummary().isEmpty() ) - operation.setSummary( operationObject.getSummary() ); - if( !operationObject.getDescription().isEmpty() ) - operation.setDescription( operationObject.getDescription() ); - if( operationObject.hasExternalDocObject() ) - operation.setExternalDocs( ExternalDocObject.composeExternalDocs(operationObject.getExternalDocObject()) ); - if( !operationObject.getOperationID().isEmpty() ) - operation.setOperationId( operationObject.getOperationID() ); - if( operationObject.getNumParameterObject() != 0 ){ - for( ParameterObject p : operationObject.getParameterObjects() ) - operation.addParameter( ParameterObject.composeParameter(p) ); - } - if( operationObject.hasRequestBodyObject() ) - operation.setRequestBody( RequestBodyObject.composeRequestBody(operationObject.getRequestBodyObject())); - if( operationObject.getNumResponseTuple() != 0){ - Map<String, Response> responseMap = new HashMap<>(); - for( ResponseTuple t : operationObject.getResponseTuples() ) - responseMap.put(t.getKey(), ResponseObject.composeResponse(t.getResponseObject())); - operation.setResponses(responseMap); - } - if( operationObject.getNumCallbackTuple() != 0 ){ - Map<String, Callback> callbacks = new HashMap<>(); - for( CallbackTuple t : operationObject.getCallbackTuples() ) { - if( !t.getCallbackObject().getRef().isEmpty() ){ - Callback callback = new Callback(); - callback.setRef(t.getCallbackObject().getRef()); - callbacks.put(t.getKey(), callback); - } - else - callbacks.put(t.getKey(), CallbackObject.composeCallback(t.getCallbackObject())); - operation.setCallbacks(callbacks); - } - } - if( operationObject.getDeprecatedBoolean() != null ) - operation.setDeprecated(operationObject.getDeprecatedBoolean()); - if( operationObject.getSecurityRequirementObjects() != null ){ - for( SecurityRequirementObject s : operationObject.getSecurityRequirementObjects() ) - operation.addSecurityRequirement( SecurityRequirementObject.composeSecurityRequirement(s) ); - } - if( operationObject.getNumServerObject() != 0 ){ - for( ServerObject s : operationObject.getServerObjects() ) - operation.addServer( ServerObject.composeServer(s) ); - } - if( operationObject.getNumExtension() != 0 ){ - Map<String, Object> extensionMap = new HashMap<>(); - for( Extension e : operationObject.getExtensions() ) - extensionMap.put(e.getKey(), e.getValue()); - operation.setExtensions(extensionMap); - } - - return operation; - } - /** - * @aspect RandomRequestGenerator - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\RandomRequestGenerator.jadd:40 - */ - public void sendRandomGET(String targetUrl) throws Exception { - Random rand = new Random(); - - for( ParameterObject p : this.getParameterObjects() ){ - if( p.getIn().equals("path") ){ - String pathPart = targetUrl.substring(targetUrl.indexOf("{") ,targetUrl.indexOf("}") + 1); - - if( p.getSchemaObject().getType().equals("string") ) - targetUrl = targetUrl.replace(pathPart, this.generateRandomString(rand, p.getSchemaObject().getEnumObjs())); - else if( p.getSchemaObject().getType().equals("integer") ) - targetUrl = targetUrl.replace(pathPart, this.generateRandomInt( rand, - p.getSchemaObject().getMinimum() != null ? p.getSchemaObject().getMinimum().intValue() : -1, - p.getSchemaObject().getMaximum() != null ? p.getSchemaObject().getMaximum().intValue() : -1 - )); - } - else if( p.getIn().equals("query") ){ - - if( p.getSchemaObject().getType().equals("string") ) - targetUrl = targetUrl + "&" + p.getName() + "=" + this.generateRandomString(rand, p.getSchemaObject().getEnumObjs()); - else if( p.getSchemaObject().getType().equals("integer") ) - targetUrl = targetUrl + "&" + p.getName() + "=" + this.generateRandomInt( rand, - p.getSchemaObject().getMinimum() != null ? p.getSchemaObject().getMinimum().intValue() : -1, - p.getSchemaObject().getMaximum() != null ? p.getSchemaObject().getMaximum().intValue() : -1 ); - else if( p.getSchemaObject().getType().equals("array") ){ - if( p.getSchemaObject().getItemsSchema().getSchemaObject().getType().equals("string") ){ - for( EnumObj e : p.getSchemaObject().getItemsSchema().getSchemaObject().getEnumObjs() ) - targetUrl=rand.nextDouble()< 0.5?targetUrl+"&"+p.getName()+"="+e.getEnumOb():targetUrl; - } - else if( p.getSchemaObject().getItemsSchema().getSchemaObject().getType().equals("integer") ){ - for( int i = 0 ; i < 5 ; i++ ) - targetUrl = targetUrl + "&" + p.getName() + "=" + this.generateRandomInt( rand, - p.getSchemaObject().getMinimum() != null ? p.getSchemaObject().getMinimum().intValue() : -1, - p.getSchemaObject().getMaximum() != null ? p.getSchemaObject().getMaximum().intValue() : -1 ); - } - - } - } - } - targetUrl = targetUrl.replaceFirst("&", "?"); - System.out.println(targetUrl); - - URL url = new URL(targetUrl); - HttpURLConnection con = (HttpURLConnection) url.openConnection(); - - con.setRequestMethod("GET"); // optional default is GET - int responseCode = con.getResponseCode(); - - // print result - System.out.println("HTTP status code (GET) : " + responseCode); - } - /** - * @aspect RandomRequestGenerator - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\RandomRequestGenerator.jadd:91 - */ - public void sendRandomPOST(String targetUrl) throws Exception { - Random rand = new Random(); - - for( ParameterObject p : this.getParameterObjects() ){ - if( p.getIn().equals("path") ){ - String pathPart = targetUrl.substring(targetUrl.indexOf("{") ,targetUrl.indexOf("}") + 1); - - if( p.getSchemaObject().getType().equals("string") ) - targetUrl = targetUrl.replace(pathPart, this.generateRandomString(rand, p.getSchemaObject().getEnumObjs())); - else if( p.getSchemaObject().getType().equals("integer") ) - targetUrl = targetUrl.replace(pathPart, this.generateRandomInt( rand, - -1, // p.getSchemaObject().getMinimum() != null ? p.getSchemaObject().getMinimum().intValue() : -1, - 10 // p.getSchemaObject().getMaximum() != null ? p.getSchemaObject().getMaximum().intValue() : -1 - )); - } - else if( p.getIn().equals("query") ){ - - if( p.getSchemaObject().getType().equals("string") ) - targetUrl = targetUrl + "&" + p.getName() + "=" + this.generateRandomString(rand, p.getSchemaObject().getEnumObjs()); - else if( p.getSchemaObject().getType().equals("integer") ) - targetUrl = targetUrl + "&" + p.getName() + "=" + this.generateRandomInt( rand, - -1, // p.getSchemaObject().getMinimum() != null ? p.getSchemaObject().getMinimum().intValue() : -1, - 10); // p.getSchemaObject().getMaximum() != null ? p.getSchemaObject().getMaximum().intValue() : -1 - else if( p.getSchemaObject().getType().equals("array") ){ - if( p.getSchemaObject().getItemsSchema().getSchemaObject().getType().equals("string") ){ - for( EnumObj e : p.getSchemaObject().getItemsSchema().getSchemaObject().getEnumObjs() ) - targetUrl=rand.nextDouble()< 0.5?targetUrl+"&"+p.getName()+"="+e.getEnumOb():targetUrl; - } - else if( p.getSchemaObject().getItemsSchema().getSchemaObject().getType().equals("integer") ){ - for( int i = 0 ; i < 5 ; i++ ) - targetUrl = targetUrl + "&" + p.getName() + "=" + this.generateRandomInt( rand, - -1, // p.getSchemaObject().getMinimum() != null ? p.getSchemaObject().getMinimum().intValue() : -1, - 10); // p.getSchemaObject().getMaximum() != null ? p.getSchemaObject().getMaximum().intValue() : -1 - } - - } - } - } - targetUrl = targetUrl.replaceFirst("&", "?"); - System.out.println(targetUrl); - - URL url = new URL(targetUrl); - HttpURLConnection con = (HttpURLConnection) url.openConnection(); - - con.setRequestMethod("POST"); // HTTP POST - con.setDoOutput(true); // POST - - int responseCode = con.getResponseCode(); - - // print result - System.out.println("HTTP status code (POST) : " + responseCode); - } - /** - * @aspect RandomRequestGenerator - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\RandomRequestGenerator.jadd:144 - */ - public String generateRandomString(Random rand, JastAddList<EnumObj> objs) { - if( objs.getNumChild() != 0 ) - return objs.getChild(rand.nextInt(objs.getNumChild())).getEnumOb().toString(); - - - return rand - .ints(97, 123) - .limit(10) - .collect(StringBuilder::new, StringBuilder::appendCodePoint, StringBuilder::append) - .toString(); - } - /** - * @aspect RandomRequestGenerator - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\RandomRequestGenerator.jadd:156 - */ - public String generateRandomInt(Random rand, int minimum, int maximum){ - if( minimum > -1 && maximum > 0 ) - return String.valueOf(rand.nextInt(minimum+maximum)-minimum); - else if( minimum > -1 ) - return String.valueOf(rand.nextInt()+minimum); - else if( maximum > 0 ) - return String.valueOf(rand.nextInt(maximum)); - return String.valueOf(rand.nextInt()); - } - /** - * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:350 - */ - public static OperationObject parseOperation(Operation operation){ - OperationObject operationObject = new OperationObject(); - - if( operation.getDeprecated() != null ) - operationObject.setDeprecatedBoolean(operation.getDeprecated()); - if( operation.getTags() != null ){ - for(String t : operation.getTags()) { - de.tudresden.inf.st.openapi.ast.Tag tag = new de.tudresden.inf.st.openapi.ast.Tag(); - tag.setTag(t); - operationObject.addTag(tag); - } - } - if( operation.getSummary() != null ) - operationObject.setSummary(operation.getSummary()); - if( operation.getDescription() != null ) - operationObject.setDescription( operation.getDescription() ); - if( operation.getExternalDocs() != null ) - operationObject.setExternalDocObject(ExternalDocObject.parseExternalDocs(operation.getExternalDocs())); - if( operation.getOperationId() != null ) - operationObject.setOperationID( operation.getOperationId() ); - if( operation.getParameters() != null ){ - for( Parameter p : operation.getParameters() ) - operationObject.addParameterObject(ParameterObject.parseParameter(p)); - } - if( operation.getRequestBody() != null ) - operationObject.setRequestBodyObject( RequestBodyObject.parseRequestBody( operation.getRequestBody() ) ); - if( operation.getResponses() != null ){ - for( String key : operation.getResponses().keySet()) - operationObject.addResponseTuple(new ResponseTuple(key, ResponseObject.parseResponse(operation.getResponse(key)))); - } - if( operation.getCallbacks() != null ){ - for( String key : operation.getCallbacks().keySet() ) - operationObject.addCallbackTuple(new CallbackTuple(key, CallbackObject.parseCallback(operation.getCallback(key)))); - } - if( operation.getSecurityRequirements() != null ){ - for( SecurityRequirement s : operation.getSecurityRequirements() ) - operationObject.addSecurityRequirementObject(SecurityRequirementObject.parseSecurityRequirement(s)); - } - if( operation.getServers() != null ){ - for( Server s : operation.getServers() ) - operationObject.addServerObject(ServerObject.parseServer(s)); - } - if( operation.getExtensions() != null ) { - for( String key : operation.getExtensions().keySet() ) - operationObject.addExtension(new Extension(key, operation.getExtensions().get(key))); - } - - return operationObject; - } - /** - * @declaredat ASTNode:1 - */ - public OperationObject() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[9]; - setChild(new JastAddList(), 0); - setChild(new Opt(), 1); - setChild(new JastAddList(), 2); - setChild(new Opt(), 3); - setChild(new JastAddList(), 4); - setChild(new JastAddList(), 5); - setChild(new JastAddList(), 6); - setChild(new JastAddList(), 7); - setChild(new JastAddList(), 8); - } - /** - * @declaredat ASTNode:22 - */ - @ASTNodeAnnotation.Constructor( - name = {"Tag", "Summary", "Description", "ExternalDocObject", "OperationID", "ParameterObject", "RequestBodyObject", "ResponseTuple", "CallbackTuple", "DeprecatedBoolean", "SecurityRequirementObject", "ServerObject", "Required", "Extension"}, - type = {"JastAddList<Tag>", "String", "String", "Opt<ExternalDocObject>", "String", "JastAddList<ParameterObject>", "Opt<RequestBodyObject>", "JastAddList<ResponseTuple>", "JastAddList<CallbackTuple>", "Boolean", "JastAddList<SecurityRequirementObject>", "JastAddList<ServerObject>", "Boolean", "JastAddList<Extension>"}, - kind = {"List", "Token", "Token", "Opt", "Token", "List", "Opt", "List", "List", "Token", "List", "List", "Token", "List"} - ) - public OperationObject(JastAddList<Tag> p0, String p1, String p2, Opt<ExternalDocObject> p3, String p4, JastAddList<ParameterObject> p5, Opt<RequestBodyObject> p6, JastAddList<ResponseTuple> p7, JastAddList<CallbackTuple> p8, Boolean p9, JastAddList<SecurityRequirementObject> p10, JastAddList<ServerObject> p11, Boolean p12, JastAddList<Extension> p13) { - setChild(p0, 0); - setSummary(p1); - setDescription(p2); - setChild(p3, 1); - setOperationID(p4); - setChild(p5, 2); - setChild(p6, 3); - setChild(p7, 4); - setChild(p8, 5); - setDeprecatedBoolean(p9); - setChild(p10, 6); - setChild(p11, 7); - setRequired(p12); - setChild(p13, 8); - } - /** @apilevel low-level - * @declaredat ASTNode:44 - */ - protected int numChildren() { - return 9; - } - /** - * @apilevel internal - * @declaredat ASTNode:50 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:54 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:58 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:62 - */ - public OperationObject clone() throws CloneNotSupportedException { - OperationObject node = (OperationObject) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:67 - */ - public OperationObject copy() { - try { - OperationObject node = (OperationObject) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:86 - */ - @Deprecated - public OperationObject fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:96 - */ - public OperationObject treeCopyNoTransform() { - OperationObject tree = (OperationObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:116 - */ - public OperationObject treeCopy() { - OperationObject tree = (OperationObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:130 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Summary == ((OperationObject) node).tokenString_Summary) && (tokenString_Description == ((OperationObject) node).tokenString_Description) && (tokenString_OperationID == ((OperationObject) node).tokenString_OperationID) && (tokenBoolean_DeprecatedBoolean == ((OperationObject) node).tokenBoolean_DeprecatedBoolean) && (tokenBoolean_Required == ((OperationObject) node).tokenBoolean_Required); - } - /** - * Replaces the Tag list. - * @param list The new list node to be used as the Tag list. - * @apilevel high-level - */ - public void setTagList(JastAddList<Tag> list) { - setChild(list, 0); - } - /** - * Retrieves the number of children in the Tag list. - * @return Number of children in the Tag list. - * @apilevel high-level - */ - public int getNumTag() { - return getTagList().getNumChild(); - } - /** - * Retrieves the number of children in the Tag list. - * Calling this method will not trigger rewrites. - * @return Number of children in the Tag list. - * @apilevel low-level - */ - public int getNumTagNoTransform() { - return getTagListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the Tag list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the Tag list. - * @apilevel high-level - */ - public Tag getTag(int i) { - return (Tag) getTagList().getChild(i); - } - /** - * Check whether the Tag list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasTag() { - return getTagList().getNumChild() != 0; - } - /** - * Append an element to the Tag list. - * @param node The element to append to the Tag list. - * @apilevel high-level - */ - public void addTag(Tag node) { - JastAddList<Tag> list = (parent == null) ? getTagListNoTransform() : getTagList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addTagNoTransform(Tag node) { - JastAddList<Tag> list = getTagListNoTransform(); - list.addChild(node); - } - /** - * Replaces the Tag list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setTag(Tag node, int i) { - JastAddList<Tag> list = getTagList(); - list.setChild(node, i); - } - /** - * Retrieves the Tag list. - * @return The node representing the Tag list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="Tag") - public JastAddList<Tag> getTagList() { - JastAddList<Tag> list = (JastAddList<Tag>) getChild(0); - return list; - } - /** - * Retrieves the Tag list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the Tag list. - * @apilevel low-level - */ - public JastAddList<Tag> getTagListNoTransform() { - return (JastAddList<Tag>) getChildNoTransform(0); - } - /** - * @return the element at index {@code i} in the Tag list without - * triggering rewrites. - */ - public Tag getTagNoTransform(int i) { - return (Tag) getTagListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the Tag list. - * @return The node representing the Tag list. - * @apilevel high-level - */ - public JastAddList<Tag> getTags() { - return getTagList(); - } - /** - * Retrieves the Tag list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the Tag list. - * @apilevel low-level - */ - public JastAddList<Tag> getTagsNoTransform() { - return getTagListNoTransform(); - } - /** - * Replaces the lexeme Summary. - * @param value The new value for the lexeme Summary. - * @apilevel high-level - */ - public void setSummary(String value) { - tokenString_Summary = value; - } - /** @apilevel internal - */ - protected String tokenString_Summary; - /** - * Retrieves the value for the lexeme Summary. - * @return The value for the lexeme Summary. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Summary") - public String getSummary() { - return tokenString_Summary != null ? tokenString_Summary : ""; - } - /** - * Replaces the lexeme Description. - * @param value The new value for the lexeme Description. - * @apilevel high-level - */ - public void setDescription(String value) { - tokenString_Description = value; - } - /** @apilevel internal - */ - protected String tokenString_Description; - /** - * Retrieves the value for the lexeme Description. - * @return The value for the lexeme Description. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Description") - public String getDescription() { - return tokenString_Description != null ? tokenString_Description : ""; - } - /** - * Replaces the optional node for the ExternalDocObject child. This is the <code>Opt</code> - * node containing the child ExternalDocObject, not the actual child! - * @param opt The new node to be used as the optional node for the ExternalDocObject child. - * @apilevel low-level - */ - public void setExternalDocObjectOpt(Opt<ExternalDocObject> opt) { - setChild(opt, 1); - } - /** - * Replaces the (optional) ExternalDocObject child. - * @param node The new node to be used as the ExternalDocObject child. - * @apilevel high-level - */ - public void setExternalDocObject(ExternalDocObject node) { - getExternalDocObjectOpt().setChild(node, 0); - } - /** - * Check whether the optional ExternalDocObject child exists. - * @return {@code true} if the optional ExternalDocObject child exists, {@code false} if it does not. - * @apilevel high-level - */ - public boolean hasExternalDocObject() { - return getExternalDocObjectOpt().getNumChild() != 0; - } - /** - * Retrieves the (optional) ExternalDocObject child. - * @return The ExternalDocObject child, if it exists. Returns {@code null} otherwise. - * @apilevel low-level - */ - public ExternalDocObject getExternalDocObject() { - return (ExternalDocObject) getExternalDocObjectOpt().getChild(0); - } - /** - * Retrieves the optional node for the ExternalDocObject child. This is the <code>Opt</code> node containing the child ExternalDocObject, not the actual child! - * @return The optional node for child the ExternalDocObject child. - * @apilevel low-level - */ - @ASTNodeAnnotation.OptChild(name="ExternalDocObject") - public Opt<ExternalDocObject> getExternalDocObjectOpt() { - return (Opt<ExternalDocObject>) getChild(1); - } - /** - * Retrieves the optional node for child ExternalDocObject. This is the <code>Opt</code> node containing the child ExternalDocObject, not the actual child! - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child ExternalDocObject. - * @apilevel low-level - */ - public Opt<ExternalDocObject> getExternalDocObjectOptNoTransform() { - return (Opt<ExternalDocObject>) getChildNoTransform(1); - } - /** - * Replaces the lexeme OperationID. - * @param value The new value for the lexeme OperationID. - * @apilevel high-level - */ - public void setOperationID(String value) { - tokenString_OperationID = value; - } - /** @apilevel internal - */ - protected String tokenString_OperationID; - /** - * Retrieves the value for the lexeme OperationID. - * @return The value for the lexeme OperationID. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="OperationID") - public String getOperationID() { - return tokenString_OperationID != null ? tokenString_OperationID : ""; - } - /** - * Replaces the ParameterObject list. - * @param list The new list node to be used as the ParameterObject list. - * @apilevel high-level - */ - public void setParameterObjectList(JastAddList<ParameterObject> list) { - setChild(list, 2); - } - /** - * Retrieves the number of children in the ParameterObject list. - * @return Number of children in the ParameterObject list. - * @apilevel high-level - */ - public int getNumParameterObject() { - return getParameterObjectList().getNumChild(); - } - /** - * Retrieves the number of children in the ParameterObject list. - * Calling this method will not trigger rewrites. - * @return Number of children in the ParameterObject list. - * @apilevel low-level - */ - public int getNumParameterObjectNoTransform() { - return getParameterObjectListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the ParameterObject list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the ParameterObject list. - * @apilevel high-level - */ - public ParameterObject getParameterObject(int i) { - return (ParameterObject) getParameterObjectList().getChild(i); - } - /** - * Check whether the ParameterObject list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasParameterObject() { - return getParameterObjectList().getNumChild() != 0; - } - /** - * Append an element to the ParameterObject list. - * @param node The element to append to the ParameterObject list. - * @apilevel high-level - */ - public void addParameterObject(ParameterObject node) { - JastAddList<ParameterObject> list = (parent == null) ? getParameterObjectListNoTransform() : getParameterObjectList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addParameterObjectNoTransform(ParameterObject node) { - JastAddList<ParameterObject> list = getParameterObjectListNoTransform(); - list.addChild(node); - } - /** - * Replaces the ParameterObject list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setParameterObject(ParameterObject node, int i) { - JastAddList<ParameterObject> list = getParameterObjectList(); - list.setChild(node, i); - } - /** - * Retrieves the ParameterObject list. - * @return The node representing the ParameterObject list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="ParameterObject") - public JastAddList<ParameterObject> getParameterObjectList() { - JastAddList<ParameterObject> list = (JastAddList<ParameterObject>) getChild(2); - return list; - } - /** - * Retrieves the ParameterObject list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ParameterObject list. - * @apilevel low-level - */ - public JastAddList<ParameterObject> getParameterObjectListNoTransform() { - return (JastAddList<ParameterObject>) getChildNoTransform(2); - } - /** - * @return the element at index {@code i} in the ParameterObject list without - * triggering rewrites. - */ - public ParameterObject getParameterObjectNoTransform(int i) { - return (ParameterObject) getParameterObjectListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the ParameterObject list. - * @return The node representing the ParameterObject list. - * @apilevel high-level - */ - public JastAddList<ParameterObject> getParameterObjects() { - return getParameterObjectList(); - } - /** - * Retrieves the ParameterObject list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ParameterObject list. - * @apilevel low-level - */ - public JastAddList<ParameterObject> getParameterObjectsNoTransform() { - return getParameterObjectListNoTransform(); - } - /** - * Replaces the optional node for the RequestBodyObject child. This is the <code>Opt</code> - * node containing the child RequestBodyObject, not the actual child! - * @param opt The new node to be used as the optional node for the RequestBodyObject child. - * @apilevel low-level - */ - public void setRequestBodyObjectOpt(Opt<RequestBodyObject> opt) { - setChild(opt, 3); - } - /** - * Replaces the (optional) RequestBodyObject child. - * @param node The new node to be used as the RequestBodyObject child. - * @apilevel high-level - */ - public void setRequestBodyObject(RequestBodyObject node) { - getRequestBodyObjectOpt().setChild(node, 0); - } - /** - * Check whether the optional RequestBodyObject child exists. - * @return {@code true} if the optional RequestBodyObject child exists, {@code false} if it does not. - * @apilevel high-level - */ - public boolean hasRequestBodyObject() { - return getRequestBodyObjectOpt().getNumChild() != 0; - } - /** - * Retrieves the (optional) RequestBodyObject child. - * @return The RequestBodyObject child, if it exists. Returns {@code null} otherwise. - * @apilevel low-level - */ - public RequestBodyObject getRequestBodyObject() { - return (RequestBodyObject) getRequestBodyObjectOpt().getChild(0); - } - /** - * Retrieves the optional node for the RequestBodyObject child. This is the <code>Opt</code> node containing the child RequestBodyObject, not the actual child! - * @return The optional node for child the RequestBodyObject child. - * @apilevel low-level - */ - @ASTNodeAnnotation.OptChild(name="RequestBodyObject") - public Opt<RequestBodyObject> getRequestBodyObjectOpt() { - return (Opt<RequestBodyObject>) getChild(3); - } - /** - * Retrieves the optional node for child RequestBodyObject. This is the <code>Opt</code> node containing the child RequestBodyObject, not the actual child! - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child RequestBodyObject. - * @apilevel low-level - */ - public Opt<RequestBodyObject> getRequestBodyObjectOptNoTransform() { - return (Opt<RequestBodyObject>) getChildNoTransform(3); - } - /** - * Replaces the ResponseTuple list. - * @param list The new list node to be used as the ResponseTuple list. - * @apilevel high-level - */ - public void setResponseTupleList(JastAddList<ResponseTuple> list) { - setChild(list, 4); - } - /** - * Retrieves the number of children in the ResponseTuple list. - * @return Number of children in the ResponseTuple list. - * @apilevel high-level - */ - public int getNumResponseTuple() { - return getResponseTupleList().getNumChild(); - } - /** - * Retrieves the number of children in the ResponseTuple list. - * Calling this method will not trigger rewrites. - * @return Number of children in the ResponseTuple list. - * @apilevel low-level - */ - public int getNumResponseTupleNoTransform() { - return getResponseTupleListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the ResponseTuple list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the ResponseTuple list. - * @apilevel high-level - */ - public ResponseTuple getResponseTuple(int i) { - return (ResponseTuple) getResponseTupleList().getChild(i); - } - /** - * Check whether the ResponseTuple list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasResponseTuple() { - return getResponseTupleList().getNumChild() != 0; - } - /** - * Append an element to the ResponseTuple list. - * @param node The element to append to the ResponseTuple list. - * @apilevel high-level - */ - public void addResponseTuple(ResponseTuple node) { - JastAddList<ResponseTuple> list = (parent == null) ? getResponseTupleListNoTransform() : getResponseTupleList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addResponseTupleNoTransform(ResponseTuple node) { - JastAddList<ResponseTuple> list = getResponseTupleListNoTransform(); - list.addChild(node); - } - /** - * Replaces the ResponseTuple list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setResponseTuple(ResponseTuple node, int i) { - JastAddList<ResponseTuple> list = getResponseTupleList(); - list.setChild(node, i); - } - /** - * Retrieves the ResponseTuple list. - * @return The node representing the ResponseTuple list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="ResponseTuple") - public JastAddList<ResponseTuple> getResponseTupleList() { - JastAddList<ResponseTuple> list = (JastAddList<ResponseTuple>) getChild(4); - return list; - } - /** - * Retrieves the ResponseTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ResponseTuple list. - * @apilevel low-level - */ - public JastAddList<ResponseTuple> getResponseTupleListNoTransform() { - return (JastAddList<ResponseTuple>) getChildNoTransform(4); - } - /** - * @return the element at index {@code i} in the ResponseTuple list without - * triggering rewrites. - */ - public ResponseTuple getResponseTupleNoTransform(int i) { - return (ResponseTuple) getResponseTupleListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the ResponseTuple list. - * @return The node representing the ResponseTuple list. - * @apilevel high-level - */ - public JastAddList<ResponseTuple> getResponseTuples() { - return getResponseTupleList(); - } - /** - * Retrieves the ResponseTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ResponseTuple list. - * @apilevel low-level - */ - public JastAddList<ResponseTuple> getResponseTuplesNoTransform() { - return getResponseTupleListNoTransform(); - } - /** - * Replaces the CallbackTuple list. - * @param list The new list node to be used as the CallbackTuple list. - * @apilevel high-level - */ - public void setCallbackTupleList(JastAddList<CallbackTuple> list) { - setChild(list, 5); - } - /** - * Retrieves the number of children in the CallbackTuple list. - * @return Number of children in the CallbackTuple list. - * @apilevel high-level - */ - public int getNumCallbackTuple() { - return getCallbackTupleList().getNumChild(); - } - /** - * Retrieves the number of children in the CallbackTuple list. - * Calling this method will not trigger rewrites. - * @return Number of children in the CallbackTuple list. - * @apilevel low-level - */ - public int getNumCallbackTupleNoTransform() { - return getCallbackTupleListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the CallbackTuple list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the CallbackTuple list. - * @apilevel high-level - */ - public CallbackTuple getCallbackTuple(int i) { - return (CallbackTuple) getCallbackTupleList().getChild(i); - } - /** - * Check whether the CallbackTuple list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasCallbackTuple() { - return getCallbackTupleList().getNumChild() != 0; - } - /** - * Append an element to the CallbackTuple list. - * @param node The element to append to the CallbackTuple list. - * @apilevel high-level - */ - public void addCallbackTuple(CallbackTuple node) { - JastAddList<CallbackTuple> list = (parent == null) ? getCallbackTupleListNoTransform() : getCallbackTupleList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addCallbackTupleNoTransform(CallbackTuple node) { - JastAddList<CallbackTuple> list = getCallbackTupleListNoTransform(); - list.addChild(node); - } - /** - * Replaces the CallbackTuple list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setCallbackTuple(CallbackTuple node, int i) { - JastAddList<CallbackTuple> list = getCallbackTupleList(); - list.setChild(node, i); - } - /** - * Retrieves the CallbackTuple list. - * @return The node representing the CallbackTuple list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="CallbackTuple") - public JastAddList<CallbackTuple> getCallbackTupleList() { - JastAddList<CallbackTuple> list = (JastAddList<CallbackTuple>) getChild(5); - return list; - } - /** - * Retrieves the CallbackTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the CallbackTuple list. - * @apilevel low-level - */ - public JastAddList<CallbackTuple> getCallbackTupleListNoTransform() { - return (JastAddList<CallbackTuple>) getChildNoTransform(5); - } - /** - * @return the element at index {@code i} in the CallbackTuple list without - * triggering rewrites. - */ - public CallbackTuple getCallbackTupleNoTransform(int i) { - return (CallbackTuple) getCallbackTupleListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the CallbackTuple list. - * @return The node representing the CallbackTuple list. - * @apilevel high-level - */ - public JastAddList<CallbackTuple> getCallbackTuples() { - return getCallbackTupleList(); - } - /** - * Retrieves the CallbackTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the CallbackTuple list. - * @apilevel low-level - */ - public JastAddList<CallbackTuple> getCallbackTuplesNoTransform() { - return getCallbackTupleListNoTransform(); - } - /** - * Replaces the lexeme DeprecatedBoolean. - * @param value The new value for the lexeme DeprecatedBoolean. - * @apilevel high-level - */ - public void setDeprecatedBoolean(Boolean value) { - tokenBoolean_DeprecatedBoolean = value; - } - /** @apilevel internal - */ - protected Boolean tokenBoolean_DeprecatedBoolean; - /** - * Retrieves the value for the lexeme DeprecatedBoolean. - * @return The value for the lexeme DeprecatedBoolean. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="DeprecatedBoolean") - public Boolean getDeprecatedBoolean() { - return tokenBoolean_DeprecatedBoolean; - } - /** - * Replaces the SecurityRequirementObject list. - * @param list The new list node to be used as the SecurityRequirementObject list. - * @apilevel high-level - */ - public void setSecurityRequirementObjectList(JastAddList<SecurityRequirementObject> list) { - setChild(list, 6); - } - /** - * Retrieves the number of children in the SecurityRequirementObject list. - * @return Number of children in the SecurityRequirementObject list. - * @apilevel high-level - */ - public int getNumSecurityRequirementObject() { - return getSecurityRequirementObjectList().getNumChild(); - } - /** - * Retrieves the number of children in the SecurityRequirementObject list. - * Calling this method will not trigger rewrites. - * @return Number of children in the SecurityRequirementObject list. - * @apilevel low-level - */ - public int getNumSecurityRequirementObjectNoTransform() { - return getSecurityRequirementObjectListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the SecurityRequirementObject list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the SecurityRequirementObject list. - * @apilevel high-level - */ - public SecurityRequirementObject getSecurityRequirementObject(int i) { - return (SecurityRequirementObject) getSecurityRequirementObjectList().getChild(i); - } - /** - * Check whether the SecurityRequirementObject list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasSecurityRequirementObject() { - return getSecurityRequirementObjectList().getNumChild() != 0; - } - /** - * Append an element to the SecurityRequirementObject list. - * @param node The element to append to the SecurityRequirementObject list. - * @apilevel high-level - */ - public void addSecurityRequirementObject(SecurityRequirementObject node) { - JastAddList<SecurityRequirementObject> list = (parent == null) ? getSecurityRequirementObjectListNoTransform() : getSecurityRequirementObjectList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addSecurityRequirementObjectNoTransform(SecurityRequirementObject node) { - JastAddList<SecurityRequirementObject> list = getSecurityRequirementObjectListNoTransform(); - list.addChild(node); - } - /** - * Replaces the SecurityRequirementObject list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setSecurityRequirementObject(SecurityRequirementObject node, int i) { - JastAddList<SecurityRequirementObject> list = getSecurityRequirementObjectList(); - list.setChild(node, i); - } - /** - * Retrieves the SecurityRequirementObject list. - * @return The node representing the SecurityRequirementObject list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="SecurityRequirementObject") - public JastAddList<SecurityRequirementObject> getSecurityRequirementObjectList() { - JastAddList<SecurityRequirementObject> list = (JastAddList<SecurityRequirementObject>) getChild(6); - return list; - } - /** - * Retrieves the SecurityRequirementObject list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the SecurityRequirementObject list. - * @apilevel low-level - */ - public JastAddList<SecurityRequirementObject> getSecurityRequirementObjectListNoTransform() { - return (JastAddList<SecurityRequirementObject>) getChildNoTransform(6); - } - /** - * @return the element at index {@code i} in the SecurityRequirementObject list without - * triggering rewrites. - */ - public SecurityRequirementObject getSecurityRequirementObjectNoTransform(int i) { - return (SecurityRequirementObject) getSecurityRequirementObjectListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the SecurityRequirementObject list. - * @return The node representing the SecurityRequirementObject list. - * @apilevel high-level - */ - public JastAddList<SecurityRequirementObject> getSecurityRequirementObjects() { - return getSecurityRequirementObjectList(); - } - /** - * Retrieves the SecurityRequirementObject list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the SecurityRequirementObject list. - * @apilevel low-level - */ - public JastAddList<SecurityRequirementObject> getSecurityRequirementObjectsNoTransform() { - return getSecurityRequirementObjectListNoTransform(); - } - /** - * Replaces the ServerObject list. - * @param list The new list node to be used as the ServerObject list. - * @apilevel high-level - */ - public void setServerObjectList(JastAddList<ServerObject> list) { - setChild(list, 7); - } - /** - * Retrieves the number of children in the ServerObject list. - * @return Number of children in the ServerObject list. - * @apilevel high-level - */ - public int getNumServerObject() { - return getServerObjectList().getNumChild(); - } - /** - * Retrieves the number of children in the ServerObject list. - * Calling this method will not trigger rewrites. - * @return Number of children in the ServerObject list. - * @apilevel low-level - */ - public int getNumServerObjectNoTransform() { - return getServerObjectListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the ServerObject list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the ServerObject list. - * @apilevel high-level - */ - public ServerObject getServerObject(int i) { - return (ServerObject) getServerObjectList().getChild(i); - } - /** - * Check whether the ServerObject list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasServerObject() { - return getServerObjectList().getNumChild() != 0; - } - /** - * Append an element to the ServerObject list. - * @param node The element to append to the ServerObject list. - * @apilevel high-level - */ - public void addServerObject(ServerObject node) { - JastAddList<ServerObject> list = (parent == null) ? getServerObjectListNoTransform() : getServerObjectList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addServerObjectNoTransform(ServerObject node) { - JastAddList<ServerObject> list = getServerObjectListNoTransform(); - list.addChild(node); - } - /** - * Replaces the ServerObject list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setServerObject(ServerObject node, int i) { - JastAddList<ServerObject> list = getServerObjectList(); - list.setChild(node, i); - } - /** - * Retrieves the ServerObject list. - * @return The node representing the ServerObject list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="ServerObject") - public JastAddList<ServerObject> getServerObjectList() { - JastAddList<ServerObject> list = (JastAddList<ServerObject>) getChild(7); - return list; - } - /** - * Retrieves the ServerObject list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ServerObject list. - * @apilevel low-level - */ - public JastAddList<ServerObject> getServerObjectListNoTransform() { - return (JastAddList<ServerObject>) getChildNoTransform(7); - } - /** - * @return the element at index {@code i} in the ServerObject list without - * triggering rewrites. - */ - public ServerObject getServerObjectNoTransform(int i) { - return (ServerObject) getServerObjectListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the ServerObject list. - * @return The node representing the ServerObject list. - * @apilevel high-level - */ - public JastAddList<ServerObject> getServerObjects() { - return getServerObjectList(); - } - /** - * Retrieves the ServerObject list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ServerObject list. - * @apilevel low-level - */ - public JastAddList<ServerObject> getServerObjectsNoTransform() { - return getServerObjectListNoTransform(); - } - /** - * Replaces the lexeme Required. - * @param value The new value for the lexeme Required. - * @apilevel high-level - */ - public void setRequired(Boolean value) { - tokenBoolean_Required = value; - } - /** @apilevel internal - */ - protected Boolean tokenBoolean_Required; - /** - * Retrieves the value for the lexeme Required. - * @return The value for the lexeme Required. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Required") - public Boolean getRequired() { - return tokenBoolean_Required; - } - /** - * Replaces the Extension list. - * @param list The new list node to be used as the Extension list. - * @apilevel high-level - */ - public void setExtensionList(JastAddList<Extension> list) { - setChild(list, 8); - } - /** - * Retrieves the number of children in the Extension list. - * @return Number of children in the Extension list. - * @apilevel high-level - */ - public int getNumExtension() { - return getExtensionList().getNumChild(); - } - /** - * Retrieves the number of children in the Extension list. - * Calling this method will not trigger rewrites. - * @return Number of children in the Extension list. - * @apilevel low-level - */ - public int getNumExtensionNoTransform() { - return getExtensionListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the Extension list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the Extension list. - * @apilevel high-level - */ - public Extension getExtension(int i) { - return (Extension) getExtensionList().getChild(i); - } - /** - * Check whether the Extension list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasExtension() { - return getExtensionList().getNumChild() != 0; - } - /** - * Append an element to the Extension list. - * @param node The element to append to the Extension list. - * @apilevel high-level - */ - public void addExtension(Extension node) { - JastAddList<Extension> list = (parent == null) ? getExtensionListNoTransform() : getExtensionList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addExtensionNoTransform(Extension node) { - JastAddList<Extension> list = getExtensionListNoTransform(); - list.addChild(node); - } - /** - * Replaces the Extension list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setExtension(Extension node, int i) { - JastAddList<Extension> list = getExtensionList(); - list.setChild(node, i); - } - /** - * Retrieves the Extension list. - * @return The node representing the Extension list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="Extension") - public JastAddList<Extension> getExtensionList() { - JastAddList<Extension> list = (JastAddList<Extension>) getChild(8); - return list; - } - /** - * Retrieves the Extension list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the Extension list. - * @apilevel low-level - */ - public JastAddList<Extension> getExtensionListNoTransform() { - return (JastAddList<Extension>) getChildNoTransform(8); - } - /** - * @return the element at index {@code i} in the Extension list without - * triggering rewrites. - */ - public Extension getExtensionNoTransform(int i) { - return (Extension) getExtensionListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the Extension list. - * @return The node representing the Extension list. - * @apilevel high-level - */ - public JastAddList<Extension> getExtensions() { - return getExtensionList(); - } - /** - * Retrieves the Extension list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the Extension list. - * @apilevel low-level - */ - public JastAddList<Extension> getExtensionsNoTransform() { - return getExtensionListNoTransform(); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/Opt.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/Opt.java deleted file mode 100644 index 9a294dba6045fec8ca5a36087a58482ea7d6d4cb..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/Opt.java +++ /dev/null @@ -1,154 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @astdecl Opt : ASTNode; - * @production Opt : {@link ASTNode}; - - */ -public class Opt<T extends ASTNode> extends ASTNode<T> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public Opt() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - } - /** - * @declaredat ASTNode:12 - */ - public Opt(T opt) { - setChild(opt, 0); - } - /** - * @apilevel internal - * @declaredat ASTNode:18 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:22 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:26 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:30 - */ - public Opt<T> clone() throws CloneNotSupportedException { - Opt node = (Opt) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:35 - */ - public Opt<T> copy() { - try { - Opt node = (Opt) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:54 - */ - @Deprecated - public Opt<T> fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:64 - */ - public Opt<T> treeCopyNoTransform() { - Opt tree = (Opt) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:84 - */ - public Opt<T> treeCopy() { - Opt tree = (Opt) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:98 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/Options.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/Options.java deleted file mode 100644 index 7b99b406515739c5b182af8ea95ee4cd5beb0ca8..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/Options.java +++ /dev/null @@ -1,193 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:43 - * @astdecl Options : ASTNode ::= OperationObject; - * @production Options : {@link ASTNode} ::= <span class="component">{@link OperationObject}</span>; - - */ -public class Options extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public Options() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"OperationObject"}, - type = {"OperationObject"}, - kind = {"Child"} - ) - public Options(OperationObject p0) { - setChild(p0, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public Options clone() throws CloneNotSupportedException { - Options node = (Options) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public Options copy() { - try { - Options node = (Options) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public Options fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public Options treeCopyNoTransform() { - Options tree = (Options) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public Options treeCopy() { - Options tree = (Options) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node); - } - /** - * Replaces the OperationObject child. - * @param node The new node to replace the OperationObject child. - * @apilevel high-level - */ - public void setOperationObject(OperationObject node) { - setChild(node, 0); - } - /** - * Retrieves the OperationObject child. - * @return The current node used as the OperationObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="OperationObject") - public OperationObject getOperationObject() { - return (OperationObject) getChild(0); - } - /** - * Retrieves the OperationObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the OperationObject child. - * @apilevel low-level - */ - public OperationObject getOperationObjectNoTransform() { - return (OperationObject) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ParameterObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ParameterObject.java deleted file mode 100644 index 9a7f7920311d110bcc362ee84574ecec6123596e..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ParameterObject.java +++ /dev/null @@ -1,882 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:56 - * @astdecl ParameterObject : ASTNode ::= <Name:String> <In:String> <Description:String> <Required:Boolean> <DeprecatedBoolean:Boolean> <AllowEmptyValue:Boolean> <Style:String> <Explode:Boolean> <AllowReserved:Boolean> [SchemaObject] <Example:Object> ExampleTuple* ContentTuple* <Ref:String> Extension*; - * @production ParameterObject : {@link ASTNode} ::= <span class="component"><Name:String></span> <span class="component"><In:String></span> <span class="component"><Description:String></span> <span class="component"><Required:Boolean></span> <span class="component"><DeprecatedBoolean:Boolean></span> <span class="component"><AllowEmptyValue:Boolean></span> <span class="component"><Style:String></span> <span class="component"><Explode:Boolean></span> <span class="component"><AllowReserved:Boolean></span> <span class="component">[{@link SchemaObject}]</span> <span class="component"><Example:Object></span> <span class="component">{@link ExampleTuple}*</span> <span class="component">{@link ContentTuple}*</span> <span class="component"><Ref:String></span> <span class="component">{@link Extension}*</span>; - - */ -public class ParameterObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:391 - */ - public static Parameter composeParameter (ParameterObject parameterObject){ - Parameter parameter = new Parameter(); - - if( !parameterObject.getRef().isEmpty() ) - parameter.setRef(parameterObject.getRef()); - if( !parameterObject.getName().isEmpty() ) - parameter.setName(parameterObject.getName()); - if( !parameterObject.getIn().isEmpty() ) - parameter.setIn(parameterObject.getIn()); - if( parameterObject.getRequired() != null ) - parameter.setRequired(parameterObject.getRequired()); - if( !parameterObject.getDescription().isEmpty() ) - parameter.setDescription(parameterObject.getDescription()); - if( parameterObject.getDeprecatedBoolean() != null ) - parameter.setDeprecated(parameterObject.getDeprecatedBoolean()); - if( !parameterObject.getStyle().isEmpty() ) - parameter.setStyle(parameterObject.getStyle()); - if( parameterObject.getAllowReserved() != null ) - parameter.setAllowReserved(parameterObject.getAllowReserved()); - if( parameterObject.getExplode() != null ) - parameter.setExplode(parameterObject.getExplode()); - if( parameterObject.getSchemaObject() != null ) - parameter.setSchema(SchemaObject.composeSchema(parameterObject.getSchemaObject())); - if( parameterObject.getExample() != null ) - parameter.setExample(parameterObject.getExample()); - if( parameterObject.getNumExampleTuple() != 0 ){ - Map<String, Example> exampleMap = new HashMap<>(); - for( ExampleTuple t : parameterObject.getExampleTuples() ) - exampleMap.put(t.getKey(), ExampleObject.composeExample(t.getExampleObject())); - parameter.setExamples(exampleMap); - } - if( parameterObject.getNumContentTuple() != 0 ){ - Map<String, MediaType> contentMap = new HashMap<>(); - for( ContentTuple t : parameterObject.getContentTuples() ) - contentMap.put(t.getKey(), MediaTypeObject.composeMediaType(t.getMediaTypeObject())); - parameter.setContentMediaTypes(contentMap); - } - if( parameterObject.getRequired() != null ) - parameter.setRequired(parameterObject.getRequired()); - if( parameterObject.getNumExtension() != 0 ){ - Map<String, Object> extensionMap = new HashMap<>(); - for( Extension e : parameterObject.getExtensions() ) - extensionMap.put(e.getKey(), e.getValue()); - parameter.setExtensions(extensionMap); - } - - return parameter; - } - /** - * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:416 - */ - public static ParameterObject parseParameter(Parameter parameter){ - ParameterObject parameterObject = new ParameterObject(); - - if( parameter.isRef() ) - parameterObject.setRef(parameter.getRef()); - if( parameter.getName() != null ) - parameterObject.setName(parameter.getName()); - if( parameter.getIn() != null ) - parameterObject.setIn(parameter.getIn()); - if( parameter.getDescription() != null ) - parameterObject.setDescription(parameter.getDescription()); - if( parameter.getDeprecated() != null ) - parameterObject.setDeprecatedBoolean(parameter.getDeprecated()); - if( parameter.getStyle() != null ) - parameterObject.setStyle( parameter.getStyle() ); - if( parameter.getExplode() != null ) - parameterObject.setExplode( parameter.getExplode() ); - if( parameter.getAllowReserved() != null ) - parameterObject.setAllowReserved( parameter.getAllowReserved() ); - if( parameter.getSchema() != null ) - parameterObject.setSchemaObject(SchemaObject.parseSchema(parameter.getSchema())); - if( parameter.getExample() != null ) - parameterObject.setExample( parameter.getExample() ); - if( parameter.getExamples() != null ){ - for( String key : parameter.getExamples().keySet() ) - parameterObject.addExampleTuple(new ExampleTuple(key, ExampleObject.parseExample(parameter.getExample(key)))); - } - if( parameter.getContentMediaTypes() != null ){ - for( String key : parameter.getContentMediaTypes().keySet() ) - parameterObject.addContentTuple(new ContentTuple(key, MediaTypeObject.parseMediaType(parameter.getContentMediaType(key)))); - } - if( parameter.getRequired() != null ) - parameterObject.setRequired(parameter.getRequired()); - if( parameter.getExtensions() != null ){ - for( String key : parameter.getExtensions().keySet() ) - parameterObject.addExtension(new Extension(key, parameter.getExtensions().get(key))); - } - - return parameterObject; - } - /** - * @declaredat ASTNode:1 - */ - public ParameterObject() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[4]; - setChild(new Opt(), 0); - setChild(new JastAddList(), 1); - setChild(new JastAddList(), 2); - setChild(new JastAddList(), 3); - } - /** - * @declaredat ASTNode:17 - */ - @ASTNodeAnnotation.Constructor( - name = {"Name", "In", "Description", "Required", "DeprecatedBoolean", "AllowEmptyValue", "Style", "Explode", "AllowReserved", "SchemaObject", "Example", "ExampleTuple", "ContentTuple", "Ref", "Extension"}, - type = {"String", "String", "String", "Boolean", "Boolean", "Boolean", "String", "Boolean", "Boolean", "Opt<SchemaObject>", "Object", "JastAddList<ExampleTuple>", "JastAddList<ContentTuple>", "String", "JastAddList<Extension>"}, - kind = {"Token", "Token", "Token", "Token", "Token", "Token", "Token", "Token", "Token", "Opt", "Token", "List", "List", "Token", "List"} - ) - public ParameterObject(String p0, String p1, String p2, Boolean p3, Boolean p4, Boolean p5, String p6, Boolean p7, Boolean p8, Opt<SchemaObject> p9, Object p10, JastAddList<ExampleTuple> p11, JastAddList<ContentTuple> p12, String p13, JastAddList<Extension> p14) { - setName(p0); - setIn(p1); - setDescription(p2); - setRequired(p3); - setDeprecatedBoolean(p4); - setAllowEmptyValue(p5); - setStyle(p6); - setExplode(p7); - setAllowReserved(p8); - setChild(p9, 0); - setExample(p10); - setChild(p11, 1); - setChild(p12, 2); - setRef(p13); - setChild(p14, 3); - } - /** @apilevel low-level - * @declaredat ASTNode:40 - */ - protected int numChildren() { - return 4; - } - /** - * @apilevel internal - * @declaredat ASTNode:46 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:50 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:54 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:58 - */ - public ParameterObject clone() throws CloneNotSupportedException { - ParameterObject node = (ParameterObject) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:63 - */ - public ParameterObject copy() { - try { - ParameterObject node = (ParameterObject) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:82 - */ - @Deprecated - public ParameterObject fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:92 - */ - public ParameterObject treeCopyNoTransform() { - ParameterObject tree = (ParameterObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:112 - */ - public ParameterObject treeCopy() { - ParameterObject tree = (ParameterObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:126 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Name == ((ParameterObject) node).tokenString_Name) && (tokenString_In == ((ParameterObject) node).tokenString_In) && (tokenString_Description == ((ParameterObject) node).tokenString_Description) && (tokenBoolean_Required == ((ParameterObject) node).tokenBoolean_Required) && (tokenBoolean_DeprecatedBoolean == ((ParameterObject) node).tokenBoolean_DeprecatedBoolean) && (tokenBoolean_AllowEmptyValue == ((ParameterObject) node).tokenBoolean_AllowEmptyValue) && (tokenString_Style == ((ParameterObject) node).tokenString_Style) && (tokenBoolean_Explode == ((ParameterObject) node).tokenBoolean_Explode) && (tokenBoolean_AllowReserved == ((ParameterObject) node).tokenBoolean_AllowReserved) && (tokenObject_Example == ((ParameterObject) node).tokenObject_Example) && (tokenString_Ref == ((ParameterObject) node).tokenString_Ref); - } - /** - * Replaces the lexeme Name. - * @param value The new value for the lexeme Name. - * @apilevel high-level - */ - public void setName(String value) { - tokenString_Name = value; - } - /** @apilevel internal - */ - protected String tokenString_Name; - /** - * Retrieves the value for the lexeme Name. - * @return The value for the lexeme Name. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Name") - public String getName() { - return tokenString_Name != null ? tokenString_Name : ""; - } - /** - * Replaces the lexeme In. - * @param value The new value for the lexeme In. - * @apilevel high-level - */ - public void setIn(String value) { - tokenString_In = value; - } - /** @apilevel internal - */ - protected String tokenString_In; - /** - * Retrieves the value for the lexeme In. - * @return The value for the lexeme In. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="In") - public String getIn() { - return tokenString_In != null ? tokenString_In : ""; - } - /** - * Replaces the lexeme Description. - * @param value The new value for the lexeme Description. - * @apilevel high-level - */ - public void setDescription(String value) { - tokenString_Description = value; - } - /** @apilevel internal - */ - protected String tokenString_Description; - /** - * Retrieves the value for the lexeme Description. - * @return The value for the lexeme Description. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Description") - public String getDescription() { - return tokenString_Description != null ? tokenString_Description : ""; - } - /** - * Replaces the lexeme Required. - * @param value The new value for the lexeme Required. - * @apilevel high-level - */ - public void setRequired(Boolean value) { - tokenBoolean_Required = value; - } - /** @apilevel internal - */ - protected Boolean tokenBoolean_Required; - /** - * Retrieves the value for the lexeme Required. - * @return The value for the lexeme Required. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Required") - public Boolean getRequired() { - return tokenBoolean_Required; - } - /** - * Replaces the lexeme DeprecatedBoolean. - * @param value The new value for the lexeme DeprecatedBoolean. - * @apilevel high-level - */ - public void setDeprecatedBoolean(Boolean value) { - tokenBoolean_DeprecatedBoolean = value; - } - /** @apilevel internal - */ - protected Boolean tokenBoolean_DeprecatedBoolean; - /** - * Retrieves the value for the lexeme DeprecatedBoolean. - * @return The value for the lexeme DeprecatedBoolean. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="DeprecatedBoolean") - public Boolean getDeprecatedBoolean() { - return tokenBoolean_DeprecatedBoolean; - } - /** - * Replaces the lexeme AllowEmptyValue. - * @param value The new value for the lexeme AllowEmptyValue. - * @apilevel high-level - */ - public void setAllowEmptyValue(Boolean value) { - tokenBoolean_AllowEmptyValue = value; - } - /** @apilevel internal - */ - protected Boolean tokenBoolean_AllowEmptyValue; - /** - * Retrieves the value for the lexeme AllowEmptyValue. - * @return The value for the lexeme AllowEmptyValue. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="AllowEmptyValue") - public Boolean getAllowEmptyValue() { - return tokenBoolean_AllowEmptyValue; - } - /** - * Replaces the lexeme Style. - * @param value The new value for the lexeme Style. - * @apilevel high-level - */ - public void setStyle(String value) { - tokenString_Style = value; - } - /** @apilevel internal - */ - protected String tokenString_Style; - /** - * Retrieves the value for the lexeme Style. - * @return The value for the lexeme Style. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Style") - public String getStyle() { - return tokenString_Style != null ? tokenString_Style : ""; - } - /** - * Replaces the lexeme Explode. - * @param value The new value for the lexeme Explode. - * @apilevel high-level - */ - public void setExplode(Boolean value) { - tokenBoolean_Explode = value; - } - /** @apilevel internal - */ - protected Boolean tokenBoolean_Explode; - /** - * Retrieves the value for the lexeme Explode. - * @return The value for the lexeme Explode. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Explode") - public Boolean getExplode() { - return tokenBoolean_Explode; - } - /** - * Replaces the lexeme AllowReserved. - * @param value The new value for the lexeme AllowReserved. - * @apilevel high-level - */ - public void setAllowReserved(Boolean value) { - tokenBoolean_AllowReserved = value; - } - /** @apilevel internal - */ - protected Boolean tokenBoolean_AllowReserved; - /** - * Retrieves the value for the lexeme AllowReserved. - * @return The value for the lexeme AllowReserved. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="AllowReserved") - public Boolean getAllowReserved() { - return tokenBoolean_AllowReserved; - } - /** - * Replaces the optional node for the SchemaObject child. This is the <code>Opt</code> - * node containing the child SchemaObject, not the actual child! - * @param opt The new node to be used as the optional node for the SchemaObject child. - * @apilevel low-level - */ - public void setSchemaObjectOpt(Opt<SchemaObject> opt) { - setChild(opt, 0); - } - /** - * Replaces the (optional) SchemaObject child. - * @param node The new node to be used as the SchemaObject child. - * @apilevel high-level - */ - public void setSchemaObject(SchemaObject node) { - getSchemaObjectOpt().setChild(node, 0); - } - /** - * Check whether the optional SchemaObject child exists. - * @return {@code true} if the optional SchemaObject child exists, {@code false} if it does not. - * @apilevel high-level - */ - public boolean hasSchemaObject() { - return getSchemaObjectOpt().getNumChild() != 0; - } - /** - * Retrieves the (optional) SchemaObject child. - * @return The SchemaObject child, if it exists. Returns {@code null} otherwise. - * @apilevel low-level - */ - public SchemaObject getSchemaObject() { - return (SchemaObject) getSchemaObjectOpt().getChild(0); - } - /** - * Retrieves the optional node for the SchemaObject child. This is the <code>Opt</code> node containing the child SchemaObject, not the actual child! - * @return The optional node for child the SchemaObject child. - * @apilevel low-level - */ - @ASTNodeAnnotation.OptChild(name="SchemaObject") - public Opt<SchemaObject> getSchemaObjectOpt() { - return (Opt<SchemaObject>) getChild(0); - } - /** - * Retrieves the optional node for child SchemaObject. This is the <code>Opt</code> node containing the child SchemaObject, not the actual child! - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child SchemaObject. - * @apilevel low-level - */ - public Opt<SchemaObject> getSchemaObjectOptNoTransform() { - return (Opt<SchemaObject>) getChildNoTransform(0); - } - /** - * Replaces the lexeme Example. - * @param value The new value for the lexeme Example. - * @apilevel high-level - */ - public void setExample(Object value) { - tokenObject_Example = value; - } - /** @apilevel internal - */ - protected Object tokenObject_Example; - /** - * Retrieves the value for the lexeme Example. - * @return The value for the lexeme Example. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Example") - public Object getExample() { - return tokenObject_Example; - } - /** - * Replaces the ExampleTuple list. - * @param list The new list node to be used as the ExampleTuple list. - * @apilevel high-level - */ - public void setExampleTupleList(JastAddList<ExampleTuple> list) { - setChild(list, 1); - } - /** - * Retrieves the number of children in the ExampleTuple list. - * @return Number of children in the ExampleTuple list. - * @apilevel high-level - */ - public int getNumExampleTuple() { - return getExampleTupleList().getNumChild(); - } - /** - * Retrieves the number of children in the ExampleTuple list. - * Calling this method will not trigger rewrites. - * @return Number of children in the ExampleTuple list. - * @apilevel low-level - */ - public int getNumExampleTupleNoTransform() { - return getExampleTupleListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the ExampleTuple list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the ExampleTuple list. - * @apilevel high-level - */ - public ExampleTuple getExampleTuple(int i) { - return (ExampleTuple) getExampleTupleList().getChild(i); - } - /** - * Check whether the ExampleTuple list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasExampleTuple() { - return getExampleTupleList().getNumChild() != 0; - } - /** - * Append an element to the ExampleTuple list. - * @param node The element to append to the ExampleTuple list. - * @apilevel high-level - */ - public void addExampleTuple(ExampleTuple node) { - JastAddList<ExampleTuple> list = (parent == null) ? getExampleTupleListNoTransform() : getExampleTupleList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addExampleTupleNoTransform(ExampleTuple node) { - JastAddList<ExampleTuple> list = getExampleTupleListNoTransform(); - list.addChild(node); - } - /** - * Replaces the ExampleTuple list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setExampleTuple(ExampleTuple node, int i) { - JastAddList<ExampleTuple> list = getExampleTupleList(); - list.setChild(node, i); - } - /** - * Retrieves the ExampleTuple list. - * @return The node representing the ExampleTuple list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="ExampleTuple") - public JastAddList<ExampleTuple> getExampleTupleList() { - JastAddList<ExampleTuple> list = (JastAddList<ExampleTuple>) getChild(1); - return list; - } - /** - * Retrieves the ExampleTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ExampleTuple list. - * @apilevel low-level - */ - public JastAddList<ExampleTuple> getExampleTupleListNoTransform() { - return (JastAddList<ExampleTuple>) getChildNoTransform(1); - } - /** - * @return the element at index {@code i} in the ExampleTuple list without - * triggering rewrites. - */ - public ExampleTuple getExampleTupleNoTransform(int i) { - return (ExampleTuple) getExampleTupleListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the ExampleTuple list. - * @return The node representing the ExampleTuple list. - * @apilevel high-level - */ - public JastAddList<ExampleTuple> getExampleTuples() { - return getExampleTupleList(); - } - /** - * Retrieves the ExampleTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ExampleTuple list. - * @apilevel low-level - */ - public JastAddList<ExampleTuple> getExampleTuplesNoTransform() { - return getExampleTupleListNoTransform(); - } - /** - * Replaces the ContentTuple list. - * @param list The new list node to be used as the ContentTuple list. - * @apilevel high-level - */ - public void setContentTupleList(JastAddList<ContentTuple> list) { - setChild(list, 2); - } - /** - * Retrieves the number of children in the ContentTuple list. - * @return Number of children in the ContentTuple list. - * @apilevel high-level - */ - public int getNumContentTuple() { - return getContentTupleList().getNumChild(); - } - /** - * Retrieves the number of children in the ContentTuple list. - * Calling this method will not trigger rewrites. - * @return Number of children in the ContentTuple list. - * @apilevel low-level - */ - public int getNumContentTupleNoTransform() { - return getContentTupleListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the ContentTuple list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the ContentTuple list. - * @apilevel high-level - */ - public ContentTuple getContentTuple(int i) { - return (ContentTuple) getContentTupleList().getChild(i); - } - /** - * Check whether the ContentTuple list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasContentTuple() { - return getContentTupleList().getNumChild() != 0; - } - /** - * Append an element to the ContentTuple list. - * @param node The element to append to the ContentTuple list. - * @apilevel high-level - */ - public void addContentTuple(ContentTuple node) { - JastAddList<ContentTuple> list = (parent == null) ? getContentTupleListNoTransform() : getContentTupleList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addContentTupleNoTransform(ContentTuple node) { - JastAddList<ContentTuple> list = getContentTupleListNoTransform(); - list.addChild(node); - } - /** - * Replaces the ContentTuple list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setContentTuple(ContentTuple node, int i) { - JastAddList<ContentTuple> list = getContentTupleList(); - list.setChild(node, i); - } - /** - * Retrieves the ContentTuple list. - * @return The node representing the ContentTuple list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="ContentTuple") - public JastAddList<ContentTuple> getContentTupleList() { - JastAddList<ContentTuple> list = (JastAddList<ContentTuple>) getChild(2); - return list; - } - /** - * Retrieves the ContentTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ContentTuple list. - * @apilevel low-level - */ - public JastAddList<ContentTuple> getContentTupleListNoTransform() { - return (JastAddList<ContentTuple>) getChildNoTransform(2); - } - /** - * @return the element at index {@code i} in the ContentTuple list without - * triggering rewrites. - */ - public ContentTuple getContentTupleNoTransform(int i) { - return (ContentTuple) getContentTupleListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the ContentTuple list. - * @return The node representing the ContentTuple list. - * @apilevel high-level - */ - public JastAddList<ContentTuple> getContentTuples() { - return getContentTupleList(); - } - /** - * Retrieves the ContentTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ContentTuple list. - * @apilevel low-level - */ - public JastAddList<ContentTuple> getContentTuplesNoTransform() { - return getContentTupleListNoTransform(); - } - /** - * Replaces the lexeme Ref. - * @param value The new value for the lexeme Ref. - * @apilevel high-level - */ - public void setRef(String value) { - tokenString_Ref = value; - } - /** @apilevel internal - */ - protected String tokenString_Ref; - /** - * Retrieves the value for the lexeme Ref. - * @return The value for the lexeme Ref. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Ref") - public String getRef() { - return tokenString_Ref != null ? tokenString_Ref : ""; - } - /** - * Replaces the Extension list. - * @param list The new list node to be used as the Extension list. - * @apilevel high-level - */ - public void setExtensionList(JastAddList<Extension> list) { - setChild(list, 3); - } - /** - * Retrieves the number of children in the Extension list. - * @return Number of children in the Extension list. - * @apilevel high-level - */ - public int getNumExtension() { - return getExtensionList().getNumChild(); - } - /** - * Retrieves the number of children in the Extension list. - * Calling this method will not trigger rewrites. - * @return Number of children in the Extension list. - * @apilevel low-level - */ - public int getNumExtensionNoTransform() { - return getExtensionListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the Extension list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the Extension list. - * @apilevel high-level - */ - public Extension getExtension(int i) { - return (Extension) getExtensionList().getChild(i); - } - /** - * Check whether the Extension list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasExtension() { - return getExtensionList().getNumChild() != 0; - } - /** - * Append an element to the Extension list. - * @param node The element to append to the Extension list. - * @apilevel high-level - */ - public void addExtension(Extension node) { - JastAddList<Extension> list = (parent == null) ? getExtensionListNoTransform() : getExtensionList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addExtensionNoTransform(Extension node) { - JastAddList<Extension> list = getExtensionListNoTransform(); - list.addChild(node); - } - /** - * Replaces the Extension list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setExtension(Extension node, int i) { - JastAddList<Extension> list = getExtensionList(); - list.setChild(node, i); - } - /** - * Retrieves the Extension list. - * @return The node representing the Extension list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="Extension") - public JastAddList<Extension> getExtensionList() { - JastAddList<Extension> list = (JastAddList<Extension>) getChild(3); - return list; - } - /** - * Retrieves the Extension list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the Extension list. - * @apilevel low-level - */ - public JastAddList<Extension> getExtensionListNoTransform() { - return (JastAddList<Extension>) getChildNoTransform(3); - } - /** - * @return the element at index {@code i} in the Extension list without - * triggering rewrites. - */ - public Extension getExtensionNoTransform(int i) { - return (Extension) getExtensionListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the Extension list. - * @return The node representing the Extension list. - * @apilevel high-level - */ - public JastAddList<Extension> getExtensions() { - return getExtensionList(); - } - /** - * Retrieves the Extension list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the Extension list. - * @apilevel low-level - */ - public JastAddList<Extension> getExtensionsNoTransform() { - return getExtensionListNoTransform(); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ParameterTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ParameterTuple.java deleted file mode 100644 index e46c3dab37b3dd12ec41a7bdb39de3c66d3a51af..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ParameterTuple.java +++ /dev/null @@ -1,214 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:25 - * @astdecl ParameterTuple : ASTNode ::= <Key:String> ParameterObject; - * @production ParameterTuple : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component">{@link ParameterObject}</span>; - - */ -public class ParameterTuple extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public ParameterTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"Key", "ParameterObject"}, - type = {"String", "ParameterObject"}, - kind = {"Token", "Child"} - ) - public ParameterTuple(String p0, ParameterObject p1) { - setKey(p0); - setChild(p1, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:23 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:29 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:33 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:37 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:41 - */ - public ParameterTuple clone() throws CloneNotSupportedException { - ParameterTuple node = (ParameterTuple) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:46 - */ - public ParameterTuple copy() { - try { - ParameterTuple node = (ParameterTuple) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:65 - */ - @Deprecated - public ParameterTuple fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:75 - */ - public ParameterTuple treeCopyNoTransform() { - ParameterTuple tree = (ParameterTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:95 - */ - public ParameterTuple treeCopy() { - ParameterTuple tree = (ParameterTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:109 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Key == ((ParameterTuple) node).tokenString_Key); - } - /** - * Replaces the lexeme Key. - * @param value The new value for the lexeme Key. - * @apilevel high-level - */ - public void setKey(String value) { - tokenString_Key = value; - } - /** @apilevel internal - */ - protected String tokenString_Key; - /** - * Retrieves the value for the lexeme Key. - * @return The value for the lexeme Key. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Key") - public String getKey() { - return tokenString_Key != null ? tokenString_Key : ""; - } - /** - * Replaces the ParameterObject child. - * @param node The new node to replace the ParameterObject child. - * @apilevel high-level - */ - public void setParameterObject(ParameterObject node) { - setChild(node, 0); - } - /** - * Retrieves the ParameterObject child. - * @return The current node used as the ParameterObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="ParameterObject") - public ParameterObject getParameterObject() { - return (ParameterObject) getChild(0); - } - /** - * Retrieves the ParameterObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the ParameterObject child. - * @apilevel low-level - */ - public ParameterObject getParameterObjectNoTransform() { - return (ParameterObject) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/Password.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/Password.java deleted file mode 100644 index d351d574630805cf00cccaa7f7cba11780d4d26c..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/Password.java +++ /dev/null @@ -1,193 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:115 - * @astdecl Password : ASTNode ::= OAuthFlowObject; - * @production Password : {@link ASTNode} ::= <span class="component">{@link OAuthFlowObject}</span>; - - */ -public class Password extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public Password() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"OAuthFlowObject"}, - type = {"OAuthFlowObject"}, - kind = {"Child"} - ) - public Password(OAuthFlowObject p0) { - setChild(p0, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public Password clone() throws CloneNotSupportedException { - Password node = (Password) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public Password copy() { - try { - Password node = (Password) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public Password fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public Password treeCopyNoTransform() { - Password tree = (Password) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public Password treeCopy() { - Password tree = (Password) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node); - } - /** - * Replaces the OAuthFlowObject child. - * @param node The new node to replace the OAuthFlowObject child. - * @apilevel high-level - */ - public void setOAuthFlowObject(OAuthFlowObject node) { - setChild(node, 0); - } - /** - * Retrieves the OAuthFlowObject child. - * @return The current node used as the OAuthFlowObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="OAuthFlowObject") - public OAuthFlowObject getOAuthFlowObject() { - return (OAuthFlowObject) getChild(0); - } - /** - * Retrieves the OAuthFlowObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the OAuthFlowObject child. - * @apilevel low-level - */ - public OAuthFlowObject getOAuthFlowObjectNoTransform() { - return (OAuthFlowObject) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/Patch.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/Patch.java deleted file mode 100644 index a9db89fe82195dc862c529feff41e33f3eaa4b27..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/Patch.java +++ /dev/null @@ -1,193 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:45 - * @astdecl Patch : ASTNode ::= OperationObject; - * @production Patch : {@link ASTNode} ::= <span class="component">{@link OperationObject}</span>; - - */ -public class Patch extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public Patch() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"OperationObject"}, - type = {"OperationObject"}, - kind = {"Child"} - ) - public Patch(OperationObject p0) { - setChild(p0, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public Patch clone() throws CloneNotSupportedException { - Patch node = (Patch) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public Patch copy() { - try { - Patch node = (Patch) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public Patch fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public Patch treeCopyNoTransform() { - Patch tree = (Patch) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public Patch treeCopy() { - Patch tree = (Patch) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node); - } - /** - * Replaces the OperationObject child. - * @param node The new node to replace the OperationObject child. - * @apilevel high-level - */ - public void setOperationObject(OperationObject node) { - setChild(node, 0); - } - /** - * Retrieves the OperationObject child. - * @return The current node used as the OperationObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="OperationObject") - public OperationObject getOperationObject() { - return (OperationObject) getChild(0); - } - /** - * Retrieves the OperationObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the OperationObject child. - * @apilevel low-level - */ - public OperationObject getOperationObjectNoTransform() { - return (OperationObject) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/PathItem.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/PathItem.java deleted file mode 100644 index 2f95a885695b952e2216f08cf40c73bb195e6bed..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/PathItem.java +++ /dev/null @@ -1,1110 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:38 - * @astdecl PathItem : ASTNode ::= <Ref:String> <Summary:String> <Description:String> [Get] [Put] [Post] [Delete] [Options] [Head] [Patch] [Trace] ServerObject* ParameterObject* Extension*; - * @production PathItem : {@link ASTNode} ::= <span class="component"><Ref:String></span> <span class="component"><Summary:String></span> <span class="component"><Description:String></span> <span class="component">[{@link Get}]</span> <span class="component">[{@link Put}]</span> <span class="component">[{@link Post}]</span> <span class="component">[{@link Delete}]</span> <span class="component">[{@link Options}]</span> <span class="component">[{@link Head}]</span> <span class="component">[{@link Patch}]</span> <span class="component">[{@link Trace}]</span> <span class="component">{@link ServerObject}*</span> <span class="component">{@link ParameterObject}*</span> <span class="component">{@link Extension}*</span>; - - */ -public class PathItem extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:272 - */ - public static Path composePath (PathItem pathItem){ - Path path = new Path(); - - - if( !pathItem.getRef().isEmpty() ) - path.setRef(pathItem.getRef()); - if( !pathItem.getSummary().isEmpty()) - path.setSummary(pathItem.getSummary()); - if( !pathItem.getDescription().isEmpty() ) - path.setDescription(pathItem.getDescription()); - if( pathItem.hasGet() ) - path.setGet( OperationObject.composeOperation(pathItem.getGet().getOperationObject()) ); - if( pathItem.hasPut() ) - path.setPut( OperationObject.composeOperation(pathItem.getPut().getOperationObject()) ); - if( pathItem.hasPost() ) - path.setPost( OperationObject.composeOperation(pathItem.getPost().getOperationObject()) ); - if( pathItem.hasDelete() ) - path.setDelete( OperationObject.composeOperation(pathItem.getDelete().getOperationObject()) ); - if( pathItem.hasOptions() ) - path.setOptions( OperationObject.composeOperation(pathItem.getOptions().getOperationObject()) ); - if( pathItem.hasHead() ) - path.setHead( OperationObject.composeOperation(pathItem.getHead().getOperationObject()) ); - if( pathItem.hasPatch() ) - path.setPatch( OperationObject.composeOperation(pathItem.getPatch().getOperationObject()) ); - if( pathItem.getNumServerObject() != 0 ){ - for( ServerObject s : pathItem.getServerObjects() ) - path.addServer( ServerObject.composeServer(s) ); - } - if( pathItem.getNumParameterObject() != 0 ){ - for( ParameterObject p : pathItem.getParameterObjects() ) - path.addParameter( ParameterObject.composeParameter(p) ); - } - if( pathItem.getNumExtension() != 0 ){ - Map<String, Object> extensionMap = new HashMap<>(); - for( Extension e : pathItem.getExtensions() ) - extensionMap.put(e.getKey(), e.getValue()); - path.setExtensions(extensionMap); - } - - return path; - } - /** - * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:277 - */ - public static PathItem parsePath(Path path){ - PathItem pathItem = new PathItem(); - - - if( path.getRef() != null ) - pathItem.setRef(path.getRef()); - if( path.getSummary() != null ) - pathItem.setSummary(path.getSummary()); - if( path.getDescription() != null ) - pathItem.setDescription(path.getDescription()); - if( path.getGet() != null ){ - Get get = new Get(); - get.setOperationObject( OperationObject.parseOperation( path.getGet() ) ); - pathItem.setGet(get); - } - if( path.getPut() != null ){ - Put put = new Put(); - put.setOperationObject( OperationObject.parseOperation( path.getPut() ) ); - pathItem.setPut(put); - } - if( path.getPost() != null ){ - Post post = new Post(); - post.setOperationObject( OperationObject.parseOperation( path.getPost() ) ); - pathItem.setPost(post); - } - if( path.getDelete() != null ){ - Delete delete = new Delete(); - delete.setOperationObject( OperationObject.parseOperation( path.getDelete() ) ); - pathItem.setDelete(delete); - } - if( path.getOptions() != null ){ - Options options = new Options(); - options.setOperationObject( OperationObject.parseOperation( path.getOptions() ) ); - pathItem.setOptions(options); - } - if( path.getHead() != null ){ - Head head = new Head(); - head.setOperationObject( OperationObject.parseOperation( path.getHead() ) ); - pathItem.setHead(head); - } - if( path.getPatch() != null ){ - Patch patch = new Patch(); - patch.setOperationObject( OperationObject.parseOperation( path.getPatch() ) ); - pathItem.setPatch(patch); - } - if( path.getTrace() != null ){ - Trace trace = new Trace(); - trace.setOperationObject( OperationObject.parseOperation( path.getTrace() ) ); - pathItem.setTrace(trace); - } - if( path.getServers() != null ){ - for(Server s : path.getServers()) - pathItem.addServerObject( ServerObject.parseServer(s)); - } - if( path.getParameters() != null ){ - for(Parameter p : path.getParameters()){ - if( p.isRef() ) { - ParameterObject parameterObject = new ParameterObject(); - parameterObject.setRef(p.getRef()); - pathItem.addParameterObject(parameterObject); - } - else - pathItem.addParameterObject(ParameterObject.parseParameter(p)); - } - } - if( path.getExtensions() != null ){ - for( String key : path.getExtensions().keySet() ) - pathItem.addExtension(new Extension(key, path.getExtensions().get(key))); - } - - return pathItem; - } - /** - * @declaredat ASTNode:1 - */ - public PathItem() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[11]; - setChild(new Opt(), 0); - setChild(new Opt(), 1); - setChild(new Opt(), 2); - setChild(new Opt(), 3); - setChild(new Opt(), 4); - setChild(new Opt(), 5); - setChild(new Opt(), 6); - setChild(new Opt(), 7); - setChild(new JastAddList(), 8); - setChild(new JastAddList(), 9); - setChild(new JastAddList(), 10); - } - /** - * @declaredat ASTNode:24 - */ - @ASTNodeAnnotation.Constructor( - name = {"Ref", "Summary", "Description", "Get", "Put", "Post", "Delete", "Options", "Head", "Patch", "Trace", "ServerObject", "ParameterObject", "Extension"}, - type = {"String", "String", "String", "Opt<Get>", "Opt<Put>", "Opt<Post>", "Opt<Delete>", "Opt<Options>", "Opt<Head>", "Opt<Patch>", "Opt<Trace>", "JastAddList<ServerObject>", "JastAddList<ParameterObject>", "JastAddList<Extension>"}, - kind = {"Token", "Token", "Token", "Opt", "Opt", "Opt", "Opt", "Opt", "Opt", "Opt", "Opt", "List", "List", "List"} - ) - public PathItem(String p0, String p1, String p2, Opt<Get> p3, Opt<Put> p4, Opt<Post> p5, Opt<Delete> p6, Opt<Options> p7, Opt<Head> p8, Opt<Patch> p9, Opt<Trace> p10, JastAddList<ServerObject> p11, JastAddList<ParameterObject> p12, JastAddList<Extension> p13) { - setRef(p0); - setSummary(p1); - setDescription(p2); - setChild(p3, 0); - setChild(p4, 1); - setChild(p5, 2); - setChild(p6, 3); - setChild(p7, 4); - setChild(p8, 5); - setChild(p9, 6); - setChild(p10, 7); - setChild(p11, 8); - setChild(p12, 9); - setChild(p13, 10); - } - /** @apilevel low-level - * @declaredat ASTNode:46 - */ - protected int numChildren() { - return 11; - } - /** - * @apilevel internal - * @declaredat ASTNode:52 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:56 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:60 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:64 - */ - public PathItem clone() throws CloneNotSupportedException { - PathItem node = (PathItem) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:69 - */ - public PathItem copy() { - try { - PathItem node = (PathItem) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:88 - */ - @Deprecated - public PathItem fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:98 - */ - public PathItem treeCopyNoTransform() { - PathItem tree = (PathItem) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:118 - */ - public PathItem treeCopy() { - PathItem tree = (PathItem) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:132 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Ref == ((PathItem) node).tokenString_Ref) && (tokenString_Summary == ((PathItem) node).tokenString_Summary) && (tokenString_Description == ((PathItem) node).tokenString_Description); - } - /** - * Replaces the lexeme Ref. - * @param value The new value for the lexeme Ref. - * @apilevel high-level - */ - public void setRef(String value) { - tokenString_Ref = value; - } - /** @apilevel internal - */ - protected String tokenString_Ref; - /** - * Retrieves the value for the lexeme Ref. - * @return The value for the lexeme Ref. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Ref") - public String getRef() { - return tokenString_Ref != null ? tokenString_Ref : ""; - } - /** - * Replaces the lexeme Summary. - * @param value The new value for the lexeme Summary. - * @apilevel high-level - */ - public void setSummary(String value) { - tokenString_Summary = value; - } - /** @apilevel internal - */ - protected String tokenString_Summary; - /** - * Retrieves the value for the lexeme Summary. - * @return The value for the lexeme Summary. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Summary") - public String getSummary() { - return tokenString_Summary != null ? tokenString_Summary : ""; - } - /** - * Replaces the lexeme Description. - * @param value The new value for the lexeme Description. - * @apilevel high-level - */ - public void setDescription(String value) { - tokenString_Description = value; - } - /** @apilevel internal - */ - protected String tokenString_Description; - /** - * Retrieves the value for the lexeme Description. - * @return The value for the lexeme Description. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Description") - public String getDescription() { - return tokenString_Description != null ? tokenString_Description : ""; - } - /** - * Replaces the optional node for the Get child. This is the <code>Opt</code> - * node containing the child Get, not the actual child! - * @param opt The new node to be used as the optional node for the Get child. - * @apilevel low-level - */ - public void setGetOpt(Opt<Get> opt) { - setChild(opt, 0); - } - /** - * Replaces the (optional) Get child. - * @param node The new node to be used as the Get child. - * @apilevel high-level - */ - public void setGet(Get node) { - getGetOpt().setChild(node, 0); - } - /** - * Check whether the optional Get child exists. - * @return {@code true} if the optional Get child exists, {@code false} if it does not. - * @apilevel high-level - */ - public boolean hasGet() { - return getGetOpt().getNumChild() != 0; - } - /** - * Retrieves the (optional) Get child. - * @return The Get child, if it exists. Returns {@code null} otherwise. - * @apilevel low-level - */ - public Get getGet() { - return (Get) getGetOpt().getChild(0); - } - /** - * Retrieves the optional node for the Get child. This is the <code>Opt</code> node containing the child Get, not the actual child! - * @return The optional node for child the Get child. - * @apilevel low-level - */ - @ASTNodeAnnotation.OptChild(name="Get") - public Opt<Get> getGetOpt() { - return (Opt<Get>) getChild(0); - } - /** - * Retrieves the optional node for child Get. This is the <code>Opt</code> node containing the child Get, not the actual child! - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child Get. - * @apilevel low-level - */ - public Opt<Get> getGetOptNoTransform() { - return (Opt<Get>) getChildNoTransform(0); - } - /** - * Replaces the optional node for the Put child. This is the <code>Opt</code> - * node containing the child Put, not the actual child! - * @param opt The new node to be used as the optional node for the Put child. - * @apilevel low-level - */ - public void setPutOpt(Opt<Put> opt) { - setChild(opt, 1); - } - /** - * Replaces the (optional) Put child. - * @param node The new node to be used as the Put child. - * @apilevel high-level - */ - public void setPut(Put node) { - getPutOpt().setChild(node, 0); - } - /** - * Check whether the optional Put child exists. - * @return {@code true} if the optional Put child exists, {@code false} if it does not. - * @apilevel high-level - */ - public boolean hasPut() { - return getPutOpt().getNumChild() != 0; - } - /** - * Retrieves the (optional) Put child. - * @return The Put child, if it exists. Returns {@code null} otherwise. - * @apilevel low-level - */ - public Put getPut() { - return (Put) getPutOpt().getChild(0); - } - /** - * Retrieves the optional node for the Put child. This is the <code>Opt</code> node containing the child Put, not the actual child! - * @return The optional node for child the Put child. - * @apilevel low-level - */ - @ASTNodeAnnotation.OptChild(name="Put") - public Opt<Put> getPutOpt() { - return (Opt<Put>) getChild(1); - } - /** - * Retrieves the optional node for child Put. This is the <code>Opt</code> node containing the child Put, not the actual child! - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child Put. - * @apilevel low-level - */ - public Opt<Put> getPutOptNoTransform() { - return (Opt<Put>) getChildNoTransform(1); - } - /** - * Replaces the optional node for the Post child. This is the <code>Opt</code> - * node containing the child Post, not the actual child! - * @param opt The new node to be used as the optional node for the Post child. - * @apilevel low-level - */ - public void setPostOpt(Opt<Post> opt) { - setChild(opt, 2); - } - /** - * Replaces the (optional) Post child. - * @param node The new node to be used as the Post child. - * @apilevel high-level - */ - public void setPost(Post node) { - getPostOpt().setChild(node, 0); - } - /** - * Check whether the optional Post child exists. - * @return {@code true} if the optional Post child exists, {@code false} if it does not. - * @apilevel high-level - */ - public boolean hasPost() { - return getPostOpt().getNumChild() != 0; - } - /** - * Retrieves the (optional) Post child. - * @return The Post child, if it exists. Returns {@code null} otherwise. - * @apilevel low-level - */ - public Post getPost() { - return (Post) getPostOpt().getChild(0); - } - /** - * Retrieves the optional node for the Post child. This is the <code>Opt</code> node containing the child Post, not the actual child! - * @return The optional node for child the Post child. - * @apilevel low-level - */ - @ASTNodeAnnotation.OptChild(name="Post") - public Opt<Post> getPostOpt() { - return (Opt<Post>) getChild(2); - } - /** - * Retrieves the optional node for child Post. This is the <code>Opt</code> node containing the child Post, not the actual child! - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child Post. - * @apilevel low-level - */ - public Opt<Post> getPostOptNoTransform() { - return (Opt<Post>) getChildNoTransform(2); - } - /** - * Replaces the optional node for the Delete child. This is the <code>Opt</code> - * node containing the child Delete, not the actual child! - * @param opt The new node to be used as the optional node for the Delete child. - * @apilevel low-level - */ - public void setDeleteOpt(Opt<Delete> opt) { - setChild(opt, 3); - } - /** - * Replaces the (optional) Delete child. - * @param node The new node to be used as the Delete child. - * @apilevel high-level - */ - public void setDelete(Delete node) { - getDeleteOpt().setChild(node, 0); - } - /** - * Check whether the optional Delete child exists. - * @return {@code true} if the optional Delete child exists, {@code false} if it does not. - * @apilevel high-level - */ - public boolean hasDelete() { - return getDeleteOpt().getNumChild() != 0; - } - /** - * Retrieves the (optional) Delete child. - * @return The Delete child, if it exists. Returns {@code null} otherwise. - * @apilevel low-level - */ - public Delete getDelete() { - return (Delete) getDeleteOpt().getChild(0); - } - /** - * Retrieves the optional node for the Delete child. This is the <code>Opt</code> node containing the child Delete, not the actual child! - * @return The optional node for child the Delete child. - * @apilevel low-level - */ - @ASTNodeAnnotation.OptChild(name="Delete") - public Opt<Delete> getDeleteOpt() { - return (Opt<Delete>) getChild(3); - } - /** - * Retrieves the optional node for child Delete. This is the <code>Opt</code> node containing the child Delete, not the actual child! - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child Delete. - * @apilevel low-level - */ - public Opt<Delete> getDeleteOptNoTransform() { - return (Opt<Delete>) getChildNoTransform(3); - } - /** - * Replaces the optional node for the Options child. This is the <code>Opt</code> - * node containing the child Options, not the actual child! - * @param opt The new node to be used as the optional node for the Options child. - * @apilevel low-level - */ - public void setOptionsOpt(Opt<Options> opt) { - setChild(opt, 4); - } - /** - * Replaces the (optional) Options child. - * @param node The new node to be used as the Options child. - * @apilevel high-level - */ - public void setOptions(Options node) { - getOptionsOpt().setChild(node, 0); - } - /** - * Check whether the optional Options child exists. - * @return {@code true} if the optional Options child exists, {@code false} if it does not. - * @apilevel high-level - */ - public boolean hasOptions() { - return getOptionsOpt().getNumChild() != 0; - } - /** - * Retrieves the (optional) Options child. - * @return The Options child, if it exists. Returns {@code null} otherwise. - * @apilevel low-level - */ - public Options getOptions() { - return (Options) getOptionsOpt().getChild(0); - } - /** - * Retrieves the optional node for the Options child. This is the <code>Opt</code> node containing the child Options, not the actual child! - * @return The optional node for child the Options child. - * @apilevel low-level - */ - @ASTNodeAnnotation.OptChild(name="Options") - public Opt<Options> getOptionsOpt() { - return (Opt<Options>) getChild(4); - } - /** - * Retrieves the optional node for child Options. This is the <code>Opt</code> node containing the child Options, not the actual child! - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child Options. - * @apilevel low-level - */ - public Opt<Options> getOptionsOptNoTransform() { - return (Opt<Options>) getChildNoTransform(4); - } - /** - * Replaces the optional node for the Head child. This is the <code>Opt</code> - * node containing the child Head, not the actual child! - * @param opt The new node to be used as the optional node for the Head child. - * @apilevel low-level - */ - public void setHeadOpt(Opt<Head> opt) { - setChild(opt, 5); - } - /** - * Replaces the (optional) Head child. - * @param node The new node to be used as the Head child. - * @apilevel high-level - */ - public void setHead(Head node) { - getHeadOpt().setChild(node, 0); - } - /** - * Check whether the optional Head child exists. - * @return {@code true} if the optional Head child exists, {@code false} if it does not. - * @apilevel high-level - */ - public boolean hasHead() { - return getHeadOpt().getNumChild() != 0; - } - /** - * Retrieves the (optional) Head child. - * @return The Head child, if it exists. Returns {@code null} otherwise. - * @apilevel low-level - */ - public Head getHead() { - return (Head) getHeadOpt().getChild(0); - } - /** - * Retrieves the optional node for the Head child. This is the <code>Opt</code> node containing the child Head, not the actual child! - * @return The optional node for child the Head child. - * @apilevel low-level - */ - @ASTNodeAnnotation.OptChild(name="Head") - public Opt<Head> getHeadOpt() { - return (Opt<Head>) getChild(5); - } - /** - * Retrieves the optional node for child Head. This is the <code>Opt</code> node containing the child Head, not the actual child! - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child Head. - * @apilevel low-level - */ - public Opt<Head> getHeadOptNoTransform() { - return (Opt<Head>) getChildNoTransform(5); - } - /** - * Replaces the optional node for the Patch child. This is the <code>Opt</code> - * node containing the child Patch, not the actual child! - * @param opt The new node to be used as the optional node for the Patch child. - * @apilevel low-level - */ - public void setPatchOpt(Opt<Patch> opt) { - setChild(opt, 6); - } - /** - * Replaces the (optional) Patch child. - * @param node The new node to be used as the Patch child. - * @apilevel high-level - */ - public void setPatch(Patch node) { - getPatchOpt().setChild(node, 0); - } - /** - * Check whether the optional Patch child exists. - * @return {@code true} if the optional Patch child exists, {@code false} if it does not. - * @apilevel high-level - */ - public boolean hasPatch() { - return getPatchOpt().getNumChild() != 0; - } - /** - * Retrieves the (optional) Patch child. - * @return The Patch child, if it exists. Returns {@code null} otherwise. - * @apilevel low-level - */ - public Patch getPatch() { - return (Patch) getPatchOpt().getChild(0); - } - /** - * Retrieves the optional node for the Patch child. This is the <code>Opt</code> node containing the child Patch, not the actual child! - * @return The optional node for child the Patch child. - * @apilevel low-level - */ - @ASTNodeAnnotation.OptChild(name="Patch") - public Opt<Patch> getPatchOpt() { - return (Opt<Patch>) getChild(6); - } - /** - * Retrieves the optional node for child Patch. This is the <code>Opt</code> node containing the child Patch, not the actual child! - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child Patch. - * @apilevel low-level - */ - public Opt<Patch> getPatchOptNoTransform() { - return (Opt<Patch>) getChildNoTransform(6); - } - /** - * Replaces the optional node for the Trace child. This is the <code>Opt</code> - * node containing the child Trace, not the actual child! - * @param opt The new node to be used as the optional node for the Trace child. - * @apilevel low-level - */ - public void setTraceOpt(Opt<Trace> opt) { - setChild(opt, 7); - } - /** - * Replaces the (optional) Trace child. - * @param node The new node to be used as the Trace child. - * @apilevel high-level - */ - public void setTrace(Trace node) { - getTraceOpt().setChild(node, 0); - } - /** - * Check whether the optional Trace child exists. - * @return {@code true} if the optional Trace child exists, {@code false} if it does not. - * @apilevel high-level - */ - public boolean hasTrace() { - return getTraceOpt().getNumChild() != 0; - } - /** - * Retrieves the (optional) Trace child. - * @return The Trace child, if it exists. Returns {@code null} otherwise. - * @apilevel low-level - */ - public Trace getTrace() { - return (Trace) getTraceOpt().getChild(0); - } - /** - * Retrieves the optional node for the Trace child. This is the <code>Opt</code> node containing the child Trace, not the actual child! - * @return The optional node for child the Trace child. - * @apilevel low-level - */ - @ASTNodeAnnotation.OptChild(name="Trace") - public Opt<Trace> getTraceOpt() { - return (Opt<Trace>) getChild(7); - } - /** - * Retrieves the optional node for child Trace. This is the <code>Opt</code> node containing the child Trace, not the actual child! - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child Trace. - * @apilevel low-level - */ - public Opt<Trace> getTraceOptNoTransform() { - return (Opt<Trace>) getChildNoTransform(7); - } - /** - * Replaces the ServerObject list. - * @param list The new list node to be used as the ServerObject list. - * @apilevel high-level - */ - public void setServerObjectList(JastAddList<ServerObject> list) { - setChild(list, 8); - } - /** - * Retrieves the number of children in the ServerObject list. - * @return Number of children in the ServerObject list. - * @apilevel high-level - */ - public int getNumServerObject() { - return getServerObjectList().getNumChild(); - } - /** - * Retrieves the number of children in the ServerObject list. - * Calling this method will not trigger rewrites. - * @return Number of children in the ServerObject list. - * @apilevel low-level - */ - public int getNumServerObjectNoTransform() { - return getServerObjectListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the ServerObject list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the ServerObject list. - * @apilevel high-level - */ - public ServerObject getServerObject(int i) { - return (ServerObject) getServerObjectList().getChild(i); - } - /** - * Check whether the ServerObject list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasServerObject() { - return getServerObjectList().getNumChild() != 0; - } - /** - * Append an element to the ServerObject list. - * @param node The element to append to the ServerObject list. - * @apilevel high-level - */ - public void addServerObject(ServerObject node) { - JastAddList<ServerObject> list = (parent == null) ? getServerObjectListNoTransform() : getServerObjectList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addServerObjectNoTransform(ServerObject node) { - JastAddList<ServerObject> list = getServerObjectListNoTransform(); - list.addChild(node); - } - /** - * Replaces the ServerObject list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setServerObject(ServerObject node, int i) { - JastAddList<ServerObject> list = getServerObjectList(); - list.setChild(node, i); - } - /** - * Retrieves the ServerObject list. - * @return The node representing the ServerObject list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="ServerObject") - public JastAddList<ServerObject> getServerObjectList() { - JastAddList<ServerObject> list = (JastAddList<ServerObject>) getChild(8); - return list; - } - /** - * Retrieves the ServerObject list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ServerObject list. - * @apilevel low-level - */ - public JastAddList<ServerObject> getServerObjectListNoTransform() { - return (JastAddList<ServerObject>) getChildNoTransform(8); - } - /** - * @return the element at index {@code i} in the ServerObject list without - * triggering rewrites. - */ - public ServerObject getServerObjectNoTransform(int i) { - return (ServerObject) getServerObjectListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the ServerObject list. - * @return The node representing the ServerObject list. - * @apilevel high-level - */ - public JastAddList<ServerObject> getServerObjects() { - return getServerObjectList(); - } - /** - * Retrieves the ServerObject list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ServerObject list. - * @apilevel low-level - */ - public JastAddList<ServerObject> getServerObjectsNoTransform() { - return getServerObjectListNoTransform(); - } - /** - * Replaces the ParameterObject list. - * @param list The new list node to be used as the ParameterObject list. - * @apilevel high-level - */ - public void setParameterObjectList(JastAddList<ParameterObject> list) { - setChild(list, 9); - } - /** - * Retrieves the number of children in the ParameterObject list. - * @return Number of children in the ParameterObject list. - * @apilevel high-level - */ - public int getNumParameterObject() { - return getParameterObjectList().getNumChild(); - } - /** - * Retrieves the number of children in the ParameterObject list. - * Calling this method will not trigger rewrites. - * @return Number of children in the ParameterObject list. - * @apilevel low-level - */ - public int getNumParameterObjectNoTransform() { - return getParameterObjectListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the ParameterObject list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the ParameterObject list. - * @apilevel high-level - */ - public ParameterObject getParameterObject(int i) { - return (ParameterObject) getParameterObjectList().getChild(i); - } - /** - * Check whether the ParameterObject list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasParameterObject() { - return getParameterObjectList().getNumChild() != 0; - } - /** - * Append an element to the ParameterObject list. - * @param node The element to append to the ParameterObject list. - * @apilevel high-level - */ - public void addParameterObject(ParameterObject node) { - JastAddList<ParameterObject> list = (parent == null) ? getParameterObjectListNoTransform() : getParameterObjectList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addParameterObjectNoTransform(ParameterObject node) { - JastAddList<ParameterObject> list = getParameterObjectListNoTransform(); - list.addChild(node); - } - /** - * Replaces the ParameterObject list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setParameterObject(ParameterObject node, int i) { - JastAddList<ParameterObject> list = getParameterObjectList(); - list.setChild(node, i); - } - /** - * Retrieves the ParameterObject list. - * @return The node representing the ParameterObject list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="ParameterObject") - public JastAddList<ParameterObject> getParameterObjectList() { - JastAddList<ParameterObject> list = (JastAddList<ParameterObject>) getChild(9); - return list; - } - /** - * Retrieves the ParameterObject list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ParameterObject list. - * @apilevel low-level - */ - public JastAddList<ParameterObject> getParameterObjectListNoTransform() { - return (JastAddList<ParameterObject>) getChildNoTransform(9); - } - /** - * @return the element at index {@code i} in the ParameterObject list without - * triggering rewrites. - */ - public ParameterObject getParameterObjectNoTransform(int i) { - return (ParameterObject) getParameterObjectListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the ParameterObject list. - * @return The node representing the ParameterObject list. - * @apilevel high-level - */ - public JastAddList<ParameterObject> getParameterObjects() { - return getParameterObjectList(); - } - /** - * Retrieves the ParameterObject list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ParameterObject list. - * @apilevel low-level - */ - public JastAddList<ParameterObject> getParameterObjectsNoTransform() { - return getParameterObjectListNoTransform(); - } - /** - * Replaces the Extension list. - * @param list The new list node to be used as the Extension list. - * @apilevel high-level - */ - public void setExtensionList(JastAddList<Extension> list) { - setChild(list, 10); - } - /** - * Retrieves the number of children in the Extension list. - * @return Number of children in the Extension list. - * @apilevel high-level - */ - public int getNumExtension() { - return getExtensionList().getNumChild(); - } - /** - * Retrieves the number of children in the Extension list. - * Calling this method will not trigger rewrites. - * @return Number of children in the Extension list. - * @apilevel low-level - */ - public int getNumExtensionNoTransform() { - return getExtensionListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the Extension list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the Extension list. - * @apilevel high-level - */ - public Extension getExtension(int i) { - return (Extension) getExtensionList().getChild(i); - } - /** - * Check whether the Extension list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasExtension() { - return getExtensionList().getNumChild() != 0; - } - /** - * Append an element to the Extension list. - * @param node The element to append to the Extension list. - * @apilevel high-level - */ - public void addExtension(Extension node) { - JastAddList<Extension> list = (parent == null) ? getExtensionListNoTransform() : getExtensionList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addExtensionNoTransform(Extension node) { - JastAddList<Extension> list = getExtensionListNoTransform(); - list.addChild(node); - } - /** - * Replaces the Extension list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setExtension(Extension node, int i) { - JastAddList<Extension> list = getExtensionList(); - list.setChild(node, i); - } - /** - * Retrieves the Extension list. - * @return The node representing the Extension list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="Extension") - public JastAddList<Extension> getExtensionList() { - JastAddList<Extension> list = (JastAddList<Extension>) getChild(10); - return list; - } - /** - * Retrieves the Extension list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the Extension list. - * @apilevel low-level - */ - public JastAddList<Extension> getExtensionListNoTransform() { - return (JastAddList<Extension>) getChildNoTransform(10); - } - /** - * @return the element at index {@code i} in the Extension list without - * triggering rewrites. - */ - public Extension getExtensionNoTransform(int i) { - return (Extension) getExtensionListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the Extension list. - * @return The node representing the Extension list. - * @apilevel high-level - */ - public JastAddList<Extension> getExtensions() { - return getExtensionList(); - } - /** - * Retrieves the Extension list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the Extension list. - * @apilevel low-level - */ - public JastAddList<Extension> getExtensionsNoTransform() { - return getExtensionListNoTransform(); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/PathsObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/PathsObject.java deleted file mode 100644 index 3a7c8b305ea8e87cf446b0b8b7815c9d7f25f164..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/PathsObject.java +++ /dev/null @@ -1,237 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:35 - * @astdecl PathsObject : ASTNode ::= <Ref:String> PathItem; - * @production PathsObject : {@link ASTNode} ::= <span class="component"><Ref:String></span> <span class="component">{@link PathItem}</span>; - - */ -public class PathsObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect RandomRequestGenerator - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\RandomRequestGenerator.jadd:20 - */ - public void sendRandomRequests(String baseUrl) throws Exception { - if( this.getPathItem().hasGet() ){ - IntStream.range(0, 1).forEach( i -> { - try { - this.getPathItem().getGet().getOperationObject().sendRandomGET(baseUrl+this.getRef()); - } catch (Exception e) { - e.printStackTrace(); - } - }); - } - if( this.getPathItem().hasPost() ){ - IntStream.range(0, 1).forEach( i -> { - try { - this.getPathItem().getPost().getOperationObject().sendRandomPOST(baseUrl+this.getRef()); - } catch (Exception e) { - e.printStackTrace(); - } - });} - } - /** - * @declaredat ASTNode:1 - */ - public PathsObject() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"Ref", "PathItem"}, - type = {"String", "PathItem"}, - kind = {"Token", "Child"} - ) - public PathsObject(String p0, PathItem p1) { - setRef(p0); - setChild(p1, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:23 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:29 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:33 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:37 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:41 - */ - public PathsObject clone() throws CloneNotSupportedException { - PathsObject node = (PathsObject) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:46 - */ - public PathsObject copy() { - try { - PathsObject node = (PathsObject) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:65 - */ - @Deprecated - public PathsObject fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:75 - */ - public PathsObject treeCopyNoTransform() { - PathsObject tree = (PathsObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:95 - */ - public PathsObject treeCopy() { - PathsObject tree = (PathsObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:109 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Ref == ((PathsObject) node).tokenString_Ref); - } - /** - * Replaces the lexeme Ref. - * @param value The new value for the lexeme Ref. - * @apilevel high-level - */ - public void setRef(String value) { - tokenString_Ref = value; - } - /** @apilevel internal - */ - protected String tokenString_Ref; - /** - * Retrieves the value for the lexeme Ref. - * @return The value for the lexeme Ref. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Ref") - public String getRef() { - return tokenString_Ref != null ? tokenString_Ref : ""; - } - /** - * Replaces the PathItem child. - * @param node The new node to replace the PathItem child. - * @apilevel high-level - */ - public void setPathItem(PathItem node) { - setChild(node, 0); - } - /** - * Retrieves the PathItem child. - * @return The current node used as the PathItem child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="PathItem") - public PathItem getPathItem() { - return (PathItem) getChild(0); - } - /** - * Retrieves the PathItem child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the PathItem child. - * @apilevel low-level - */ - public PathItem getPathItemNoTransform() { - return (PathItem) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/Post.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/Post.java deleted file mode 100644 index 0542b2ece0709a258eb981cba215ab4a9346bbf4..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/Post.java +++ /dev/null @@ -1,193 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:41 - * @astdecl Post : ASTNode ::= OperationObject; - * @production Post : {@link ASTNode} ::= <span class="component">{@link OperationObject}</span>; - - */ -public class Post extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public Post() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"OperationObject"}, - type = {"OperationObject"}, - kind = {"Child"} - ) - public Post(OperationObject p0) { - setChild(p0, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public Post clone() throws CloneNotSupportedException { - Post node = (Post) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public Post copy() { - try { - Post node = (Post) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public Post fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public Post treeCopyNoTransform() { - Post tree = (Post) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public Post treeCopy() { - Post tree = (Post) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node); - } - /** - * Replaces the OperationObject child. - * @param node The new node to replace the OperationObject child. - * @apilevel high-level - */ - public void setOperationObject(OperationObject node) { - setChild(node, 0); - } - /** - * Retrieves the OperationObject child. - * @return The current node used as the OperationObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="OperationObject") - public OperationObject getOperationObject() { - return (OperationObject) getChild(0); - } - /** - * Retrieves the OperationObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the OperationObject child. - * @apilevel low-level - */ - public OperationObject getOperationObjectNoTransform() { - return (OperationObject) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/PropertyItem.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/PropertyItem.java deleted file mode 100644 index c84587fe80c15965b72db0d07799b25618593864..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/PropertyItem.java +++ /dev/null @@ -1,214 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:96 - * @astdecl PropertyItem : ASTNode ::= <Name:String> SchemaObject; - * @production PropertyItem : {@link ASTNode} ::= <span class="component"><Name:String></span> <span class="component">{@link SchemaObject}</span>; - - */ -public class PropertyItem extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public PropertyItem() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"Name", "SchemaObject"}, - type = {"String", "SchemaObject"}, - kind = {"Token", "Child"} - ) - public PropertyItem(String p0, SchemaObject p1) { - setName(p0); - setChild(p1, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:23 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:29 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:33 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:37 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:41 - */ - public PropertyItem clone() throws CloneNotSupportedException { - PropertyItem node = (PropertyItem) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:46 - */ - public PropertyItem copy() { - try { - PropertyItem node = (PropertyItem) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:65 - */ - @Deprecated - public PropertyItem fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:75 - */ - public PropertyItem treeCopyNoTransform() { - PropertyItem tree = (PropertyItem) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:95 - */ - public PropertyItem treeCopy() { - PropertyItem tree = (PropertyItem) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:109 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Name == ((PropertyItem) node).tokenString_Name); - } - /** - * Replaces the lexeme Name. - * @param value The new value for the lexeme Name. - * @apilevel high-level - */ - public void setName(String value) { - tokenString_Name = value; - } - /** @apilevel internal - */ - protected String tokenString_Name; - /** - * Retrieves the value for the lexeme Name. - * @return The value for the lexeme Name. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Name") - public String getName() { - return tokenString_Name != null ? tokenString_Name : ""; - } - /** - * Replaces the SchemaObject child. - * @param node The new node to replace the SchemaObject child. - * @apilevel high-level - */ - public void setSchemaObject(SchemaObject node) { - setChild(node, 0); - } - /** - * Retrieves the SchemaObject child. - * @return The current node used as the SchemaObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="SchemaObject") - public SchemaObject getSchemaObject() { - return (SchemaObject) getChild(0); - } - /** - * Retrieves the SchemaObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the SchemaObject child. - * @apilevel low-level - */ - public SchemaObject getSchemaObjectNoTransform() { - return (SchemaObject) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/Put.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/Put.java deleted file mode 100644 index 946dd8c47f6b25db5f197328e178d17ccfd00b03..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/Put.java +++ /dev/null @@ -1,193 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:40 - * @astdecl Put : ASTNode ::= OperationObject; - * @production Put : {@link ASTNode} ::= <span class="component">{@link OperationObject}</span>; - - */ -public class Put extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public Put() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"OperationObject"}, - type = {"OperationObject"}, - kind = {"Child"} - ) - public Put(OperationObject p0) { - setChild(p0, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public Put clone() throws CloneNotSupportedException { - Put node = (Put) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public Put copy() { - try { - Put node = (Put) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public Put fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public Put treeCopyNoTransform() { - Put tree = (Put) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public Put treeCopy() { - Put tree = (Put) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node); - } - /** - * Replaces the OperationObject child. - * @param node The new node to replace the OperationObject child. - * @apilevel high-level - */ - public void setOperationObject(OperationObject node) { - setChild(node, 0); - } - /** - * Retrieves the OperationObject child. - * @return The current node used as the OperationObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="OperationObject") - public OperationObject getOperationObject() { - return (OperationObject) getChild(0); - } - /** - * Retrieves the OperationObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the OperationObject child. - * @apilevel low-level - */ - public OperationObject getOperationObjectNoTransform() { - return (OperationObject) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/RequestBodyObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/RequestBodyObject.java deleted file mode 100644 index 151f79c5fc6152338254c90dcb7302a7a71fdbb6..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/RequestBodyObject.java +++ /dev/null @@ -1,383 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:60 - * @astdecl RequestBodyObject : ASTNode ::= <Description:String> ContentTuple* <Required:Boolean> <Ref:String>; - * @production RequestBodyObject : {@link ASTNode} ::= <span class="component"><Description:String></span> <span class="component">{@link ContentTuple}*</span> <span class="component"><Required:Boolean></span> <span class="component"><Ref:String></span>; - - */ -public class RequestBodyObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:440 - */ - public static org.openapi4j.parser.model.v3.RequestBody composeRequestBody (RequestBodyObject requestBodyObject){ - org.openapi4j.parser.model.v3.RequestBody requestBody = new org.openapi4j.parser.model.v3.RequestBody(); - - if( requestBodyObject.getNumContentTuple() != 0 ){ - Map<String, MediaType> contents = new HashMap<>(); - for( ContentTuple t : requestBodyObject.getContentTuples()) - contents.put(t.getKey(), MediaTypeObject.composeMediaType(t.getMediaTypeObject())); - requestBody.setContentMediaTypes(contents); - } - if( !requestBodyObject.getDescription().isEmpty() ) - requestBody.setDescription(requestBodyObject.getDescription()); - if( requestBodyObject.getRequired() != null ) - requestBody.setRequired(requestBodyObject.getRequired()); - if( !requestBodyObject.getRef().isEmpty() ) - requestBody.setRef(requestBodyObject.getRef()); - - return requestBody; - } - /** - * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:457 - */ - public static RequestBodyObject parseRequestBody(org.openapi4j.parser.model.v3.RequestBody requestBody){ - RequestBodyObject requestBodyObject = new RequestBodyObject(); - - if( requestBody.getContentMediaTypes() != null ) { - for (String key : requestBody.getContentMediaTypes().keySet()) - requestBodyObject.addContentTuple(new ContentTuple(key, MediaTypeObject.parseMediaType(requestBody.getContentMediaType(key)))); - } - if( requestBody.getDescription() != null ) - requestBodyObject.setDescription(requestBody.getDescription()); - if( requestBody.getRequired() != null ) - requestBodyObject.setRequired( requestBody.getRequired() ); - if( requestBody.isRef() ) - requestBodyObject.setRef(requestBody.getRef()); - - return requestBodyObject; - } - /** - * @declaredat ASTNode:1 - */ - public RequestBodyObject() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - setChild(new JastAddList(), 0); - } - /** - * @declaredat ASTNode:14 - */ - @ASTNodeAnnotation.Constructor( - name = {"Description", "ContentTuple", "Required", "Ref"}, - type = {"String", "JastAddList<ContentTuple>", "Boolean", "String"}, - kind = {"Token", "List", "Token", "Token"} - ) - public RequestBodyObject(String p0, JastAddList<ContentTuple> p1, Boolean p2, String p3) { - setDescription(p0); - setChild(p1, 0); - setRequired(p2); - setRef(p3); - } - /** @apilevel low-level - * @declaredat ASTNode:26 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:32 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:44 - */ - public RequestBodyObject clone() throws CloneNotSupportedException { - RequestBodyObject node = (RequestBodyObject) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:49 - */ - public RequestBodyObject copy() { - try { - RequestBodyObject node = (RequestBodyObject) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:68 - */ - @Deprecated - public RequestBodyObject fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:78 - */ - public RequestBodyObject treeCopyNoTransform() { - RequestBodyObject tree = (RequestBodyObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:98 - */ - public RequestBodyObject treeCopy() { - RequestBodyObject tree = (RequestBodyObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:112 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Description == ((RequestBodyObject) node).tokenString_Description) && (tokenBoolean_Required == ((RequestBodyObject) node).tokenBoolean_Required) && (tokenString_Ref == ((RequestBodyObject) node).tokenString_Ref); - } - /** - * Replaces the lexeme Description. - * @param value The new value for the lexeme Description. - * @apilevel high-level - */ - public void setDescription(String value) { - tokenString_Description = value; - } - /** @apilevel internal - */ - protected String tokenString_Description; - /** - * Retrieves the value for the lexeme Description. - * @return The value for the lexeme Description. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Description") - public String getDescription() { - return tokenString_Description != null ? tokenString_Description : ""; - } - /** - * Replaces the ContentTuple list. - * @param list The new list node to be used as the ContentTuple list. - * @apilevel high-level - */ - public void setContentTupleList(JastAddList<ContentTuple> list) { - setChild(list, 0); - } - /** - * Retrieves the number of children in the ContentTuple list. - * @return Number of children in the ContentTuple list. - * @apilevel high-level - */ - public int getNumContentTuple() { - return getContentTupleList().getNumChild(); - } - /** - * Retrieves the number of children in the ContentTuple list. - * Calling this method will not trigger rewrites. - * @return Number of children in the ContentTuple list. - * @apilevel low-level - */ - public int getNumContentTupleNoTransform() { - return getContentTupleListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the ContentTuple list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the ContentTuple list. - * @apilevel high-level - */ - public ContentTuple getContentTuple(int i) { - return (ContentTuple) getContentTupleList().getChild(i); - } - /** - * Check whether the ContentTuple list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasContentTuple() { - return getContentTupleList().getNumChild() != 0; - } - /** - * Append an element to the ContentTuple list. - * @param node The element to append to the ContentTuple list. - * @apilevel high-level - */ - public void addContentTuple(ContentTuple node) { - JastAddList<ContentTuple> list = (parent == null) ? getContentTupleListNoTransform() : getContentTupleList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addContentTupleNoTransform(ContentTuple node) { - JastAddList<ContentTuple> list = getContentTupleListNoTransform(); - list.addChild(node); - } - /** - * Replaces the ContentTuple list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setContentTuple(ContentTuple node, int i) { - JastAddList<ContentTuple> list = getContentTupleList(); - list.setChild(node, i); - } - /** - * Retrieves the ContentTuple list. - * @return The node representing the ContentTuple list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="ContentTuple") - public JastAddList<ContentTuple> getContentTupleList() { - JastAddList<ContentTuple> list = (JastAddList<ContentTuple>) getChild(0); - return list; - } - /** - * Retrieves the ContentTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ContentTuple list. - * @apilevel low-level - */ - public JastAddList<ContentTuple> getContentTupleListNoTransform() { - return (JastAddList<ContentTuple>) getChildNoTransform(0); - } - /** - * @return the element at index {@code i} in the ContentTuple list without - * triggering rewrites. - */ - public ContentTuple getContentTupleNoTransform(int i) { - return (ContentTuple) getContentTupleListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the ContentTuple list. - * @return The node representing the ContentTuple list. - * @apilevel high-level - */ - public JastAddList<ContentTuple> getContentTuples() { - return getContentTupleList(); - } - /** - * Retrieves the ContentTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ContentTuple list. - * @apilevel low-level - */ - public JastAddList<ContentTuple> getContentTuplesNoTransform() { - return getContentTupleListNoTransform(); - } - /** - * Replaces the lexeme Required. - * @param value The new value for the lexeme Required. - * @apilevel high-level - */ - public void setRequired(Boolean value) { - tokenBoolean_Required = value; - } - /** @apilevel internal - */ - protected Boolean tokenBoolean_Required; - /** - * Retrieves the value for the lexeme Required. - * @return The value for the lexeme Required. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Required") - public Boolean getRequired() { - return tokenBoolean_Required; - } - /** - * Replaces the lexeme Ref. - * @param value The new value for the lexeme Ref. - * @apilevel high-level - */ - public void setRef(String value) { - tokenString_Ref = value; - } - /** @apilevel internal - */ - protected String tokenString_Ref; - /** - * Retrieves the value for the lexeme Ref. - * @return The value for the lexeme Ref. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Ref") - public String getRef() { - return tokenString_Ref != null ? tokenString_Ref : ""; - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/RequestBodyTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/RequestBodyTuple.java deleted file mode 100644 index 5d18284a04f04afb0497656d278088a79c03b58b..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/RequestBodyTuple.java +++ /dev/null @@ -1,214 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:27 - * @astdecl RequestBodyTuple : ASTNode ::= <Key:String> RequestBodyObject; - * @production RequestBodyTuple : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component">{@link RequestBodyObject}</span>; - - */ -public class RequestBodyTuple extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public RequestBodyTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"Key", "RequestBodyObject"}, - type = {"String", "RequestBodyObject"}, - kind = {"Token", "Child"} - ) - public RequestBodyTuple(String p0, RequestBodyObject p1) { - setKey(p0); - setChild(p1, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:23 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:29 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:33 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:37 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:41 - */ - public RequestBodyTuple clone() throws CloneNotSupportedException { - RequestBodyTuple node = (RequestBodyTuple) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:46 - */ - public RequestBodyTuple copy() { - try { - RequestBodyTuple node = (RequestBodyTuple) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:65 - */ - @Deprecated - public RequestBodyTuple fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:75 - */ - public RequestBodyTuple treeCopyNoTransform() { - RequestBodyTuple tree = (RequestBodyTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:95 - */ - public RequestBodyTuple treeCopy() { - RequestBodyTuple tree = (RequestBodyTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:109 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Key == ((RequestBodyTuple) node).tokenString_Key); - } - /** - * Replaces the lexeme Key. - * @param value The new value for the lexeme Key. - * @apilevel high-level - */ - public void setKey(String value) { - tokenString_Key = value; - } - /** @apilevel internal - */ - protected String tokenString_Key; - /** - * Retrieves the value for the lexeme Key. - * @return The value for the lexeme Key. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Key") - public String getKey() { - return tokenString_Key != null ? tokenString_Key : ""; - } - /** - * Replaces the RequestBodyObject child. - * @param node The new node to replace the RequestBodyObject child. - * @apilevel high-level - */ - public void setRequestBodyObject(RequestBodyObject node) { - setChild(node, 0); - } - /** - * Retrieves the RequestBodyObject child. - * @return The current node used as the RequestBodyObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="RequestBodyObject") - public RequestBodyObject getRequestBodyObject() { - return (RequestBodyObject) getChild(0); - } - /** - * Retrieves the RequestBodyObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the RequestBodyObject child. - * @apilevel low-level - */ - public RequestBodyObject getRequestBodyObjectNoTransform() { - return (RequestBodyObject) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/RequiredField.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/RequiredField.java deleted file mode 100644 index 04961216d936aaa564f4df606b0a6e5e3af18aec..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/RequiredField.java +++ /dev/null @@ -1,186 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:97 - * @astdecl RequiredField : ASTNode ::= <Value:String>; - * @production RequiredField : {@link ASTNode} ::= <span class="component"><Value:String></span>; - - */ -public class RequiredField extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public RequiredField() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - } - /** - * @declaredat ASTNode:12 - */ - @ASTNodeAnnotation.Constructor( - name = {"Value"}, - type = {"String"}, - kind = {"Token"} - ) - public RequiredField(String p0) { - setValue(p0); - } - /** @apilevel low-level - * @declaredat ASTNode:21 - */ - protected int numChildren() { - return 0; - } - /** - * @apilevel internal - * @declaredat ASTNode:27 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:31 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:35 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:39 - */ - public RequiredField clone() throws CloneNotSupportedException { - RequiredField node = (RequiredField) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:44 - */ - public RequiredField copy() { - try { - RequiredField node = (RequiredField) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:63 - */ - @Deprecated - public RequiredField fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:73 - */ - public RequiredField treeCopyNoTransform() { - RequiredField tree = (RequiredField) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:93 - */ - public RequiredField treeCopy() { - RequiredField tree = (RequiredField) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:107 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Value == ((RequiredField) node).tokenString_Value); - } - /** - * Replaces the lexeme Value. - * @param value The new value for the lexeme Value. - * @apilevel high-level - */ - public void setValue(String value) { - tokenString_Value = value; - } - /** @apilevel internal - */ - protected String tokenString_Value; - /** - * Retrieves the value for the lexeme Value. - * @return The value for the lexeme Value. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Value") - public String getValue() { - return tokenString_Value != null ? tokenString_Value : ""; - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponseObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponseObject.java deleted file mode 100644 index aa382360c4c9e2021d2c7d8f719ea6517281fecf..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponseObject.java +++ /dev/null @@ -1,602 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:70 - * @astdecl ResponseObject : ASTNode ::= <Ref:String> <Description:String> HeaderTuple* ContentTuple* LinkTuple*; - * @production ResponseObject : {@link ASTNode} ::= <span class="component"><Ref:String></span> <span class="component"><Description:String></span> <span class="component">{@link HeaderTuple}*</span> <span class="component">{@link ContentTuple}*</span> <span class="component">{@link LinkTuple}*</span>; - - */ -public class ResponseObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:507 - */ - public static Response composeResponse (ResponseObject responseObject){ - Response response = new Response(); - - if( !responseObject.getRef().isEmpty() ) - response.setRef(responseObject.getRef()); - if( !responseObject.getDescription().isEmpty() ) - response.setDescription(responseObject.getDescription()); - if( responseObject.getNumHeaderTuple() != 0 ){ - Map<String, Header> headers = new HashMap<>(); - for( HeaderTuple t : responseObject.getHeaderTuples() ) - headers.put(t.getKey(), HeaderObject.composeHeader(t.getHeaderObject())); - response.setHeaders(headers); - } - if( responseObject.getNumContentTuple() != 0 ){ - Map<String, MediaType> contents = new HashMap<>(); - for( ContentTuple t : responseObject.getContentTuples() ) - contents.put(t.getKey(), MediaTypeObject.composeMediaType(t.getMediaTypeObject())); - response.setContentMediaTypes(contents); - } - if( responseObject.getNumLinkTuple() != 0 ){ - Map<String, Link> links = new HashMap<>(); - for( LinkTuple t : responseObject.getLinkTuples() ) - links.put(t.getKey(), LinkObject.composeLink(t.getLinkObject())); - response.setLinks(links); - } - - return response; - } - /** - * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:514 - */ - public static ResponseObject parseResponse(Response response){ - ResponseObject responseObject = new ResponseObject(); - - if( response.isRef() ) - responseObject.setRef(response.getRef()); - if( response.getDescription() != null ) - responseObject.setDescription(response.getDescription()); - if( response.getHeaders() != null ){ - for( String key : response.getHeaders().keySet() ) - responseObject.addHeaderTuple( new HeaderTuple(key, HeaderObject.parseHeader(response.getHeader(key))) ); - } - if( response.getContentMediaTypes() != null ){ - for( String key : response.getContentMediaTypes().keySet() ) - responseObject.addContentTuple( new ContentTuple(key, MediaTypeObject.parseMediaType(response.getContentMediaType(key))) ); - } - if( response.getLinks() != null ){ - for( String key : response.getLinks().keySet() ) - responseObject.addLinkTuple( new LinkTuple(key, LinkObject.parseLink(response.getLink(key))) ); - } - - return responseObject; - } - /** - * @declaredat ASTNode:1 - */ - public ResponseObject() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[3]; - setChild(new JastAddList(), 0); - setChild(new JastAddList(), 1); - setChild(new JastAddList(), 2); - } - /** - * @declaredat ASTNode:16 - */ - @ASTNodeAnnotation.Constructor( - name = {"Ref", "Description", "HeaderTuple", "ContentTuple", "LinkTuple"}, - type = {"String", "String", "JastAddList<HeaderTuple>", "JastAddList<ContentTuple>", "JastAddList<LinkTuple>"}, - kind = {"Token", "Token", "List", "List", "List"} - ) - public ResponseObject(String p0, String p1, JastAddList<HeaderTuple> p2, JastAddList<ContentTuple> p3, JastAddList<LinkTuple> p4) { - setRef(p0); - setDescription(p1); - setChild(p2, 0); - setChild(p3, 1); - setChild(p4, 2); - } - /** @apilevel low-level - * @declaredat ASTNode:29 - */ - protected int numChildren() { - return 3; - } - /** - * @apilevel internal - * @declaredat ASTNode:35 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:39 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:43 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:47 - */ - public ResponseObject clone() throws CloneNotSupportedException { - ResponseObject node = (ResponseObject) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:52 - */ - public ResponseObject copy() { - try { - ResponseObject node = (ResponseObject) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:71 - */ - @Deprecated - public ResponseObject fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:81 - */ - public ResponseObject treeCopyNoTransform() { - ResponseObject tree = (ResponseObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:101 - */ - public ResponseObject treeCopy() { - ResponseObject tree = (ResponseObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:115 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Ref == ((ResponseObject) node).tokenString_Ref) && (tokenString_Description == ((ResponseObject) node).tokenString_Description); - } - /** - * Replaces the lexeme Ref. - * @param value The new value for the lexeme Ref. - * @apilevel high-level - */ - public void setRef(String value) { - tokenString_Ref = value; - } - /** @apilevel internal - */ - protected String tokenString_Ref; - /** - * Retrieves the value for the lexeme Ref. - * @return The value for the lexeme Ref. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Ref") - public String getRef() { - return tokenString_Ref != null ? tokenString_Ref : ""; - } - /** - * Replaces the lexeme Description. - * @param value The new value for the lexeme Description. - * @apilevel high-level - */ - public void setDescription(String value) { - tokenString_Description = value; - } - /** @apilevel internal - */ - protected String tokenString_Description; - /** - * Retrieves the value for the lexeme Description. - * @return The value for the lexeme Description. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Description") - public String getDescription() { - return tokenString_Description != null ? tokenString_Description : ""; - } - /** - * Replaces the HeaderTuple list. - * @param list The new list node to be used as the HeaderTuple list. - * @apilevel high-level - */ - public void setHeaderTupleList(JastAddList<HeaderTuple> list) { - setChild(list, 0); - } - /** - * Retrieves the number of children in the HeaderTuple list. - * @return Number of children in the HeaderTuple list. - * @apilevel high-level - */ - public int getNumHeaderTuple() { - return getHeaderTupleList().getNumChild(); - } - /** - * Retrieves the number of children in the HeaderTuple list. - * Calling this method will not trigger rewrites. - * @return Number of children in the HeaderTuple list. - * @apilevel low-level - */ - public int getNumHeaderTupleNoTransform() { - return getHeaderTupleListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the HeaderTuple list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the HeaderTuple list. - * @apilevel high-level - */ - public HeaderTuple getHeaderTuple(int i) { - return (HeaderTuple) getHeaderTupleList().getChild(i); - } - /** - * Check whether the HeaderTuple list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasHeaderTuple() { - return getHeaderTupleList().getNumChild() != 0; - } - /** - * Append an element to the HeaderTuple list. - * @param node The element to append to the HeaderTuple list. - * @apilevel high-level - */ - public void addHeaderTuple(HeaderTuple node) { - JastAddList<HeaderTuple> list = (parent == null) ? getHeaderTupleListNoTransform() : getHeaderTupleList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addHeaderTupleNoTransform(HeaderTuple node) { - JastAddList<HeaderTuple> list = getHeaderTupleListNoTransform(); - list.addChild(node); - } - /** - * Replaces the HeaderTuple list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setHeaderTuple(HeaderTuple node, int i) { - JastAddList<HeaderTuple> list = getHeaderTupleList(); - list.setChild(node, i); - } - /** - * Retrieves the HeaderTuple list. - * @return The node representing the HeaderTuple list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="HeaderTuple") - public JastAddList<HeaderTuple> getHeaderTupleList() { - JastAddList<HeaderTuple> list = (JastAddList<HeaderTuple>) getChild(0); - return list; - } - /** - * Retrieves the HeaderTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the HeaderTuple list. - * @apilevel low-level - */ - public JastAddList<HeaderTuple> getHeaderTupleListNoTransform() { - return (JastAddList<HeaderTuple>) getChildNoTransform(0); - } - /** - * @return the element at index {@code i} in the HeaderTuple list without - * triggering rewrites. - */ - public HeaderTuple getHeaderTupleNoTransform(int i) { - return (HeaderTuple) getHeaderTupleListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the HeaderTuple list. - * @return The node representing the HeaderTuple list. - * @apilevel high-level - */ - public JastAddList<HeaderTuple> getHeaderTuples() { - return getHeaderTupleList(); - } - /** - * Retrieves the HeaderTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the HeaderTuple list. - * @apilevel low-level - */ - public JastAddList<HeaderTuple> getHeaderTuplesNoTransform() { - return getHeaderTupleListNoTransform(); - } - /** - * Replaces the ContentTuple list. - * @param list The new list node to be used as the ContentTuple list. - * @apilevel high-level - */ - public void setContentTupleList(JastAddList<ContentTuple> list) { - setChild(list, 1); - } - /** - * Retrieves the number of children in the ContentTuple list. - * @return Number of children in the ContentTuple list. - * @apilevel high-level - */ - public int getNumContentTuple() { - return getContentTupleList().getNumChild(); - } - /** - * Retrieves the number of children in the ContentTuple list. - * Calling this method will not trigger rewrites. - * @return Number of children in the ContentTuple list. - * @apilevel low-level - */ - public int getNumContentTupleNoTransform() { - return getContentTupleListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the ContentTuple list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the ContentTuple list. - * @apilevel high-level - */ - public ContentTuple getContentTuple(int i) { - return (ContentTuple) getContentTupleList().getChild(i); - } - /** - * Check whether the ContentTuple list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasContentTuple() { - return getContentTupleList().getNumChild() != 0; - } - /** - * Append an element to the ContentTuple list. - * @param node The element to append to the ContentTuple list. - * @apilevel high-level - */ - public void addContentTuple(ContentTuple node) { - JastAddList<ContentTuple> list = (parent == null) ? getContentTupleListNoTransform() : getContentTupleList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addContentTupleNoTransform(ContentTuple node) { - JastAddList<ContentTuple> list = getContentTupleListNoTransform(); - list.addChild(node); - } - /** - * Replaces the ContentTuple list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setContentTuple(ContentTuple node, int i) { - JastAddList<ContentTuple> list = getContentTupleList(); - list.setChild(node, i); - } - /** - * Retrieves the ContentTuple list. - * @return The node representing the ContentTuple list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="ContentTuple") - public JastAddList<ContentTuple> getContentTupleList() { - JastAddList<ContentTuple> list = (JastAddList<ContentTuple>) getChild(1); - return list; - } - /** - * Retrieves the ContentTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ContentTuple list. - * @apilevel low-level - */ - public JastAddList<ContentTuple> getContentTupleListNoTransform() { - return (JastAddList<ContentTuple>) getChildNoTransform(1); - } - /** - * @return the element at index {@code i} in the ContentTuple list without - * triggering rewrites. - */ - public ContentTuple getContentTupleNoTransform(int i) { - return (ContentTuple) getContentTupleListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the ContentTuple list. - * @return The node representing the ContentTuple list. - * @apilevel high-level - */ - public JastAddList<ContentTuple> getContentTuples() { - return getContentTupleList(); - } - /** - * Retrieves the ContentTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ContentTuple list. - * @apilevel low-level - */ - public JastAddList<ContentTuple> getContentTuplesNoTransform() { - return getContentTupleListNoTransform(); - } - /** - * Replaces the LinkTuple list. - * @param list The new list node to be used as the LinkTuple list. - * @apilevel high-level - */ - public void setLinkTupleList(JastAddList<LinkTuple> list) { - setChild(list, 2); - } - /** - * Retrieves the number of children in the LinkTuple list. - * @return Number of children in the LinkTuple list. - * @apilevel high-level - */ - public int getNumLinkTuple() { - return getLinkTupleList().getNumChild(); - } - /** - * Retrieves the number of children in the LinkTuple list. - * Calling this method will not trigger rewrites. - * @return Number of children in the LinkTuple list. - * @apilevel low-level - */ - public int getNumLinkTupleNoTransform() { - return getLinkTupleListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the LinkTuple list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the LinkTuple list. - * @apilevel high-level - */ - public LinkTuple getLinkTuple(int i) { - return (LinkTuple) getLinkTupleList().getChild(i); - } - /** - * Check whether the LinkTuple list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasLinkTuple() { - return getLinkTupleList().getNumChild() != 0; - } - /** - * Append an element to the LinkTuple list. - * @param node The element to append to the LinkTuple list. - * @apilevel high-level - */ - public void addLinkTuple(LinkTuple node) { - JastAddList<LinkTuple> list = (parent == null) ? getLinkTupleListNoTransform() : getLinkTupleList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addLinkTupleNoTransform(LinkTuple node) { - JastAddList<LinkTuple> list = getLinkTupleListNoTransform(); - list.addChild(node); - } - /** - * Replaces the LinkTuple list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setLinkTuple(LinkTuple node, int i) { - JastAddList<LinkTuple> list = getLinkTupleList(); - list.setChild(node, i); - } - /** - * Retrieves the LinkTuple list. - * @return The node representing the LinkTuple list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="LinkTuple") - public JastAddList<LinkTuple> getLinkTupleList() { - JastAddList<LinkTuple> list = (JastAddList<LinkTuple>) getChild(2); - return list; - } - /** - * Retrieves the LinkTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the LinkTuple list. - * @apilevel low-level - */ - public JastAddList<LinkTuple> getLinkTupleListNoTransform() { - return (JastAddList<LinkTuple>) getChildNoTransform(2); - } - /** - * @return the element at index {@code i} in the LinkTuple list without - * triggering rewrites. - */ - public LinkTuple getLinkTupleNoTransform(int i) { - return (LinkTuple) getLinkTupleListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the LinkTuple list. - * @return The node representing the LinkTuple list. - * @apilevel high-level - */ - public JastAddList<LinkTuple> getLinkTuples() { - return getLinkTupleList(); - } - /** - * Retrieves the LinkTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the LinkTuple list. - * @apilevel low-level - */ - public JastAddList<LinkTuple> getLinkTuplesNoTransform() { - return getLinkTupleListNoTransform(); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponseTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponseTuple.java deleted file mode 100644 index 9547763a2a84cef46e5db11f86ebf48a5240ebd3..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponseTuple.java +++ /dev/null @@ -1,214 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:24 - * @astdecl ResponseTuple : ASTNode ::= <Key:String> ResponseObject; - * @production ResponseTuple : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component">{@link ResponseObject}</span>; - - */ -public class ResponseTuple extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public ResponseTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"Key", "ResponseObject"}, - type = {"String", "ResponseObject"}, - kind = {"Token", "Child"} - ) - public ResponseTuple(String p0, ResponseObject p1) { - setKey(p0); - setChild(p1, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:23 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:29 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:33 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:37 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:41 - */ - public ResponseTuple clone() throws CloneNotSupportedException { - ResponseTuple node = (ResponseTuple) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:46 - */ - public ResponseTuple copy() { - try { - ResponseTuple node = (ResponseTuple) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:65 - */ - @Deprecated - public ResponseTuple fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:75 - */ - public ResponseTuple treeCopyNoTransform() { - ResponseTuple tree = (ResponseTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:95 - */ - public ResponseTuple treeCopy() { - ResponseTuple tree = (ResponseTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:109 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Key == ((ResponseTuple) node).tokenString_Key); - } - /** - * Replaces the lexeme Key. - * @param value The new value for the lexeme Key. - * @apilevel high-level - */ - public void setKey(String value) { - tokenString_Key = value; - } - /** @apilevel internal - */ - protected String tokenString_Key; - /** - * Retrieves the value for the lexeme Key. - * @return The value for the lexeme Key. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Key") - public String getKey() { - return tokenString_Key != null ? tokenString_Key : ""; - } - /** - * Replaces the ResponseObject child. - * @param node The new node to replace the ResponseObject child. - * @apilevel high-level - */ - public void setResponseObject(ResponseObject node) { - setChild(node, 0); - } - /** - * Retrieves the ResponseObject child. - * @return The current node used as the ResponseObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="ResponseObject") - public ResponseObject getResponseObject() { - return (ResponseObject) getChild(0); - } - /** - * Retrieves the ResponseObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the ResponseObject child. - * @apilevel low-level - */ - public ResponseObject getResponseObjectNoTransform() { - return (ResponseObject) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/SchemaObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/SchemaObject.java deleted file mode 100644 index a62e7fd67b9d603fd80c13d33712012ab02090cb..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/SchemaObject.java +++ /dev/null @@ -1,1988 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:91 - * @astdecl SchemaObject : ASTNode ::= <AdditionalProperties:SchemaObject> <AdditionalPropertiesAllowed:Boolean> <DefaultValue:Object> <Description:String> <DeprecatedBoolean:Boolean> [DiscriminatorObject] EnumObj* <Example:Object> <ExclusiveMaximum:Boolean> <ExclusiveMinimum:Boolean> [ExternalDocObject] <Format:String> [ItemsSchema] <Maximum:Number> <Minimum:Number> <MaxItems:Integer> <MinItems:Integer> <MaxLength:Integer> <MinLength:Integer> <MaxProperties:Integer> <MinProperties:Integer> <MultipleOf:Number> [NotSchema] <Nullable:Boolean> <Pattern:String> PropertyItem* RequiredField* AllOfSchema* AnyOfSchema* OneOfSchema* <ReadOnly:Boolean> <WriteOnly:Boolean> <Type:String> <Title:String> <UniqueItems:Boolean> [XmlObject] <Ref:String> Extension*; - * @production SchemaObject : {@link ASTNode} ::= <span class="component"><AdditionalProperties:SchemaObject></span> <span class="component"><AdditionalPropertiesAllowed:Boolean></span> <span class="component"><DefaultValue:Object></span> <span class="component"><Description:String></span> <span class="component"><DeprecatedBoolean:Boolean></span> <span class="component">[{@link DiscriminatorObject}]</span> <span class="component">{@link EnumObj}*</span> <span class="component"><Example:Object></span> <span class="component"><ExclusiveMaximum:Boolean></span> <span class="component"><ExclusiveMinimum:Boolean></span> <span class="component">[{@link ExternalDocObject}]</span> <span class="component"><Format:String></span> <span class="component">[{@link ItemsSchema}]</span> <span class="component"><Maximum:Number></span> <span class="component"><Minimum:Number></span> <span class="component"><MaxItems:Integer></span> <span class="component"><MinItems:Integer></span> <span class="component"><MaxLength:Integer></span> <span class="component"><MinLength:Integer></span> <span class="component"><MaxProperties:Integer></span> <span class="component"><MinProperties:Integer></span> <span class="component"><MultipleOf:Number></span> <span class="component">[{@link NotSchema}]</span> <span class="component"><Nullable:Boolean></span> <span class="component"><Pattern:String></span> <span class="component">{@link PropertyItem}*</span> <span class="component">{@link RequiredField}*</span> <span class="component">{@link AllOfSchema}*</span> <span class="component">{@link AnyOfSchema}*</span> <span class="component">{@link OneOfSchema}*</span> <span class="component"><ReadOnly:Boolean></span> <span class="component"><WriteOnly:Boolean></span> <span class="component"><Type:String></span> <span class="component"><Title:String></span> <span class="component"><UniqueItems:Boolean></span> <span class="component">[{@link XmlObject}]</span> <span class="component"><Ref:String></span> <span class="component">{@link Extension}*</span>; - - */ -public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:647 - */ - public static org.openapi4j.parser.model.v3.Schema composeSchema (SchemaObject schemaObject) { - org.openapi4j.parser.model.v3.Schema schema = new org.openapi4j.parser.model.v3.Schema(); - - if( !schemaObject.getRef().isEmpty() ) - schema.setRef(schemaObject.getRef()); - if( schemaObject.getAdditionalProperties() != null ) - schema.setAdditionalProperties(composeSchema(schemaObject.getAdditionalProperties())); - if( schemaObject.getAdditionalPropertiesAllowed() != null ) - schema.setAdditionalPropertiesAllowed(schemaObject.getAdditionalPropertiesAllowed()); - if( schemaObject.getDefaultValue() != null ) - schema.setDefault(schemaObject.getDefaultValue()); - if( !schemaObject.getDescription().isEmpty() ) - schema.setDescription(schemaObject.getDescription()); - if( schemaObject.getDeprecatedBoolean() != null ) - schema.setDeprecated(schemaObject.getDeprecatedBoolean()); - if( schemaObject.hasDiscriminatorObject() ) - schema.setDiscriminator(DiscriminatorObject.composeDiscriminator(schemaObject.getDiscriminatorObject())); - if( schemaObject.getNumEnumObj() != 0 ){ - for( EnumObj e : schemaObject.getEnumObjs() ) - schema.addEnum(e.getEnumOb()); - } - if( schemaObject.getExample() != null ) - schema.setExample(schemaObject.getExample()); - if( schemaObject.getExclusiveMaximum() != null ) - schema.setExclusiveMaximum(schemaObject.getExclusiveMaximum()); - if( schemaObject.getExclusiveMinimum() != null ) - schema.setExclusiveMinimum(schemaObject.getExclusiveMinimum()); - if( schemaObject.hasExternalDocObject() ) - schema.setExternalDocs(ExternalDocObject.composeExternalDocs(schemaObject.getExternalDocObject())); - if( !schemaObject.getFormat().isEmpty() ) - schema.setFormat(schemaObject.getFormat()); - if( schemaObject.hasItemsSchema() ) - schema.setItemsSchema(composeSchema(schemaObject.getItemsSchema().getSchemaObject())); - if( schemaObject.getMaximum() != null ) - schema.setMaximum(schemaObject.getMaximum()); - if( schemaObject.getMinimum() != null ) - schema.setMinimum(schemaObject.getMinimum()); - if( schemaObject.getMaxItems() != null ) - schema.setMaxItems(schemaObject.getMaxItems()); - if( schemaObject.getMinItems() != null ) - schema.setMinItems(schemaObject.getMinItems()); - if( schemaObject.getMaxLength() != null ) - schema.setMaxLength(schemaObject.getMaxLength()); - if( schemaObject.getMinLength() != null ) - schema.setMinLength(schemaObject.getMinLength()); - if( schemaObject.getMaxProperties() != null ) - schema.setMaxProperties(schemaObject.getMaxProperties()); - if( schemaObject.getMinProperties() != null ) - schema.setMinProperties(schemaObject.getMinProperties()); - if( schemaObject.getMultipleOf() != null ) - schema.setMultipleOf(schemaObject.getMultipleOf()); - if( schemaObject.hasNotSchema() ) - schema.setNotSchema(composeSchema(schemaObject.getNotSchema().getSchemaObject())); - if( schemaObject.getNullable() != null ) - schema.setNullable(schemaObject.getNullable()); - if( !schemaObject.getPattern().isEmpty() ) - schema.setPattern(schemaObject.getPattern()); - if( schemaObject.getNumPropertyItem() != 0 ){ - Map<String, org.openapi4j.parser.model.v3.Schema> properties = new HashMap<>(); - for( PropertyItem p : schemaObject.getPropertyItemList() ) - properties.put(p.getName(), composeSchema(p.getSchemaObject())); - schema.setProperties(properties); - } - if( schemaObject.getNumRequiredField() != 0 ){ - for( RequiredField r : schemaObject.getRequiredFields() ) - schema.addRequiredField(r.getValue()); - } - if( schemaObject.getNumAllOfSchema() != 0 ){ - for( AllOfSchema a : schemaObject.getAllOfSchemas() ) - schema.addAllOfSchema(composeSchema(a.getSchemaObject())); - } - if( schemaObject.getNumAnyOfSchema() != 0 ){ - for( AnyOfSchema a : schemaObject.getAnyOfSchemas() ) - schema.addAnyOfSchema(composeSchema(a.getSchemaObject())); - } - if( schemaObject.getNumOneOfSchema() != 0 ){ - for( OneOfSchema o : schemaObject.getOneOfSchemas() ) - schema.addOneOfSchema(composeSchema(o.getSchemaObject())); - } - if( schemaObject.getReadOnly() != null ) - schema.setReadOnly(schemaObject.getReadOnly()); - if( schemaObject.getWriteOnly() != null ) - schema.setWriteOnly(schemaObject.getWriteOnly()); - if( !schemaObject.getType().isEmpty() ) - schema.setType(schemaObject.getType()); - if( !schemaObject.getTitle().isEmpty() ) - schema.setTitle(schemaObject.getTitle()); - if( schemaObject.getUniqueItems() != null ) - schema.setUniqueItems(schemaObject.getUniqueItems()); - if( schemaObject.hasXmlObject() ) - schema.setXml(XmlObject.composeXml(schemaObject.getXmlObject())); - if( schemaObject.getNumExtension() != 0 ){ - Map<String, Object> extensionMap = new HashMap<>(); - for( Extension e : schemaObject.getExtensions() ) - extensionMap.put(e.getKey(), e.getValue()); - schema.setExtensions(extensionMap); - } - - return schema; - } - /** - * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:638 - */ - public static SchemaObject parseSchema (org.openapi4j.parser.model.v3.Schema schema) { - SchemaObject schemaObject = new SchemaObject(); - - if( schema.isRef() ) - schemaObject.setRef(schema.getRef()); - if( schema.getAdditionalProperties() != null ) - schemaObject.setAdditionalProperties(parseSchema(schema.getAdditionalProperties())); - if( schema.getAdditionalProperties() == null && schema.getAdditionalPropertiesAllowed() != null ) - schemaObject.setAdditionalPropertiesAllowed(schema.getAdditionalPropertiesAllowed()); - if( schema.getDefault() != null ) - schemaObject.setDefaultValue(schema.getDefault()); - if( schema.getDescription() != null ) - schemaObject.setDescription(schema.getDescription()); - if( schema.getDeprecated() != null ) - schemaObject.setDeprecatedBoolean(schema.getDeprecated()); - if( schema.getDiscriminator() != null ) - schemaObject.setDiscriminatorObject(DiscriminatorObject.parseDiscriminator(schema.getDiscriminator())); - if( schema.getEnums() != null ){ - for( Object o : schema.getEnums() ){ - EnumObj enumObj = new EnumObj(); - enumObj.setEnumOb(o); - schemaObject.addEnumObj(enumObj); - } - } - if( schema.getExample() != null ) - schemaObject.setExample(schema.getExample()); - if( schema.getExclusiveMaximum() != null ) - schemaObject.setExclusiveMaximum(schema.getExclusiveMaximum()); - if( schema.getExclusiveMinimum() != null ) - schemaObject.setExclusiveMinimum(schema.getExclusiveMinimum()); - if( schema.getExternalDocs() != null ) - schemaObject.setExternalDocObject(ExternalDocObject.parseExternalDocs(schema.getExternalDocs())); - if( schema.getFormat() != null ) - schemaObject.setFormat(schema.getFormat()); - if( schema.getItemsSchema() != null ){ - ItemsSchema itemsSchema = new ItemsSchema(); - itemsSchema.setSchemaObject(parseSchema(schema.getItemsSchema())); - schemaObject.setItemsSchema(itemsSchema); - } - if( schema.getMaximum() != null ) - schemaObject.setMaximum(schema.getMaximum()); - if( schema.getMinimum() != null ) - schemaObject.setMinimum(schema.getMinimum()); - if( schema.getMaxItems() != null ) - schemaObject.setMaxItems(schema.getMaxItems()); - if( schema.getMinItems() != null ) - schemaObject.setMinItems(schema.getMinItems()); - if( schema.getMaxLength() != null ) - schemaObject.setMaxLength(schema.getMaxLength()); - if( schema.getMinLength() != null ) - schemaObject.setMinLength(schema.getMinLength()); - if( schema.getMaxProperties() != null ) - schemaObject.setMaxProperties(schema.getMaxProperties()); - if( schema.getMinProperties() != null ) - schemaObject.setMinProperties(schema.getMinProperties()); - if( schema.getMultipleOf() != null ) - schemaObject.setMultipleOf(schema.getMultipleOf()); - if( schema.getNotSchema() != null ){ - NotSchema notSchema = new NotSchema(); - notSchema.setSchemaObject(parseSchema(schema.getNotSchema())); - schemaObject.setNotSchema(notSchema); - } - if( schema.getNullable() != null ) - schemaObject.setNullable(schema.getNullable()); - if( schema.getPattern() != null ) - schemaObject.setPattern(schema.getPattern()); - if( schema.getProperties() != null ){ - for( String key : schema.getProperties().keySet() ){ - PropertyItem propertyItem = new PropertyItem(); - schemaObject.addPropertyItem(new PropertyItem(key, parseSchema(schema.getProperty(key)))); - } - } - if( schema.getRequiredFields() != null ){ - for( String s : schema.getRequiredFields() ){ - RequiredField requiredField = new RequiredField(); - requiredField.setValue(s); - schemaObject.addRequiredField(requiredField); - } - } - if( schema.getAllOfSchemas() != null ){ - for(org.openapi4j.parser.model.v3.Schema schemaItem : schema.getAllOfSchemas()){ - AllOfSchema allOfSchema = new AllOfSchema(); - allOfSchema.setSchemaObject(parseSchema(schemaItem)); - schemaObject.addAllOfSchema(allOfSchema); - } - } - if( schema.getAnyOfSchemas() != null ){ - for(org.openapi4j.parser.model.v3.Schema schemaItem : schema.getAnyOfSchemas()){ - AnyOfSchema anyOfSchema = new AnyOfSchema(); - anyOfSchema.setSchemaObject(parseSchema(schemaItem)); - schemaObject.addAnyOfSchema(anyOfSchema); - } - } - if( schema.getOneOfSchemas() != null ){ - for(org.openapi4j.parser.model.v3.Schema schemaItem : schema.getOneOfSchemas()){ - OneOfSchema oneOfSchema = new OneOfSchema(); - oneOfSchema.setSchemaObject(parseSchema(schemaItem)); - schemaObject.addOneOfSchema(oneOfSchema); - } - } - if( schema.getReadOnly() != null ) - schemaObject.setReadOnly(schema.getReadOnly()); - if( schema.getWriteOnly() != null ) - schemaObject.setWriteOnly(schema.getWriteOnly()); - if( schema.getType() != null ) - schemaObject.setType(schema.getType()); - if( schema.getTitle() != null ) - schemaObject.setTitle(schema.getTitle()); - if( schema.getUniqueItems() != null ) - schemaObject.setUniqueItems(schema.getUniqueItems()); - if( schema.getXml() != null ) - schemaObject.setXmlObject(XmlObject.parseXml(schema.getXml())); - if( schema.getExtensions() != null ){ - for( String key : schema.getExtensions().keySet() ) - schemaObject.addExtension(new Extension(key, schema.getExtensions().get(key))); - } - - return schemaObject; - } - /** - * @declaredat ASTNode:1 - */ - public SchemaObject() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[12]; - setChild(new Opt(), 0); - setChild(new JastAddList(), 1); - setChild(new Opt(), 2); - setChild(new Opt(), 3); - setChild(new Opt(), 4); - setChild(new JastAddList(), 5); - setChild(new JastAddList(), 6); - setChild(new JastAddList(), 7); - setChild(new JastAddList(), 8); - setChild(new JastAddList(), 9); - setChild(new Opt(), 10); - setChild(new JastAddList(), 11); - } - /** - * @declaredat ASTNode:25 - */ - @ASTNodeAnnotation.Constructor( - name = {"AdditionalProperties", "AdditionalPropertiesAllowed", "DefaultValue", "Description", "DeprecatedBoolean", "DiscriminatorObject", "EnumObj", "Example", "ExclusiveMaximum", "ExclusiveMinimum", "ExternalDocObject", "Format", "ItemsSchema", "Maximum", "Minimum", "MaxItems", "MinItems", "MaxLength", "MinLength", "MaxProperties", "MinProperties", "MultipleOf", "NotSchema", "Nullable", "Pattern", "PropertyItem", "RequiredField", "AllOfSchema", "AnyOfSchema", "OneOfSchema", "ReadOnly", "WriteOnly", "Type", "Title", "UniqueItems", "XmlObject", "Ref", "Extension"}, - type = {"SchemaObject", "Boolean", "Object", "String", "Boolean", "Opt<DiscriminatorObject>", "JastAddList<EnumObj>", "Object", "Boolean", "Boolean", "Opt<ExternalDocObject>", "String", "Opt<ItemsSchema>", "Number", "Number", "Integer", "Integer", "Integer", "Integer", "Integer", "Integer", "Number", "Opt<NotSchema>", "Boolean", "String", "JastAddList<PropertyItem>", "JastAddList<RequiredField>", "JastAddList<AllOfSchema>", "JastAddList<AnyOfSchema>", "JastAddList<OneOfSchema>", "Boolean", "Boolean", "String", "String", "Boolean", "Opt<XmlObject>", "String", "JastAddList<Extension>"}, - kind = {"Token", "Token", "Token", "Token", "Token", "Opt", "List", "Token", "Token", "Token", "Opt", "Token", "Opt", "Token", "Token", "Token", "Token", "Token", "Token", "Token", "Token", "Token", "Opt", "Token", "Token", "List", "List", "List", "List", "List", "Token", "Token", "Token", "Token", "Token", "Opt", "Token", "List"} - ) - public SchemaObject(SchemaObject p0, Boolean p1, Object p2, String p3, Boolean p4, Opt<DiscriminatorObject> p5, JastAddList<EnumObj> p6, Object p7, Boolean p8, Boolean p9, Opt<ExternalDocObject> p10, String p11, Opt<ItemsSchema> p12, Number p13, Number p14, Integer p15, Integer p16, Integer p17, Integer p18, Integer p19, Integer p20, Number p21, Opt<NotSchema> p22, Boolean p23, String p24, JastAddList<PropertyItem> p25, JastAddList<RequiredField> p26, JastAddList<AllOfSchema> p27, JastAddList<AnyOfSchema> p28, JastAddList<OneOfSchema> p29, Boolean p30, Boolean p31, String p32, String p33, Boolean p34, Opt<XmlObject> p35, String p36, JastAddList<Extension> p37) { - setAdditionalProperties(p0); - setAdditionalPropertiesAllowed(p1); - setDefaultValue(p2); - setDescription(p3); - setDeprecatedBoolean(p4); - setChild(p5, 0); - setChild(p6, 1); - setExample(p7); - setExclusiveMaximum(p8); - setExclusiveMinimum(p9); - setChild(p10, 2); - setFormat(p11); - setChild(p12, 3); - setMaximum(p13); - setMinimum(p14); - setMaxItems(p15); - setMinItems(p16); - setMaxLength(p17); - setMinLength(p18); - setMaxProperties(p19); - setMinProperties(p20); - setMultipleOf(p21); - setChild(p22, 4); - setNullable(p23); - setPattern(p24); - setChild(p25, 5); - setChild(p26, 6); - setChild(p27, 7); - setChild(p28, 8); - setChild(p29, 9); - setReadOnly(p30); - setWriteOnly(p31); - setType(p32); - setTitle(p33); - setUniqueItems(p34); - setChild(p35, 10); - setRef(p36); - setChild(p37, 11); - } - /** @apilevel low-level - * @declaredat ASTNode:71 - */ - protected int numChildren() { - return 12; - } - /** - * @apilevel internal - * @declaredat ASTNode:77 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:81 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:85 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:89 - */ - public SchemaObject clone() throws CloneNotSupportedException { - SchemaObject node = (SchemaObject) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:94 - */ - public SchemaObject copy() { - try { - SchemaObject node = (SchemaObject) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:113 - */ - @Deprecated - public SchemaObject fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:123 - */ - public SchemaObject treeCopyNoTransform() { - SchemaObject tree = (SchemaObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:143 - */ - public SchemaObject treeCopy() { - SchemaObject tree = (SchemaObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:157 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenSchemaObject_AdditionalProperties == ((SchemaObject) node).tokenSchemaObject_AdditionalProperties) && (tokenBoolean_AdditionalPropertiesAllowed == ((SchemaObject) node).tokenBoolean_AdditionalPropertiesAllowed) && (tokenObject_DefaultValue == ((SchemaObject) node).tokenObject_DefaultValue) && (tokenString_Description == ((SchemaObject) node).tokenString_Description) && (tokenBoolean_DeprecatedBoolean == ((SchemaObject) node).tokenBoolean_DeprecatedBoolean) && (tokenObject_Example == ((SchemaObject) node).tokenObject_Example) && (tokenBoolean_ExclusiveMaximum == ((SchemaObject) node).tokenBoolean_ExclusiveMaximum) && (tokenBoolean_ExclusiveMinimum == ((SchemaObject) node).tokenBoolean_ExclusiveMinimum) && (tokenString_Format == ((SchemaObject) node).tokenString_Format) && (tokenNumber_Maximum == ((SchemaObject) node).tokenNumber_Maximum) && (tokenNumber_Minimum == ((SchemaObject) node).tokenNumber_Minimum) && (tokenInteger_MaxItems == ((SchemaObject) node).tokenInteger_MaxItems) && (tokenInteger_MinItems == ((SchemaObject) node).tokenInteger_MinItems) && (tokenInteger_MaxLength == ((SchemaObject) node).tokenInteger_MaxLength) && (tokenInteger_MinLength == ((SchemaObject) node).tokenInteger_MinLength) && (tokenInteger_MaxProperties == ((SchemaObject) node).tokenInteger_MaxProperties) && (tokenInteger_MinProperties == ((SchemaObject) node).tokenInteger_MinProperties) && (tokenNumber_MultipleOf == ((SchemaObject) node).tokenNumber_MultipleOf) && (tokenBoolean_Nullable == ((SchemaObject) node).tokenBoolean_Nullable) && (tokenString_Pattern == ((SchemaObject) node).tokenString_Pattern) && (tokenBoolean_ReadOnly == ((SchemaObject) node).tokenBoolean_ReadOnly) && (tokenBoolean_WriteOnly == ((SchemaObject) node).tokenBoolean_WriteOnly) && (tokenString_Type == ((SchemaObject) node).tokenString_Type) && (tokenString_Title == ((SchemaObject) node).tokenString_Title) && (tokenBoolean_UniqueItems == ((SchemaObject) node).tokenBoolean_UniqueItems) && (tokenString_Ref == ((SchemaObject) node).tokenString_Ref); - } - /** - * Replaces the lexeme AdditionalProperties. - * @param value The new value for the lexeme AdditionalProperties. - * @apilevel high-level - */ - public void setAdditionalProperties(SchemaObject value) { - tokenSchemaObject_AdditionalProperties = value; - } - /** @apilevel internal - */ - protected SchemaObject tokenSchemaObject_AdditionalProperties; - /** - * Retrieves the value for the lexeme AdditionalProperties. - * @return The value for the lexeme AdditionalProperties. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="AdditionalProperties") - public SchemaObject getAdditionalProperties() { - return tokenSchemaObject_AdditionalProperties; - } - /** - * Replaces the lexeme AdditionalPropertiesAllowed. - * @param value The new value for the lexeme AdditionalPropertiesAllowed. - * @apilevel high-level - */ - public void setAdditionalPropertiesAllowed(Boolean value) { - tokenBoolean_AdditionalPropertiesAllowed = value; - } - /** @apilevel internal - */ - protected Boolean tokenBoolean_AdditionalPropertiesAllowed; - /** - * Retrieves the value for the lexeme AdditionalPropertiesAllowed. - * @return The value for the lexeme AdditionalPropertiesAllowed. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="AdditionalPropertiesAllowed") - public Boolean getAdditionalPropertiesAllowed() { - return tokenBoolean_AdditionalPropertiesAllowed; - } - /** - * Replaces the lexeme DefaultValue. - * @param value The new value for the lexeme DefaultValue. - * @apilevel high-level - */ - public void setDefaultValue(Object value) { - tokenObject_DefaultValue = value; - } - /** @apilevel internal - */ - protected Object tokenObject_DefaultValue; - /** - * Retrieves the value for the lexeme DefaultValue. - * @return The value for the lexeme DefaultValue. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="DefaultValue") - public Object getDefaultValue() { - return tokenObject_DefaultValue; - } - /** - * Replaces the lexeme Description. - * @param value The new value for the lexeme Description. - * @apilevel high-level - */ - public void setDescription(String value) { - tokenString_Description = value; - } - /** @apilevel internal - */ - protected String tokenString_Description; - /** - * Retrieves the value for the lexeme Description. - * @return The value for the lexeme Description. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Description") - public String getDescription() { - return tokenString_Description != null ? tokenString_Description : ""; - } - /** - * Replaces the lexeme DeprecatedBoolean. - * @param value The new value for the lexeme DeprecatedBoolean. - * @apilevel high-level - */ - public void setDeprecatedBoolean(Boolean value) { - tokenBoolean_DeprecatedBoolean = value; - } - /** @apilevel internal - */ - protected Boolean tokenBoolean_DeprecatedBoolean; - /** - * Retrieves the value for the lexeme DeprecatedBoolean. - * @return The value for the lexeme DeprecatedBoolean. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="DeprecatedBoolean") - public Boolean getDeprecatedBoolean() { - return tokenBoolean_DeprecatedBoolean; - } - /** - * Replaces the optional node for the DiscriminatorObject child. This is the <code>Opt</code> - * node containing the child DiscriminatorObject, not the actual child! - * @param opt The new node to be used as the optional node for the DiscriminatorObject child. - * @apilevel low-level - */ - public void setDiscriminatorObjectOpt(Opt<DiscriminatorObject> opt) { - setChild(opt, 0); - } - /** - * Replaces the (optional) DiscriminatorObject child. - * @param node The new node to be used as the DiscriminatorObject child. - * @apilevel high-level - */ - public void setDiscriminatorObject(DiscriminatorObject node) { - getDiscriminatorObjectOpt().setChild(node, 0); - } - /** - * Check whether the optional DiscriminatorObject child exists. - * @return {@code true} if the optional DiscriminatorObject child exists, {@code false} if it does not. - * @apilevel high-level - */ - public boolean hasDiscriminatorObject() { - return getDiscriminatorObjectOpt().getNumChild() != 0; - } - /** - * Retrieves the (optional) DiscriminatorObject child. - * @return The DiscriminatorObject child, if it exists. Returns {@code null} otherwise. - * @apilevel low-level - */ - public DiscriminatorObject getDiscriminatorObject() { - return (DiscriminatorObject) getDiscriminatorObjectOpt().getChild(0); - } - /** - * Retrieves the optional node for the DiscriminatorObject child. This is the <code>Opt</code> node containing the child DiscriminatorObject, not the actual child! - * @return The optional node for child the DiscriminatorObject child. - * @apilevel low-level - */ - @ASTNodeAnnotation.OptChild(name="DiscriminatorObject") - public Opt<DiscriminatorObject> getDiscriminatorObjectOpt() { - return (Opt<DiscriminatorObject>) getChild(0); - } - /** - * Retrieves the optional node for child DiscriminatorObject. This is the <code>Opt</code> node containing the child DiscriminatorObject, not the actual child! - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child DiscriminatorObject. - * @apilevel low-level - */ - public Opt<DiscriminatorObject> getDiscriminatorObjectOptNoTransform() { - return (Opt<DiscriminatorObject>) getChildNoTransform(0); - } - /** - * Replaces the EnumObj list. - * @param list The new list node to be used as the EnumObj list. - * @apilevel high-level - */ - public void setEnumObjList(JastAddList<EnumObj> list) { - setChild(list, 1); - } - /** - * Retrieves the number of children in the EnumObj list. - * @return Number of children in the EnumObj list. - * @apilevel high-level - */ - public int getNumEnumObj() { - return getEnumObjList().getNumChild(); - } - /** - * Retrieves the number of children in the EnumObj list. - * Calling this method will not trigger rewrites. - * @return Number of children in the EnumObj list. - * @apilevel low-level - */ - public int getNumEnumObjNoTransform() { - return getEnumObjListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the EnumObj list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the EnumObj list. - * @apilevel high-level - */ - public EnumObj getEnumObj(int i) { - return (EnumObj) getEnumObjList().getChild(i); - } - /** - * Check whether the EnumObj list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasEnumObj() { - return getEnumObjList().getNumChild() != 0; - } - /** - * Append an element to the EnumObj list. - * @param node The element to append to the EnumObj list. - * @apilevel high-level - */ - public void addEnumObj(EnumObj node) { - JastAddList<EnumObj> list = (parent == null) ? getEnumObjListNoTransform() : getEnumObjList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addEnumObjNoTransform(EnumObj node) { - JastAddList<EnumObj> list = getEnumObjListNoTransform(); - list.addChild(node); - } - /** - * Replaces the EnumObj list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setEnumObj(EnumObj node, int i) { - JastAddList<EnumObj> list = getEnumObjList(); - list.setChild(node, i); - } - /** - * Retrieves the EnumObj list. - * @return The node representing the EnumObj list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="EnumObj") - public JastAddList<EnumObj> getEnumObjList() { - JastAddList<EnumObj> list = (JastAddList<EnumObj>) getChild(1); - return list; - } - /** - * Retrieves the EnumObj list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the EnumObj list. - * @apilevel low-level - */ - public JastAddList<EnumObj> getEnumObjListNoTransform() { - return (JastAddList<EnumObj>) getChildNoTransform(1); - } - /** - * @return the element at index {@code i} in the EnumObj list without - * triggering rewrites. - */ - public EnumObj getEnumObjNoTransform(int i) { - return (EnumObj) getEnumObjListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the EnumObj list. - * @return The node representing the EnumObj list. - * @apilevel high-level - */ - public JastAddList<EnumObj> getEnumObjs() { - return getEnumObjList(); - } - /** - * Retrieves the EnumObj list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the EnumObj list. - * @apilevel low-level - */ - public JastAddList<EnumObj> getEnumObjsNoTransform() { - return getEnumObjListNoTransform(); - } - /** - * Replaces the lexeme Example. - * @param value The new value for the lexeme Example. - * @apilevel high-level - */ - public void setExample(Object value) { - tokenObject_Example = value; - } - /** @apilevel internal - */ - protected Object tokenObject_Example; - /** - * Retrieves the value for the lexeme Example. - * @return The value for the lexeme Example. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Example") - public Object getExample() { - return tokenObject_Example; - } - /** - * Replaces the lexeme ExclusiveMaximum. - * @param value The new value for the lexeme ExclusiveMaximum. - * @apilevel high-level - */ - public void setExclusiveMaximum(Boolean value) { - tokenBoolean_ExclusiveMaximum = value; - } - /** @apilevel internal - */ - protected Boolean tokenBoolean_ExclusiveMaximum; - /** - * Retrieves the value for the lexeme ExclusiveMaximum. - * @return The value for the lexeme ExclusiveMaximum. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="ExclusiveMaximum") - public Boolean getExclusiveMaximum() { - return tokenBoolean_ExclusiveMaximum; - } - /** - * Replaces the lexeme ExclusiveMinimum. - * @param value The new value for the lexeme ExclusiveMinimum. - * @apilevel high-level - */ - public void setExclusiveMinimum(Boolean value) { - tokenBoolean_ExclusiveMinimum = value; - } - /** @apilevel internal - */ - protected Boolean tokenBoolean_ExclusiveMinimum; - /** - * Retrieves the value for the lexeme ExclusiveMinimum. - * @return The value for the lexeme ExclusiveMinimum. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="ExclusiveMinimum") - public Boolean getExclusiveMinimum() { - return tokenBoolean_ExclusiveMinimum; - } - /** - * Replaces the optional node for the ExternalDocObject child. This is the <code>Opt</code> - * node containing the child ExternalDocObject, not the actual child! - * @param opt The new node to be used as the optional node for the ExternalDocObject child. - * @apilevel low-level - */ - public void setExternalDocObjectOpt(Opt<ExternalDocObject> opt) { - setChild(opt, 2); - } - /** - * Replaces the (optional) ExternalDocObject child. - * @param node The new node to be used as the ExternalDocObject child. - * @apilevel high-level - */ - public void setExternalDocObject(ExternalDocObject node) { - getExternalDocObjectOpt().setChild(node, 0); - } - /** - * Check whether the optional ExternalDocObject child exists. - * @return {@code true} if the optional ExternalDocObject child exists, {@code false} if it does not. - * @apilevel high-level - */ - public boolean hasExternalDocObject() { - return getExternalDocObjectOpt().getNumChild() != 0; - } - /** - * Retrieves the (optional) ExternalDocObject child. - * @return The ExternalDocObject child, if it exists. Returns {@code null} otherwise. - * @apilevel low-level - */ - public ExternalDocObject getExternalDocObject() { - return (ExternalDocObject) getExternalDocObjectOpt().getChild(0); - } - /** - * Retrieves the optional node for the ExternalDocObject child. This is the <code>Opt</code> node containing the child ExternalDocObject, not the actual child! - * @return The optional node for child the ExternalDocObject child. - * @apilevel low-level - */ - @ASTNodeAnnotation.OptChild(name="ExternalDocObject") - public Opt<ExternalDocObject> getExternalDocObjectOpt() { - return (Opt<ExternalDocObject>) getChild(2); - } - /** - * Retrieves the optional node for child ExternalDocObject. This is the <code>Opt</code> node containing the child ExternalDocObject, not the actual child! - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child ExternalDocObject. - * @apilevel low-level - */ - public Opt<ExternalDocObject> getExternalDocObjectOptNoTransform() { - return (Opt<ExternalDocObject>) getChildNoTransform(2); - } - /** - * Replaces the lexeme Format. - * @param value The new value for the lexeme Format. - * @apilevel high-level - */ - public void setFormat(String value) { - tokenString_Format = value; - } - /** @apilevel internal - */ - protected String tokenString_Format; - /** - * Retrieves the value for the lexeme Format. - * @return The value for the lexeme Format. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Format") - public String getFormat() { - return tokenString_Format != null ? tokenString_Format : ""; - } - /** - * Replaces the optional node for the ItemsSchema child. This is the <code>Opt</code> - * node containing the child ItemsSchema, not the actual child! - * @param opt The new node to be used as the optional node for the ItemsSchema child. - * @apilevel low-level - */ - public void setItemsSchemaOpt(Opt<ItemsSchema> opt) { - setChild(opt, 3); - } - /** - * Replaces the (optional) ItemsSchema child. - * @param node The new node to be used as the ItemsSchema child. - * @apilevel high-level - */ - public void setItemsSchema(ItemsSchema node) { - getItemsSchemaOpt().setChild(node, 0); - } - /** - * Check whether the optional ItemsSchema child exists. - * @return {@code true} if the optional ItemsSchema child exists, {@code false} if it does not. - * @apilevel high-level - */ - public boolean hasItemsSchema() { - return getItemsSchemaOpt().getNumChild() != 0; - } - /** - * Retrieves the (optional) ItemsSchema child. - * @return The ItemsSchema child, if it exists. Returns {@code null} otherwise. - * @apilevel low-level - */ - public ItemsSchema getItemsSchema() { - return (ItemsSchema) getItemsSchemaOpt().getChild(0); - } - /** - * Retrieves the optional node for the ItemsSchema child. This is the <code>Opt</code> node containing the child ItemsSchema, not the actual child! - * @return The optional node for child the ItemsSchema child. - * @apilevel low-level - */ - @ASTNodeAnnotation.OptChild(name="ItemsSchema") - public Opt<ItemsSchema> getItemsSchemaOpt() { - return (Opt<ItemsSchema>) getChild(3); - } - /** - * Retrieves the optional node for child ItemsSchema. This is the <code>Opt</code> node containing the child ItemsSchema, not the actual child! - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child ItemsSchema. - * @apilevel low-level - */ - public Opt<ItemsSchema> getItemsSchemaOptNoTransform() { - return (Opt<ItemsSchema>) getChildNoTransform(3); - } - /** - * Replaces the lexeme Maximum. - * @param value The new value for the lexeme Maximum. - * @apilevel high-level - */ - public void setMaximum(Number value) { - tokenNumber_Maximum = value; - } - /** @apilevel internal - */ - protected Number tokenNumber_Maximum; - /** - * Retrieves the value for the lexeme Maximum. - * @return The value for the lexeme Maximum. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Maximum") - public Number getMaximum() { - return tokenNumber_Maximum; - } - /** - * Replaces the lexeme Minimum. - * @param value The new value for the lexeme Minimum. - * @apilevel high-level - */ - public void setMinimum(Number value) { - tokenNumber_Minimum = value; - } - /** @apilevel internal - */ - protected Number tokenNumber_Minimum; - /** - * Retrieves the value for the lexeme Minimum. - * @return The value for the lexeme Minimum. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Minimum") - public Number getMinimum() { - return tokenNumber_Minimum; - } - /** - * Replaces the lexeme MaxItems. - * @param value The new value for the lexeme MaxItems. - * @apilevel high-level - */ - public void setMaxItems(Integer value) { - tokenInteger_MaxItems = value; - } - /** @apilevel internal - */ - protected Integer tokenInteger_MaxItems; - /** - * Retrieves the value for the lexeme MaxItems. - * @return The value for the lexeme MaxItems. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="MaxItems") - public Integer getMaxItems() { - return tokenInteger_MaxItems; - } - /** - * Replaces the lexeme MinItems. - * @param value The new value for the lexeme MinItems. - * @apilevel high-level - */ - public void setMinItems(Integer value) { - tokenInteger_MinItems = value; - } - /** @apilevel internal - */ - protected Integer tokenInteger_MinItems; - /** - * Retrieves the value for the lexeme MinItems. - * @return The value for the lexeme MinItems. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="MinItems") - public Integer getMinItems() { - return tokenInteger_MinItems; - } - /** - * Replaces the lexeme MaxLength. - * @param value The new value for the lexeme MaxLength. - * @apilevel high-level - */ - public void setMaxLength(Integer value) { - tokenInteger_MaxLength = value; - } - /** @apilevel internal - */ - protected Integer tokenInteger_MaxLength; - /** - * Retrieves the value for the lexeme MaxLength. - * @return The value for the lexeme MaxLength. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="MaxLength") - public Integer getMaxLength() { - return tokenInteger_MaxLength; - } - /** - * Replaces the lexeme MinLength. - * @param value The new value for the lexeme MinLength. - * @apilevel high-level - */ - public void setMinLength(Integer value) { - tokenInteger_MinLength = value; - } - /** @apilevel internal - */ - protected Integer tokenInteger_MinLength; - /** - * Retrieves the value for the lexeme MinLength. - * @return The value for the lexeme MinLength. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="MinLength") - public Integer getMinLength() { - return tokenInteger_MinLength; - } - /** - * Replaces the lexeme MaxProperties. - * @param value The new value for the lexeme MaxProperties. - * @apilevel high-level - */ - public void setMaxProperties(Integer value) { - tokenInteger_MaxProperties = value; - } - /** @apilevel internal - */ - protected Integer tokenInteger_MaxProperties; - /** - * Retrieves the value for the lexeme MaxProperties. - * @return The value for the lexeme MaxProperties. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="MaxProperties") - public Integer getMaxProperties() { - return tokenInteger_MaxProperties; - } - /** - * Replaces the lexeme MinProperties. - * @param value The new value for the lexeme MinProperties. - * @apilevel high-level - */ - public void setMinProperties(Integer value) { - tokenInteger_MinProperties = value; - } - /** @apilevel internal - */ - protected Integer tokenInteger_MinProperties; - /** - * Retrieves the value for the lexeme MinProperties. - * @return The value for the lexeme MinProperties. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="MinProperties") - public Integer getMinProperties() { - return tokenInteger_MinProperties; - } - /** - * Replaces the lexeme MultipleOf. - * @param value The new value for the lexeme MultipleOf. - * @apilevel high-level - */ - public void setMultipleOf(Number value) { - tokenNumber_MultipleOf = value; - } - /** @apilevel internal - */ - protected Number tokenNumber_MultipleOf; - /** - * Retrieves the value for the lexeme MultipleOf. - * @return The value for the lexeme MultipleOf. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="MultipleOf") - public Number getMultipleOf() { - return tokenNumber_MultipleOf; - } - /** - * Replaces the optional node for the NotSchema child. This is the <code>Opt</code> - * node containing the child NotSchema, not the actual child! - * @param opt The new node to be used as the optional node for the NotSchema child. - * @apilevel low-level - */ - public void setNotSchemaOpt(Opt<NotSchema> opt) { - setChild(opt, 4); - } - /** - * Replaces the (optional) NotSchema child. - * @param node The new node to be used as the NotSchema child. - * @apilevel high-level - */ - public void setNotSchema(NotSchema node) { - getNotSchemaOpt().setChild(node, 0); - } - /** - * Check whether the optional NotSchema child exists. - * @return {@code true} if the optional NotSchema child exists, {@code false} if it does not. - * @apilevel high-level - */ - public boolean hasNotSchema() { - return getNotSchemaOpt().getNumChild() != 0; - } - /** - * Retrieves the (optional) NotSchema child. - * @return The NotSchema child, if it exists. Returns {@code null} otherwise. - * @apilevel low-level - */ - public NotSchema getNotSchema() { - return (NotSchema) getNotSchemaOpt().getChild(0); - } - /** - * Retrieves the optional node for the NotSchema child. This is the <code>Opt</code> node containing the child NotSchema, not the actual child! - * @return The optional node for child the NotSchema child. - * @apilevel low-level - */ - @ASTNodeAnnotation.OptChild(name="NotSchema") - public Opt<NotSchema> getNotSchemaOpt() { - return (Opt<NotSchema>) getChild(4); - } - /** - * Retrieves the optional node for child NotSchema. This is the <code>Opt</code> node containing the child NotSchema, not the actual child! - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child NotSchema. - * @apilevel low-level - */ - public Opt<NotSchema> getNotSchemaOptNoTransform() { - return (Opt<NotSchema>) getChildNoTransform(4); - } - /** - * Replaces the lexeme Nullable. - * @param value The new value for the lexeme Nullable. - * @apilevel high-level - */ - public void setNullable(Boolean value) { - tokenBoolean_Nullable = value; - } - /** @apilevel internal - */ - protected Boolean tokenBoolean_Nullable; - /** - * Retrieves the value for the lexeme Nullable. - * @return The value for the lexeme Nullable. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Nullable") - public Boolean getNullable() { - return tokenBoolean_Nullable; - } - /** - * Replaces the lexeme Pattern. - * @param value The new value for the lexeme Pattern. - * @apilevel high-level - */ - public void setPattern(String value) { - tokenString_Pattern = value; - } - /** @apilevel internal - */ - protected String tokenString_Pattern; - /** - * Retrieves the value for the lexeme Pattern. - * @return The value for the lexeme Pattern. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Pattern") - public String getPattern() { - return tokenString_Pattern != null ? tokenString_Pattern : ""; - } - /** - * Replaces the PropertyItem list. - * @param list The new list node to be used as the PropertyItem list. - * @apilevel high-level - */ - public void setPropertyItemList(JastAddList<PropertyItem> list) { - setChild(list, 5); - } - /** - * Retrieves the number of children in the PropertyItem list. - * @return Number of children in the PropertyItem list. - * @apilevel high-level - */ - public int getNumPropertyItem() { - return getPropertyItemList().getNumChild(); - } - /** - * Retrieves the number of children in the PropertyItem list. - * Calling this method will not trigger rewrites. - * @return Number of children in the PropertyItem list. - * @apilevel low-level - */ - public int getNumPropertyItemNoTransform() { - return getPropertyItemListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the PropertyItem list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the PropertyItem list. - * @apilevel high-level - */ - public PropertyItem getPropertyItem(int i) { - return (PropertyItem) getPropertyItemList().getChild(i); - } - /** - * Check whether the PropertyItem list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasPropertyItem() { - return getPropertyItemList().getNumChild() != 0; - } - /** - * Append an element to the PropertyItem list. - * @param node The element to append to the PropertyItem list. - * @apilevel high-level - */ - public void addPropertyItem(PropertyItem node) { - JastAddList<PropertyItem> list = (parent == null) ? getPropertyItemListNoTransform() : getPropertyItemList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addPropertyItemNoTransform(PropertyItem node) { - JastAddList<PropertyItem> list = getPropertyItemListNoTransform(); - list.addChild(node); - } - /** - * Replaces the PropertyItem list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setPropertyItem(PropertyItem node, int i) { - JastAddList<PropertyItem> list = getPropertyItemList(); - list.setChild(node, i); - } - /** - * Retrieves the PropertyItem list. - * @return The node representing the PropertyItem list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="PropertyItem") - public JastAddList<PropertyItem> getPropertyItemList() { - JastAddList<PropertyItem> list = (JastAddList<PropertyItem>) getChild(5); - return list; - } - /** - * Retrieves the PropertyItem list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the PropertyItem list. - * @apilevel low-level - */ - public JastAddList<PropertyItem> getPropertyItemListNoTransform() { - return (JastAddList<PropertyItem>) getChildNoTransform(5); - } - /** - * @return the element at index {@code i} in the PropertyItem list without - * triggering rewrites. - */ - public PropertyItem getPropertyItemNoTransform(int i) { - return (PropertyItem) getPropertyItemListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the PropertyItem list. - * @return The node representing the PropertyItem list. - * @apilevel high-level - */ - public JastAddList<PropertyItem> getPropertyItems() { - return getPropertyItemList(); - } - /** - * Retrieves the PropertyItem list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the PropertyItem list. - * @apilevel low-level - */ - public JastAddList<PropertyItem> getPropertyItemsNoTransform() { - return getPropertyItemListNoTransform(); - } - /** - * Replaces the RequiredField list. - * @param list The new list node to be used as the RequiredField list. - * @apilevel high-level - */ - public void setRequiredFieldList(JastAddList<RequiredField> list) { - setChild(list, 6); - } - /** - * Retrieves the number of children in the RequiredField list. - * @return Number of children in the RequiredField list. - * @apilevel high-level - */ - public int getNumRequiredField() { - return getRequiredFieldList().getNumChild(); - } - /** - * Retrieves the number of children in the RequiredField list. - * Calling this method will not trigger rewrites. - * @return Number of children in the RequiredField list. - * @apilevel low-level - */ - public int getNumRequiredFieldNoTransform() { - return getRequiredFieldListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the RequiredField list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the RequiredField list. - * @apilevel high-level - */ - public RequiredField getRequiredField(int i) { - return (RequiredField) getRequiredFieldList().getChild(i); - } - /** - * Check whether the RequiredField list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasRequiredField() { - return getRequiredFieldList().getNumChild() != 0; - } - /** - * Append an element to the RequiredField list. - * @param node The element to append to the RequiredField list. - * @apilevel high-level - */ - public void addRequiredField(RequiredField node) { - JastAddList<RequiredField> list = (parent == null) ? getRequiredFieldListNoTransform() : getRequiredFieldList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addRequiredFieldNoTransform(RequiredField node) { - JastAddList<RequiredField> list = getRequiredFieldListNoTransform(); - list.addChild(node); - } - /** - * Replaces the RequiredField list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setRequiredField(RequiredField node, int i) { - JastAddList<RequiredField> list = getRequiredFieldList(); - list.setChild(node, i); - } - /** - * Retrieves the RequiredField list. - * @return The node representing the RequiredField list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="RequiredField") - public JastAddList<RequiredField> getRequiredFieldList() { - JastAddList<RequiredField> list = (JastAddList<RequiredField>) getChild(6); - return list; - } - /** - * Retrieves the RequiredField list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the RequiredField list. - * @apilevel low-level - */ - public JastAddList<RequiredField> getRequiredFieldListNoTransform() { - return (JastAddList<RequiredField>) getChildNoTransform(6); - } - /** - * @return the element at index {@code i} in the RequiredField list without - * triggering rewrites. - */ - public RequiredField getRequiredFieldNoTransform(int i) { - return (RequiredField) getRequiredFieldListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the RequiredField list. - * @return The node representing the RequiredField list. - * @apilevel high-level - */ - public JastAddList<RequiredField> getRequiredFields() { - return getRequiredFieldList(); - } - /** - * Retrieves the RequiredField list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the RequiredField list. - * @apilevel low-level - */ - public JastAddList<RequiredField> getRequiredFieldsNoTransform() { - return getRequiredFieldListNoTransform(); - } - /** - * Replaces the AllOfSchema list. - * @param list The new list node to be used as the AllOfSchema list. - * @apilevel high-level - */ - public void setAllOfSchemaList(JastAddList<AllOfSchema> list) { - setChild(list, 7); - } - /** - * Retrieves the number of children in the AllOfSchema list. - * @return Number of children in the AllOfSchema list. - * @apilevel high-level - */ - public int getNumAllOfSchema() { - return getAllOfSchemaList().getNumChild(); - } - /** - * Retrieves the number of children in the AllOfSchema list. - * Calling this method will not trigger rewrites. - * @return Number of children in the AllOfSchema list. - * @apilevel low-level - */ - public int getNumAllOfSchemaNoTransform() { - return getAllOfSchemaListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the AllOfSchema list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the AllOfSchema list. - * @apilevel high-level - */ - public AllOfSchema getAllOfSchema(int i) { - return (AllOfSchema) getAllOfSchemaList().getChild(i); - } - /** - * Check whether the AllOfSchema list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasAllOfSchema() { - return getAllOfSchemaList().getNumChild() != 0; - } - /** - * Append an element to the AllOfSchema list. - * @param node The element to append to the AllOfSchema list. - * @apilevel high-level - */ - public void addAllOfSchema(AllOfSchema node) { - JastAddList<AllOfSchema> list = (parent == null) ? getAllOfSchemaListNoTransform() : getAllOfSchemaList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addAllOfSchemaNoTransform(AllOfSchema node) { - JastAddList<AllOfSchema> list = getAllOfSchemaListNoTransform(); - list.addChild(node); - } - /** - * Replaces the AllOfSchema list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setAllOfSchema(AllOfSchema node, int i) { - JastAddList<AllOfSchema> list = getAllOfSchemaList(); - list.setChild(node, i); - } - /** - * Retrieves the AllOfSchema list. - * @return The node representing the AllOfSchema list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="AllOfSchema") - public JastAddList<AllOfSchema> getAllOfSchemaList() { - JastAddList<AllOfSchema> list = (JastAddList<AllOfSchema>) getChild(7); - return list; - } - /** - * Retrieves the AllOfSchema list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the AllOfSchema list. - * @apilevel low-level - */ - public JastAddList<AllOfSchema> getAllOfSchemaListNoTransform() { - return (JastAddList<AllOfSchema>) getChildNoTransform(7); - } - /** - * @return the element at index {@code i} in the AllOfSchema list without - * triggering rewrites. - */ - public AllOfSchema getAllOfSchemaNoTransform(int i) { - return (AllOfSchema) getAllOfSchemaListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the AllOfSchema list. - * @return The node representing the AllOfSchema list. - * @apilevel high-level - */ - public JastAddList<AllOfSchema> getAllOfSchemas() { - return getAllOfSchemaList(); - } - /** - * Retrieves the AllOfSchema list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the AllOfSchema list. - * @apilevel low-level - */ - public JastAddList<AllOfSchema> getAllOfSchemasNoTransform() { - return getAllOfSchemaListNoTransform(); - } - /** - * Replaces the AnyOfSchema list. - * @param list The new list node to be used as the AnyOfSchema list. - * @apilevel high-level - */ - public void setAnyOfSchemaList(JastAddList<AnyOfSchema> list) { - setChild(list, 8); - } - /** - * Retrieves the number of children in the AnyOfSchema list. - * @return Number of children in the AnyOfSchema list. - * @apilevel high-level - */ - public int getNumAnyOfSchema() { - return getAnyOfSchemaList().getNumChild(); - } - /** - * Retrieves the number of children in the AnyOfSchema list. - * Calling this method will not trigger rewrites. - * @return Number of children in the AnyOfSchema list. - * @apilevel low-level - */ - public int getNumAnyOfSchemaNoTransform() { - return getAnyOfSchemaListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the AnyOfSchema list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the AnyOfSchema list. - * @apilevel high-level - */ - public AnyOfSchema getAnyOfSchema(int i) { - return (AnyOfSchema) getAnyOfSchemaList().getChild(i); - } - /** - * Check whether the AnyOfSchema list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasAnyOfSchema() { - return getAnyOfSchemaList().getNumChild() != 0; - } - /** - * Append an element to the AnyOfSchema list. - * @param node The element to append to the AnyOfSchema list. - * @apilevel high-level - */ - public void addAnyOfSchema(AnyOfSchema node) { - JastAddList<AnyOfSchema> list = (parent == null) ? getAnyOfSchemaListNoTransform() : getAnyOfSchemaList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addAnyOfSchemaNoTransform(AnyOfSchema node) { - JastAddList<AnyOfSchema> list = getAnyOfSchemaListNoTransform(); - list.addChild(node); - } - /** - * Replaces the AnyOfSchema list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setAnyOfSchema(AnyOfSchema node, int i) { - JastAddList<AnyOfSchema> list = getAnyOfSchemaList(); - list.setChild(node, i); - } - /** - * Retrieves the AnyOfSchema list. - * @return The node representing the AnyOfSchema list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="AnyOfSchema") - public JastAddList<AnyOfSchema> getAnyOfSchemaList() { - JastAddList<AnyOfSchema> list = (JastAddList<AnyOfSchema>) getChild(8); - return list; - } - /** - * Retrieves the AnyOfSchema list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the AnyOfSchema list. - * @apilevel low-level - */ - public JastAddList<AnyOfSchema> getAnyOfSchemaListNoTransform() { - return (JastAddList<AnyOfSchema>) getChildNoTransform(8); - } - /** - * @return the element at index {@code i} in the AnyOfSchema list without - * triggering rewrites. - */ - public AnyOfSchema getAnyOfSchemaNoTransform(int i) { - return (AnyOfSchema) getAnyOfSchemaListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the AnyOfSchema list. - * @return The node representing the AnyOfSchema list. - * @apilevel high-level - */ - public JastAddList<AnyOfSchema> getAnyOfSchemas() { - return getAnyOfSchemaList(); - } - /** - * Retrieves the AnyOfSchema list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the AnyOfSchema list. - * @apilevel low-level - */ - public JastAddList<AnyOfSchema> getAnyOfSchemasNoTransform() { - return getAnyOfSchemaListNoTransform(); - } - /** - * Replaces the OneOfSchema list. - * @param list The new list node to be used as the OneOfSchema list. - * @apilevel high-level - */ - public void setOneOfSchemaList(JastAddList<OneOfSchema> list) { - setChild(list, 9); - } - /** - * Retrieves the number of children in the OneOfSchema list. - * @return Number of children in the OneOfSchema list. - * @apilevel high-level - */ - public int getNumOneOfSchema() { - return getOneOfSchemaList().getNumChild(); - } - /** - * Retrieves the number of children in the OneOfSchema list. - * Calling this method will not trigger rewrites. - * @return Number of children in the OneOfSchema list. - * @apilevel low-level - */ - public int getNumOneOfSchemaNoTransform() { - return getOneOfSchemaListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the OneOfSchema list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the OneOfSchema list. - * @apilevel high-level - */ - public OneOfSchema getOneOfSchema(int i) { - return (OneOfSchema) getOneOfSchemaList().getChild(i); - } - /** - * Check whether the OneOfSchema list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasOneOfSchema() { - return getOneOfSchemaList().getNumChild() != 0; - } - /** - * Append an element to the OneOfSchema list. - * @param node The element to append to the OneOfSchema list. - * @apilevel high-level - */ - public void addOneOfSchema(OneOfSchema node) { - JastAddList<OneOfSchema> list = (parent == null) ? getOneOfSchemaListNoTransform() : getOneOfSchemaList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addOneOfSchemaNoTransform(OneOfSchema node) { - JastAddList<OneOfSchema> list = getOneOfSchemaListNoTransform(); - list.addChild(node); - } - /** - * Replaces the OneOfSchema list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setOneOfSchema(OneOfSchema node, int i) { - JastAddList<OneOfSchema> list = getOneOfSchemaList(); - list.setChild(node, i); - } - /** - * Retrieves the OneOfSchema list. - * @return The node representing the OneOfSchema list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="OneOfSchema") - public JastAddList<OneOfSchema> getOneOfSchemaList() { - JastAddList<OneOfSchema> list = (JastAddList<OneOfSchema>) getChild(9); - return list; - } - /** - * Retrieves the OneOfSchema list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the OneOfSchema list. - * @apilevel low-level - */ - public JastAddList<OneOfSchema> getOneOfSchemaListNoTransform() { - return (JastAddList<OneOfSchema>) getChildNoTransform(9); - } - /** - * @return the element at index {@code i} in the OneOfSchema list without - * triggering rewrites. - */ - public OneOfSchema getOneOfSchemaNoTransform(int i) { - return (OneOfSchema) getOneOfSchemaListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the OneOfSchema list. - * @return The node representing the OneOfSchema list. - * @apilevel high-level - */ - public JastAddList<OneOfSchema> getOneOfSchemas() { - return getOneOfSchemaList(); - } - /** - * Retrieves the OneOfSchema list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the OneOfSchema list. - * @apilevel low-level - */ - public JastAddList<OneOfSchema> getOneOfSchemasNoTransform() { - return getOneOfSchemaListNoTransform(); - } - /** - * Replaces the lexeme ReadOnly. - * @param value The new value for the lexeme ReadOnly. - * @apilevel high-level - */ - public void setReadOnly(Boolean value) { - tokenBoolean_ReadOnly = value; - } - /** @apilevel internal - */ - protected Boolean tokenBoolean_ReadOnly; - /** - * Retrieves the value for the lexeme ReadOnly. - * @return The value for the lexeme ReadOnly. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="ReadOnly") - public Boolean getReadOnly() { - return tokenBoolean_ReadOnly; - } - /** - * Replaces the lexeme WriteOnly. - * @param value The new value for the lexeme WriteOnly. - * @apilevel high-level - */ - public void setWriteOnly(Boolean value) { - tokenBoolean_WriteOnly = value; - } - /** @apilevel internal - */ - protected Boolean tokenBoolean_WriteOnly; - /** - * Retrieves the value for the lexeme WriteOnly. - * @return The value for the lexeme WriteOnly. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="WriteOnly") - public Boolean getWriteOnly() { - return tokenBoolean_WriteOnly; - } - /** - * Replaces the lexeme Type. - * @param value The new value for the lexeme Type. - * @apilevel high-level - */ - public void setType(String value) { - tokenString_Type = value; - } - /** @apilevel internal - */ - protected String tokenString_Type; - /** - * Retrieves the value for the lexeme Type. - * @return The value for the lexeme Type. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Type") - public String getType() { - return tokenString_Type != null ? tokenString_Type : ""; - } - /** - * Replaces the lexeme Title. - * @param value The new value for the lexeme Title. - * @apilevel high-level - */ - public void setTitle(String value) { - tokenString_Title = value; - } - /** @apilevel internal - */ - protected String tokenString_Title; - /** - * Retrieves the value for the lexeme Title. - * @return The value for the lexeme Title. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Title") - public String getTitle() { - return tokenString_Title != null ? tokenString_Title : ""; - } - /** - * Replaces the lexeme UniqueItems. - * @param value The new value for the lexeme UniqueItems. - * @apilevel high-level - */ - public void setUniqueItems(Boolean value) { - tokenBoolean_UniqueItems = value; - } - /** @apilevel internal - */ - protected Boolean tokenBoolean_UniqueItems; - /** - * Retrieves the value for the lexeme UniqueItems. - * @return The value for the lexeme UniqueItems. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="UniqueItems") - public Boolean getUniqueItems() { - return tokenBoolean_UniqueItems; - } - /** - * Replaces the optional node for the XmlObject child. This is the <code>Opt</code> - * node containing the child XmlObject, not the actual child! - * @param opt The new node to be used as the optional node for the XmlObject child. - * @apilevel low-level - */ - public void setXmlObjectOpt(Opt<XmlObject> opt) { - setChild(opt, 10); - } - /** - * Replaces the (optional) XmlObject child. - * @param node The new node to be used as the XmlObject child. - * @apilevel high-level - */ - public void setXmlObject(XmlObject node) { - getXmlObjectOpt().setChild(node, 0); - } - /** - * Check whether the optional XmlObject child exists. - * @return {@code true} if the optional XmlObject child exists, {@code false} if it does not. - * @apilevel high-level - */ - public boolean hasXmlObject() { - return getXmlObjectOpt().getNumChild() != 0; - } - /** - * Retrieves the (optional) XmlObject child. - * @return The XmlObject child, if it exists. Returns {@code null} otherwise. - * @apilevel low-level - */ - public XmlObject getXmlObject() { - return (XmlObject) getXmlObjectOpt().getChild(0); - } - /** - * Retrieves the optional node for the XmlObject child. This is the <code>Opt</code> node containing the child XmlObject, not the actual child! - * @return The optional node for child the XmlObject child. - * @apilevel low-level - */ - @ASTNodeAnnotation.OptChild(name="XmlObject") - public Opt<XmlObject> getXmlObjectOpt() { - return (Opt<XmlObject>) getChild(10); - } - /** - * Retrieves the optional node for child XmlObject. This is the <code>Opt</code> node containing the child XmlObject, not the actual child! - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child XmlObject. - * @apilevel low-level - */ - public Opt<XmlObject> getXmlObjectOptNoTransform() { - return (Opt<XmlObject>) getChildNoTransform(10); - } - /** - * Replaces the lexeme Ref. - * @param value The new value for the lexeme Ref. - * @apilevel high-level - */ - public void setRef(String value) { - tokenString_Ref = value; - } - /** @apilevel internal - */ - protected String tokenString_Ref; - /** - * Retrieves the value for the lexeme Ref. - * @return The value for the lexeme Ref. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Ref") - public String getRef() { - return tokenString_Ref != null ? tokenString_Ref : ""; - } - /** - * Replaces the Extension list. - * @param list The new list node to be used as the Extension list. - * @apilevel high-level - */ - public void setExtensionList(JastAddList<Extension> list) { - setChild(list, 11); - } - /** - * Retrieves the number of children in the Extension list. - * @return Number of children in the Extension list. - * @apilevel high-level - */ - public int getNumExtension() { - return getExtensionList().getNumChild(); - } - /** - * Retrieves the number of children in the Extension list. - * Calling this method will not trigger rewrites. - * @return Number of children in the Extension list. - * @apilevel low-level - */ - public int getNumExtensionNoTransform() { - return getExtensionListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the Extension list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the Extension list. - * @apilevel high-level - */ - public Extension getExtension(int i) { - return (Extension) getExtensionList().getChild(i); - } - /** - * Check whether the Extension list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasExtension() { - return getExtensionList().getNumChild() != 0; - } - /** - * Append an element to the Extension list. - * @param node The element to append to the Extension list. - * @apilevel high-level - */ - public void addExtension(Extension node) { - JastAddList<Extension> list = (parent == null) ? getExtensionListNoTransform() : getExtensionList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addExtensionNoTransform(Extension node) { - JastAddList<Extension> list = getExtensionListNoTransform(); - list.addChild(node); - } - /** - * Replaces the Extension list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setExtension(Extension node, int i) { - JastAddList<Extension> list = getExtensionList(); - list.setChild(node, i); - } - /** - * Retrieves the Extension list. - * @return The node representing the Extension list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="Extension") - public JastAddList<Extension> getExtensionList() { - JastAddList<Extension> list = (JastAddList<Extension>) getChild(11); - return list; - } - /** - * Retrieves the Extension list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the Extension list. - * @apilevel low-level - */ - public JastAddList<Extension> getExtensionListNoTransform() { - return (JastAddList<Extension>) getChildNoTransform(11); - } - /** - * @return the element at index {@code i} in the Extension list without - * triggering rewrites. - */ - public Extension getExtensionNoTransform(int i) { - return (Extension) getExtensionListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the Extension list. - * @return The node representing the Extension list. - * @apilevel high-level - */ - public JastAddList<Extension> getExtensions() { - return getExtensionList(); - } - /** - * Retrieves the Extension list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the Extension list. - * @apilevel low-level - */ - public JastAddList<Extension> getExtensionsNoTransform() { - return getExtensionListNoTransform(); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/SchemaTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/SchemaTuple.java deleted file mode 100644 index 95c659eb64bcb97fd3adf0ae2996883147e1fac4..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/SchemaTuple.java +++ /dev/null @@ -1,214 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:23 - * @astdecl SchemaTuple : ASTNode ::= <Key:String> SchemaObject; - * @production SchemaTuple : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component">{@link SchemaObject}</span>; - - */ -public class SchemaTuple extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public SchemaTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"Key", "SchemaObject"}, - type = {"String", "SchemaObject"}, - kind = {"Token", "Child"} - ) - public SchemaTuple(String p0, SchemaObject p1) { - setKey(p0); - setChild(p1, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:23 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:29 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:33 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:37 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:41 - */ - public SchemaTuple clone() throws CloneNotSupportedException { - SchemaTuple node = (SchemaTuple) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:46 - */ - public SchemaTuple copy() { - try { - SchemaTuple node = (SchemaTuple) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:65 - */ - @Deprecated - public SchemaTuple fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:75 - */ - public SchemaTuple treeCopyNoTransform() { - SchemaTuple tree = (SchemaTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:95 - */ - public SchemaTuple treeCopy() { - SchemaTuple tree = (SchemaTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:109 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Key == ((SchemaTuple) node).tokenString_Key); - } - /** - * Replaces the lexeme Key. - * @param value The new value for the lexeme Key. - * @apilevel high-level - */ - public void setKey(String value) { - tokenString_Key = value; - } - /** @apilevel internal - */ - protected String tokenString_Key; - /** - * Retrieves the value for the lexeme Key. - * @return The value for the lexeme Key. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Key") - public String getKey() { - return tokenString_Key != null ? tokenString_Key : ""; - } - /** - * Replaces the SchemaObject child. - * @param node The new node to replace the SchemaObject child. - * @apilevel high-level - */ - public void setSchemaObject(SchemaObject node) { - setChild(node, 0); - } - /** - * Retrieves the SchemaObject child. - * @return The current node used as the SchemaObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="SchemaObject") - public SchemaObject getSchemaObject() { - return (SchemaObject) getChild(0); - } - /** - * Retrieves the SchemaObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the SchemaObject child. - * @apilevel low-level - */ - public SchemaObject getSchemaObjectNoTransform() { - return (SchemaObject) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ScopesTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ScopesTuple.java deleted file mode 100644 index d9612f3caacbf642ef42fc07015bba2f308b7f48..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ScopesTuple.java +++ /dev/null @@ -1,207 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:121 - * @astdecl ScopesTuple : ASTNode ::= <ScopesKey:String> <ScopesValue:String>; - * @production ScopesTuple : {@link ASTNode} ::= <span class="component"><ScopesKey:String></span> <span class="component"><ScopesValue:String></span>; - - */ -public class ScopesTuple extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public ScopesTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - } - /** - * @declaredat ASTNode:12 - */ - @ASTNodeAnnotation.Constructor( - name = {"ScopesKey", "ScopesValue"}, - type = {"String", "String"}, - kind = {"Token", "Token"} - ) - public ScopesTuple(String p0, String p1) { - setScopesKey(p0); - setScopesValue(p1); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 0; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public ScopesTuple clone() throws CloneNotSupportedException { - ScopesTuple node = (ScopesTuple) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public ScopesTuple copy() { - try { - ScopesTuple node = (ScopesTuple) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public ScopesTuple fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public ScopesTuple treeCopyNoTransform() { - ScopesTuple tree = (ScopesTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public ScopesTuple treeCopy() { - ScopesTuple tree = (ScopesTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_ScopesKey == ((ScopesTuple) node).tokenString_ScopesKey) && (tokenString_ScopesValue == ((ScopesTuple) node).tokenString_ScopesValue); - } - /** - * Replaces the lexeme ScopesKey. - * @param value The new value for the lexeme ScopesKey. - * @apilevel high-level - */ - public void setScopesKey(String value) { - tokenString_ScopesKey = value; - } - /** @apilevel internal - */ - protected String tokenString_ScopesKey; - /** - * Retrieves the value for the lexeme ScopesKey. - * @return The value for the lexeme ScopesKey. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="ScopesKey") - public String getScopesKey() { - return tokenString_ScopesKey != null ? tokenString_ScopesKey : ""; - } - /** - * Replaces the lexeme ScopesValue. - * @param value The new value for the lexeme ScopesValue. - * @apilevel high-level - */ - public void setScopesValue(String value) { - tokenString_ScopesValue = value; - } - /** @apilevel internal - */ - protected String tokenString_ScopesValue; - /** - * Retrieves the value for the lexeme ScopesValue. - * @return The value for the lexeme ScopesValue. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="ScopesValue") - public String getScopesValue() { - return tokenString_ScopesValue != null ? tokenString_ScopesValue : ""; - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/SecurityRequirementObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/SecurityRequirementObject.java deleted file mode 100644 index b1c614c4d52497bafc39ce6d81fc116878e25b15..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/SecurityRequirementObject.java +++ /dev/null @@ -1,316 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:124 - * @astdecl SecurityRequirementObject : ASTNode ::= SecurityRequirementTuple*; - * @production SecurityRequirementObject : {@link ASTNode} ::= <span class="component">{@link SecurityRequirementTuple}*</span>; - - */ -public class SecurityRequirementObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:847 - */ - public static SecurityRequirement composeSecurityRequirement (SecurityRequirementObject securityRequirementObject){ - SecurityRequirement securityRequirement = new SecurityRequirement(); - - if( securityRequirementObject.getNumSecurityRequirementTuple() != 0 ){ - Map<String, List<String>> requirements = new HashMap<>(); - for( SecurityRequirementTuple t : securityRequirementObject.getSecurityRequirementTuples() ){ - List<String> values = new ArrayList<>(); - for( SecurityRequirementValue v : t.getSecurityRequirementValues() ) - values.add(v.getValue()); - requirements.put(t.getName(), values); - } - securityRequirement.setRequirements(requirements); - } - - return securityRequirement; - } - /** - * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:862 - */ - public static SecurityRequirementObject parseSecurityRequirement(SecurityRequirement securityRequirement){ - SecurityRequirementObject securityRequirementObject = new SecurityRequirementObject(); - - if( securityRequirement.getRequirements() != null ){ - for( String key : securityRequirement.getRequirements().keySet() ){ - JastAddList<SecurityRequirementValue> values = new JastAddList<>(); - for( String v : securityRequirement.getRequirement(key) ) - values.add(new SecurityRequirementValue(v)); - securityRequirementObject.addSecurityRequirementTuple(new SecurityRequirementTuple(key, values)); - } - } - - return securityRequirementObject; - } - /** - * @declaredat ASTNode:1 - */ - public SecurityRequirementObject() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - setChild(new JastAddList(), 0); - } - /** - * @declaredat ASTNode:14 - */ - @ASTNodeAnnotation.Constructor( - name = {"SecurityRequirementTuple"}, - type = {"JastAddList<SecurityRequirementTuple>"}, - kind = {"List"} - ) - public SecurityRequirementObject(JastAddList<SecurityRequirementTuple> p0) { - setChild(p0, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:23 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:29 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:33 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:37 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:41 - */ - public SecurityRequirementObject clone() throws CloneNotSupportedException { - SecurityRequirementObject node = (SecurityRequirementObject) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:46 - */ - public SecurityRequirementObject copy() { - try { - SecurityRequirementObject node = (SecurityRequirementObject) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:65 - */ - @Deprecated - public SecurityRequirementObject fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:75 - */ - public SecurityRequirementObject treeCopyNoTransform() { - SecurityRequirementObject tree = (SecurityRequirementObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:95 - */ - public SecurityRequirementObject treeCopy() { - SecurityRequirementObject tree = (SecurityRequirementObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:109 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node); - } - /** - * Replaces the SecurityRequirementTuple list. - * @param list The new list node to be used as the SecurityRequirementTuple list. - * @apilevel high-level - */ - public void setSecurityRequirementTupleList(JastAddList<SecurityRequirementTuple> list) { - setChild(list, 0); - } - /** - * Retrieves the number of children in the SecurityRequirementTuple list. - * @return Number of children in the SecurityRequirementTuple list. - * @apilevel high-level - */ - public int getNumSecurityRequirementTuple() { - return getSecurityRequirementTupleList().getNumChild(); - } - /** - * Retrieves the number of children in the SecurityRequirementTuple list. - * Calling this method will not trigger rewrites. - * @return Number of children in the SecurityRequirementTuple list. - * @apilevel low-level - */ - public int getNumSecurityRequirementTupleNoTransform() { - return getSecurityRequirementTupleListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the SecurityRequirementTuple list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the SecurityRequirementTuple list. - * @apilevel high-level - */ - public SecurityRequirementTuple getSecurityRequirementTuple(int i) { - return (SecurityRequirementTuple) getSecurityRequirementTupleList().getChild(i); - } - /** - * Check whether the SecurityRequirementTuple list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasSecurityRequirementTuple() { - return getSecurityRequirementTupleList().getNumChild() != 0; - } - /** - * Append an element to the SecurityRequirementTuple list. - * @param node The element to append to the SecurityRequirementTuple list. - * @apilevel high-level - */ - public void addSecurityRequirementTuple(SecurityRequirementTuple node) { - JastAddList<SecurityRequirementTuple> list = (parent == null) ? getSecurityRequirementTupleListNoTransform() : getSecurityRequirementTupleList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addSecurityRequirementTupleNoTransform(SecurityRequirementTuple node) { - JastAddList<SecurityRequirementTuple> list = getSecurityRequirementTupleListNoTransform(); - list.addChild(node); - } - /** - * Replaces the SecurityRequirementTuple list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setSecurityRequirementTuple(SecurityRequirementTuple node, int i) { - JastAddList<SecurityRequirementTuple> list = getSecurityRequirementTupleList(); - list.setChild(node, i); - } - /** - * Retrieves the SecurityRequirementTuple list. - * @return The node representing the SecurityRequirementTuple list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="SecurityRequirementTuple") - public JastAddList<SecurityRequirementTuple> getSecurityRequirementTupleList() { - JastAddList<SecurityRequirementTuple> list = (JastAddList<SecurityRequirementTuple>) getChild(0); - return list; - } - /** - * Retrieves the SecurityRequirementTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the SecurityRequirementTuple list. - * @apilevel low-level - */ - public JastAddList<SecurityRequirementTuple> getSecurityRequirementTupleListNoTransform() { - return (JastAddList<SecurityRequirementTuple>) getChildNoTransform(0); - } - /** - * @return the element at index {@code i} in the SecurityRequirementTuple list without - * triggering rewrites. - */ - public SecurityRequirementTuple getSecurityRequirementTupleNoTransform(int i) { - return (SecurityRequirementTuple) getSecurityRequirementTupleListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the SecurityRequirementTuple list. - * @return The node representing the SecurityRequirementTuple list. - * @apilevel high-level - */ - public JastAddList<SecurityRequirementTuple> getSecurityRequirementTuples() { - return getSecurityRequirementTupleList(); - } - /** - * Retrieves the SecurityRequirementTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the SecurityRequirementTuple list. - * @apilevel low-level - */ - public JastAddList<SecurityRequirementTuple> getSecurityRequirementTuplesNoTransform() { - return getSecurityRequirementTupleListNoTransform(); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/SecurityRequirementTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/SecurityRequirementTuple.java deleted file mode 100644 index 357e1b8d5fe9b6268f4fb58809075099fe0e257e..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/SecurityRequirementTuple.java +++ /dev/null @@ -1,299 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:125 - * @astdecl SecurityRequirementTuple : ASTNode ::= <Name:String> SecurityRequirementValue*; - * @production SecurityRequirementTuple : {@link ASTNode} ::= <span class="component"><Name:String></span> <span class="component">{@link SecurityRequirementValue}*</span>; - - */ -public class SecurityRequirementTuple extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public SecurityRequirementTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - setChild(new JastAddList(), 0); - } - /** - * @declaredat ASTNode:14 - */ - @ASTNodeAnnotation.Constructor( - name = {"Name", "SecurityRequirementValue"}, - type = {"String", "JastAddList<SecurityRequirementValue>"}, - kind = {"Token", "List"} - ) - public SecurityRequirementTuple(String p0, JastAddList<SecurityRequirementValue> p1) { - setName(p0); - setChild(p1, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:24 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:30 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:34 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:38 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:42 - */ - public SecurityRequirementTuple clone() throws CloneNotSupportedException { - SecurityRequirementTuple node = (SecurityRequirementTuple) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:47 - */ - public SecurityRequirementTuple copy() { - try { - SecurityRequirementTuple node = (SecurityRequirementTuple) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:66 - */ - @Deprecated - public SecurityRequirementTuple fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:76 - */ - public SecurityRequirementTuple treeCopyNoTransform() { - SecurityRequirementTuple tree = (SecurityRequirementTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:96 - */ - public SecurityRequirementTuple treeCopy() { - SecurityRequirementTuple tree = (SecurityRequirementTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:110 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Name == ((SecurityRequirementTuple) node).tokenString_Name); - } - /** - * Replaces the lexeme Name. - * @param value The new value for the lexeme Name. - * @apilevel high-level - */ - public void setName(String value) { - tokenString_Name = value; - } - /** @apilevel internal - */ - protected String tokenString_Name; - /** - * Retrieves the value for the lexeme Name. - * @return The value for the lexeme Name. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Name") - public String getName() { - return tokenString_Name != null ? tokenString_Name : ""; - } - /** - * Replaces the SecurityRequirementValue list. - * @param list The new list node to be used as the SecurityRequirementValue list. - * @apilevel high-level - */ - public void setSecurityRequirementValueList(JastAddList<SecurityRequirementValue> list) { - setChild(list, 0); - } - /** - * Retrieves the number of children in the SecurityRequirementValue list. - * @return Number of children in the SecurityRequirementValue list. - * @apilevel high-level - */ - public int getNumSecurityRequirementValue() { - return getSecurityRequirementValueList().getNumChild(); - } - /** - * Retrieves the number of children in the SecurityRequirementValue list. - * Calling this method will not trigger rewrites. - * @return Number of children in the SecurityRequirementValue list. - * @apilevel low-level - */ - public int getNumSecurityRequirementValueNoTransform() { - return getSecurityRequirementValueListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the SecurityRequirementValue list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the SecurityRequirementValue list. - * @apilevel high-level - */ - public SecurityRequirementValue getSecurityRequirementValue(int i) { - return (SecurityRequirementValue) getSecurityRequirementValueList().getChild(i); - } - /** - * Check whether the SecurityRequirementValue list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasSecurityRequirementValue() { - return getSecurityRequirementValueList().getNumChild() != 0; - } - /** - * Append an element to the SecurityRequirementValue list. - * @param node The element to append to the SecurityRequirementValue list. - * @apilevel high-level - */ - public void addSecurityRequirementValue(SecurityRequirementValue node) { - JastAddList<SecurityRequirementValue> list = (parent == null) ? getSecurityRequirementValueListNoTransform() : getSecurityRequirementValueList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addSecurityRequirementValueNoTransform(SecurityRequirementValue node) { - JastAddList<SecurityRequirementValue> list = getSecurityRequirementValueListNoTransform(); - list.addChild(node); - } - /** - * Replaces the SecurityRequirementValue list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setSecurityRequirementValue(SecurityRequirementValue node, int i) { - JastAddList<SecurityRequirementValue> list = getSecurityRequirementValueList(); - list.setChild(node, i); - } - /** - * Retrieves the SecurityRequirementValue list. - * @return The node representing the SecurityRequirementValue list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="SecurityRequirementValue") - public JastAddList<SecurityRequirementValue> getSecurityRequirementValueList() { - JastAddList<SecurityRequirementValue> list = (JastAddList<SecurityRequirementValue>) getChild(0); - return list; - } - /** - * Retrieves the SecurityRequirementValue list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the SecurityRequirementValue list. - * @apilevel low-level - */ - public JastAddList<SecurityRequirementValue> getSecurityRequirementValueListNoTransform() { - return (JastAddList<SecurityRequirementValue>) getChildNoTransform(0); - } - /** - * @return the element at index {@code i} in the SecurityRequirementValue list without - * triggering rewrites. - */ - public SecurityRequirementValue getSecurityRequirementValueNoTransform(int i) { - return (SecurityRequirementValue) getSecurityRequirementValueListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the SecurityRequirementValue list. - * @return The node representing the SecurityRequirementValue list. - * @apilevel high-level - */ - public JastAddList<SecurityRequirementValue> getSecurityRequirementValues() { - return getSecurityRequirementValueList(); - } - /** - * Retrieves the SecurityRequirementValue list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the SecurityRequirementValue list. - * @apilevel low-level - */ - public JastAddList<SecurityRequirementValue> getSecurityRequirementValuesNoTransform() { - return getSecurityRequirementValueListNoTransform(); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/SecurityRequirementValue.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/SecurityRequirementValue.java deleted file mode 100644 index 53aaef125f94738a85b75c60178bff9e8f7cced9..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/SecurityRequirementValue.java +++ /dev/null @@ -1,186 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:126 - * @astdecl SecurityRequirementValue : ASTNode ::= <Value:String>; - * @production SecurityRequirementValue : {@link ASTNode} ::= <span class="component"><Value:String></span>; - - */ -public class SecurityRequirementValue extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public SecurityRequirementValue() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - } - /** - * @declaredat ASTNode:12 - */ - @ASTNodeAnnotation.Constructor( - name = {"Value"}, - type = {"String"}, - kind = {"Token"} - ) - public SecurityRequirementValue(String p0) { - setValue(p0); - } - /** @apilevel low-level - * @declaredat ASTNode:21 - */ - protected int numChildren() { - return 0; - } - /** - * @apilevel internal - * @declaredat ASTNode:27 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:31 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:35 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:39 - */ - public SecurityRequirementValue clone() throws CloneNotSupportedException { - SecurityRequirementValue node = (SecurityRequirementValue) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:44 - */ - public SecurityRequirementValue copy() { - try { - SecurityRequirementValue node = (SecurityRequirementValue) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:63 - */ - @Deprecated - public SecurityRequirementValue fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:73 - */ - public SecurityRequirementValue treeCopyNoTransform() { - SecurityRequirementValue tree = (SecurityRequirementValue) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:93 - */ - public SecurityRequirementValue treeCopy() { - SecurityRequirementValue tree = (SecurityRequirementValue) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:107 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Value == ((SecurityRequirementValue) node).tokenString_Value); - } - /** - * Replaces the lexeme Value. - * @param value The new value for the lexeme Value. - * @apilevel high-level - */ - public void setValue(String value) { - tokenString_Value = value; - } - /** @apilevel internal - */ - protected String tokenString_Value; - /** - * Retrieves the value for the lexeme Value. - * @return The value for the lexeme Value. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Value") - public String getValue() { - return tokenString_Value != null ? tokenString_Value : ""; - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/SecuritySchemeObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/SecuritySchemeObject.java deleted file mode 100644 index c8994f295f0789467bab9017a6d2dfa27e0dd314..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/SecuritySchemeObject.java +++ /dev/null @@ -1,535 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:110 - * @astdecl SecuritySchemeObject : ASTNode ::= <Type:String> <Description:String> <Name:String> <In:String> <Scheme:String> <BearerFormat:String> OAuthFlowsObject <OpenIdConnectUrl:String> <Ref:String> Extension*; - * @production SecuritySchemeObject : {@link ASTNode} ::= <span class="component"><Type:String></span> <span class="component"><Description:String></span> <span class="component"><Name:String></span> <span class="component"><In:String></span> <span class="component"><Scheme:String></span> <span class="component"><BearerFormat:String></span> <span class="component">{@link OAuthFlowsObject}</span> <span class="component"><OpenIdConnectUrl:String></span> <span class="component"><Ref:String></span> <span class="component">{@link Extension}*</span>; - - */ -public class SecuritySchemeObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:780 - */ - public static SecurityScheme composeSecurityScheme (SecuritySchemeObject securitySchemeObject){ - SecurityScheme securityScheme = new SecurityScheme(); - - if( !securitySchemeObject.getType().isEmpty() ) - securityScheme.setType(securitySchemeObject.getType()); - if( !securitySchemeObject.getName().isEmpty() ) - securityScheme.setName(securitySchemeObject.getName()); - if( !securitySchemeObject.getIn().isEmpty() ) - securityScheme.setIn(securitySchemeObject.getIn()); - if( !securitySchemeObject.getScheme().isEmpty() ) - securityScheme.setScheme(securitySchemeObject.getScheme()); - if( !securitySchemeObject.getOpenIdConnectUrl().isEmpty() ) - securityScheme.setOpenIdConnectUrl(securitySchemeObject.getOpenIdConnectUrl()); - if( securitySchemeObject.getOAuthFlowsObject() != null ) - securityScheme.setFlows(OAuthFlowsObject.composeOAuthFlows(securitySchemeObject.getOAuthFlowsObject())); - if( !securitySchemeObject.getDescription().isEmpty() ) - securityScheme.setDescription( securitySchemeObject.getDescription() ); - if( !securitySchemeObject.getBearerFormat().isEmpty() ) - securityScheme.setBearerFormat( securitySchemeObject.getBearerFormat() ); - if( securitySchemeObject.getNumExtension() != 0 ){ - Map<String, Object> extensionMap = new HashMap<>(); - for( Extension e : securitySchemeObject.getExtensions() ) - extensionMap.put(e.getKey(), e.getValue()); - securityScheme.setExtensions(extensionMap); - } - - return securityScheme; - } - /** - * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:792 - */ - public static SecuritySchemeObject parseSecurityScheme(SecurityScheme securityScheme){ - SecuritySchemeObject securitySchemeObject = new SecuritySchemeObject(); - - if( securityScheme.getType() != null ) - securitySchemeObject.setType(securityScheme.getType()); - if( securityScheme.getName() != null ) - securitySchemeObject.setName(securityScheme.getName()); - if( securityScheme.getIn() != null ) - securitySchemeObject.setIn(securityScheme.getIn()); - if( securityScheme.getScheme() != null ) - securitySchemeObject.setScheme(securityScheme.getScheme()); - if( securityScheme.getOpenIdConnectUrl() != null ) - securitySchemeObject.setOpenIdConnectUrl(securityScheme.getOpenIdConnectUrl()); - if( securityScheme.getFlows() != null ) - securitySchemeObject.setOAuthFlowsObject( OAuthFlowsObject.parseOAuthFlows(securityScheme.getFlows()) ); - if( securityScheme.getDescription() != null ) - securitySchemeObject.setDescription( securityScheme.getDescription() ); - if( securityScheme.getBearerFormat() != null ) - securitySchemeObject.setBearerFormat( securityScheme.getBearerFormat() ); - if( securityScheme.getExtensions() != null ){ - for( String key : securityScheme.getExtensions().keySet() ) - securitySchemeObject.addExtension(new Extension(key, securityScheme.getExtensions().get(key))); - } - - return securitySchemeObject; - } - /** - * @declaredat ASTNode:1 - */ - public SecuritySchemeObject() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[2]; - setChild(new JastAddList(), 1); - } - /** - * @declaredat ASTNode:14 - */ - @ASTNodeAnnotation.Constructor( - name = {"Type", "Description", "Name", "In", "Scheme", "BearerFormat", "OAuthFlowsObject", "OpenIdConnectUrl", "Ref", "Extension"}, - type = {"String", "String", "String", "String", "String", "String", "OAuthFlowsObject", "String", "String", "JastAddList<Extension>"}, - kind = {"Token", "Token", "Token", "Token", "Token", "Token", "Child", "Token", "Token", "List"} - ) - public SecuritySchemeObject(String p0, String p1, String p2, String p3, String p4, String p5, OAuthFlowsObject p6, String p7, String p8, JastAddList<Extension> p9) { - setType(p0); - setDescription(p1); - setName(p2); - setIn(p3); - setScheme(p4); - setBearerFormat(p5); - setChild(p6, 0); - setOpenIdConnectUrl(p7); - setRef(p8); - setChild(p9, 1); - } - /** @apilevel low-level - * @declaredat ASTNode:32 - */ - protected int numChildren() { - return 2; - } - /** - * @apilevel internal - * @declaredat ASTNode:38 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:42 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:46 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:50 - */ - public SecuritySchemeObject clone() throws CloneNotSupportedException { - SecuritySchemeObject node = (SecuritySchemeObject) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:55 - */ - public SecuritySchemeObject copy() { - try { - SecuritySchemeObject node = (SecuritySchemeObject) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:74 - */ - @Deprecated - public SecuritySchemeObject fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:84 - */ - public SecuritySchemeObject treeCopyNoTransform() { - SecuritySchemeObject tree = (SecuritySchemeObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:104 - */ - public SecuritySchemeObject treeCopy() { - SecuritySchemeObject tree = (SecuritySchemeObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:118 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Type == ((SecuritySchemeObject) node).tokenString_Type) && (tokenString_Description == ((SecuritySchemeObject) node).tokenString_Description) && (tokenString_Name == ((SecuritySchemeObject) node).tokenString_Name) && (tokenString_In == ((SecuritySchemeObject) node).tokenString_In) && (tokenString_Scheme == ((SecuritySchemeObject) node).tokenString_Scheme) && (tokenString_BearerFormat == ((SecuritySchemeObject) node).tokenString_BearerFormat) && (tokenString_OpenIdConnectUrl == ((SecuritySchemeObject) node).tokenString_OpenIdConnectUrl) && (tokenString_Ref == ((SecuritySchemeObject) node).tokenString_Ref); - } - /** - * Replaces the lexeme Type. - * @param value The new value for the lexeme Type. - * @apilevel high-level - */ - public void setType(String value) { - tokenString_Type = value; - } - /** @apilevel internal - */ - protected String tokenString_Type; - /** - * Retrieves the value for the lexeme Type. - * @return The value for the lexeme Type. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Type") - public String getType() { - return tokenString_Type != null ? tokenString_Type : ""; - } - /** - * Replaces the lexeme Description. - * @param value The new value for the lexeme Description. - * @apilevel high-level - */ - public void setDescription(String value) { - tokenString_Description = value; - } - /** @apilevel internal - */ - protected String tokenString_Description; - /** - * Retrieves the value for the lexeme Description. - * @return The value for the lexeme Description. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Description") - public String getDescription() { - return tokenString_Description != null ? tokenString_Description : ""; - } - /** - * Replaces the lexeme Name. - * @param value The new value for the lexeme Name. - * @apilevel high-level - */ - public void setName(String value) { - tokenString_Name = value; - } - /** @apilevel internal - */ - protected String tokenString_Name; - /** - * Retrieves the value for the lexeme Name. - * @return The value for the lexeme Name. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Name") - public String getName() { - return tokenString_Name != null ? tokenString_Name : ""; - } - /** - * Replaces the lexeme In. - * @param value The new value for the lexeme In. - * @apilevel high-level - */ - public void setIn(String value) { - tokenString_In = value; - } - /** @apilevel internal - */ - protected String tokenString_In; - /** - * Retrieves the value for the lexeme In. - * @return The value for the lexeme In. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="In") - public String getIn() { - return tokenString_In != null ? tokenString_In : ""; - } - /** - * Replaces the lexeme Scheme. - * @param value The new value for the lexeme Scheme. - * @apilevel high-level - */ - public void setScheme(String value) { - tokenString_Scheme = value; - } - /** @apilevel internal - */ - protected String tokenString_Scheme; - /** - * Retrieves the value for the lexeme Scheme. - * @return The value for the lexeme Scheme. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Scheme") - public String getScheme() { - return tokenString_Scheme != null ? tokenString_Scheme : ""; - } - /** - * Replaces the lexeme BearerFormat. - * @param value The new value for the lexeme BearerFormat. - * @apilevel high-level - */ - public void setBearerFormat(String value) { - tokenString_BearerFormat = value; - } - /** @apilevel internal - */ - protected String tokenString_BearerFormat; - /** - * Retrieves the value for the lexeme BearerFormat. - * @return The value for the lexeme BearerFormat. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="BearerFormat") - public String getBearerFormat() { - return tokenString_BearerFormat != null ? tokenString_BearerFormat : ""; - } - /** - * Replaces the OAuthFlowsObject child. - * @param node The new node to replace the OAuthFlowsObject child. - * @apilevel high-level - */ - public void setOAuthFlowsObject(OAuthFlowsObject node) { - setChild(node, 0); - } - /** - * Retrieves the OAuthFlowsObject child. - * @return The current node used as the OAuthFlowsObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="OAuthFlowsObject") - public OAuthFlowsObject getOAuthFlowsObject() { - return (OAuthFlowsObject) getChild(0); - } - /** - * Retrieves the OAuthFlowsObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the OAuthFlowsObject child. - * @apilevel low-level - */ - public OAuthFlowsObject getOAuthFlowsObjectNoTransform() { - return (OAuthFlowsObject) getChildNoTransform(0); - } - /** - * Replaces the lexeme OpenIdConnectUrl. - * @param value The new value for the lexeme OpenIdConnectUrl. - * @apilevel high-level - */ - public void setOpenIdConnectUrl(String value) { - tokenString_OpenIdConnectUrl = value; - } - /** @apilevel internal - */ - protected String tokenString_OpenIdConnectUrl; - /** - * Retrieves the value for the lexeme OpenIdConnectUrl. - * @return The value for the lexeme OpenIdConnectUrl. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="OpenIdConnectUrl") - public String getOpenIdConnectUrl() { - return tokenString_OpenIdConnectUrl != null ? tokenString_OpenIdConnectUrl : ""; - } - /** - * Replaces the lexeme Ref. - * @param value The new value for the lexeme Ref. - * @apilevel high-level - */ - public void setRef(String value) { - tokenString_Ref = value; - } - /** @apilevel internal - */ - protected String tokenString_Ref; - /** - * Retrieves the value for the lexeme Ref. - * @return The value for the lexeme Ref. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Ref") - public String getRef() { - return tokenString_Ref != null ? tokenString_Ref : ""; - } - /** - * Replaces the Extension list. - * @param list The new list node to be used as the Extension list. - * @apilevel high-level - */ - public void setExtensionList(JastAddList<Extension> list) { - setChild(list, 1); - } - /** - * Retrieves the number of children in the Extension list. - * @return Number of children in the Extension list. - * @apilevel high-level - */ - public int getNumExtension() { - return getExtensionList().getNumChild(); - } - /** - * Retrieves the number of children in the Extension list. - * Calling this method will not trigger rewrites. - * @return Number of children in the Extension list. - * @apilevel low-level - */ - public int getNumExtensionNoTransform() { - return getExtensionListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the Extension list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the Extension list. - * @apilevel high-level - */ - public Extension getExtension(int i) { - return (Extension) getExtensionList().getChild(i); - } - /** - * Check whether the Extension list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasExtension() { - return getExtensionList().getNumChild() != 0; - } - /** - * Append an element to the Extension list. - * @param node The element to append to the Extension list. - * @apilevel high-level - */ - public void addExtension(Extension node) { - JastAddList<Extension> list = (parent == null) ? getExtensionListNoTransform() : getExtensionList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addExtensionNoTransform(Extension node) { - JastAddList<Extension> list = getExtensionListNoTransform(); - list.addChild(node); - } - /** - * Replaces the Extension list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setExtension(Extension node, int i) { - JastAddList<Extension> list = getExtensionList(); - list.setChild(node, i); - } - /** - * Retrieves the Extension list. - * @return The node representing the Extension list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="Extension") - public JastAddList<Extension> getExtensionList() { - JastAddList<Extension> list = (JastAddList<Extension>) getChild(1); - return list; - } - /** - * Retrieves the Extension list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the Extension list. - * @apilevel low-level - */ - public JastAddList<Extension> getExtensionListNoTransform() { - return (JastAddList<Extension>) getChildNoTransform(1); - } - /** - * @return the element at index {@code i} in the Extension list without - * triggering rewrites. - */ - public Extension getExtensionNoTransform(int i) { - return (Extension) getExtensionListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the Extension list. - * @return The node representing the Extension list. - * @apilevel high-level - */ - public JastAddList<Extension> getExtensions() { - return getExtensionList(); - } - /** - * Retrieves the Extension list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the Extension list. - * @apilevel low-level - */ - public JastAddList<Extension> getExtensionsNoTransform() { - return getExtensionListNoTransform(); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/SecuritySchemeTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/SecuritySchemeTuple.java deleted file mode 100644 index fb57a824cc5547b8bf6100b7087256a6c46d8e1a..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/SecuritySchemeTuple.java +++ /dev/null @@ -1,214 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:29 - * @astdecl SecuritySchemeTuple : ASTNode ::= <Key:String> SecuritySchemeObject; - * @production SecuritySchemeTuple : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component">{@link SecuritySchemeObject}</span>; - - */ -public class SecuritySchemeTuple extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public SecuritySchemeTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"Key", "SecuritySchemeObject"}, - type = {"String", "SecuritySchemeObject"}, - kind = {"Token", "Child"} - ) - public SecuritySchemeTuple(String p0, SecuritySchemeObject p1) { - setKey(p0); - setChild(p1, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:23 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:29 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:33 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:37 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:41 - */ - public SecuritySchemeTuple clone() throws CloneNotSupportedException { - SecuritySchemeTuple node = (SecuritySchemeTuple) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:46 - */ - public SecuritySchemeTuple copy() { - try { - SecuritySchemeTuple node = (SecuritySchemeTuple) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:65 - */ - @Deprecated - public SecuritySchemeTuple fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:75 - */ - public SecuritySchemeTuple treeCopyNoTransform() { - SecuritySchemeTuple tree = (SecuritySchemeTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:95 - */ - public SecuritySchemeTuple treeCopy() { - SecuritySchemeTuple tree = (SecuritySchemeTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:109 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Key == ((SecuritySchemeTuple) node).tokenString_Key); - } - /** - * Replaces the lexeme Key. - * @param value The new value for the lexeme Key. - * @apilevel high-level - */ - public void setKey(String value) { - tokenString_Key = value; - } - /** @apilevel internal - */ - protected String tokenString_Key; - /** - * Retrieves the value for the lexeme Key. - * @return The value for the lexeme Key. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Key") - public String getKey() { - return tokenString_Key != null ? tokenString_Key : ""; - } - /** - * Replaces the SecuritySchemeObject child. - * @param node The new node to replace the SecuritySchemeObject child. - * @apilevel high-level - */ - public void setSecuritySchemeObject(SecuritySchemeObject node) { - setChild(node, 0); - } - /** - * Retrieves the SecuritySchemeObject child. - * @return The current node used as the SecuritySchemeObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="SecuritySchemeObject") - public SecuritySchemeObject getSecuritySchemeObject() { - return (SecuritySchemeObject) getChild(0); - } - /** - * Retrieves the SecuritySchemeObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the SecuritySchemeObject child. - * @apilevel low-level - */ - public SecuritySchemeObject getSecuritySchemeObjectNoTransform() { - return (SecuritySchemeObject) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ServerObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ServerObject.java deleted file mode 100644 index 421076331d3e259aadc172d3c5e51bfe3b339e2c..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ServerObject.java +++ /dev/null @@ -1,358 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:14 - * @astdecl ServerObject : ASTNode ::= <Url:String> <Description:String> ServerVariablesTuple*; - * @production ServerObject : {@link ASTNode} ::= <span class="component"><Url:String></span> <span class="component"><Description:String></span> <span class="component">{@link ServerVariablesTuple}*</span>; - - */ -public class ServerObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:115 - */ - public static Server composeServer (ServerObject serverObject){ - Server server = new Server(); - - if( !serverObject.getUrl().isEmpty() ) - server.setUrl(serverObject.getUrl()); - if( !serverObject.getDescription().isEmpty() ) - server.setDescription( serverObject.getDescription() ); - if( serverObject.hasServerVariablesTuple() ){ - Map<String, ServerVariable> serverVariables = new HashMap<>(); - for( ServerVariablesTuple s : serverObject.getServerVariablesTuples() ) - serverVariables.put( s.getName(), ServerVariableObject.composeServerVariable(s.getServerVariableObject()) ); - server.setVariables(serverVariables); - } - - return server; - } - /** - * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:91 - */ - public static ServerObject parseServer(Server server){ - ServerObject serverObject = new ServerObject(); - - if( server.getUrl() != null ) - serverObject.setUrl(server.getUrl()); - if( server.getDescription() != null ) - serverObject.setDescription(server.getDescription()); - if( server.getVariables() != null ){ - for (String key : server.getVariables().keySet()) - serverObject.addServerVariablesTuple(new ServerVariablesTuple(key, ServerVariableObject.parseServerVariable(server.getVariable(key)))); - } - - return serverObject; - } - /** - * @declaredat ASTNode:1 - */ - public ServerObject() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - setChild(new JastAddList(), 0); - } - /** - * @declaredat ASTNode:14 - */ - @ASTNodeAnnotation.Constructor( - name = {"Url", "Description", "ServerVariablesTuple"}, - type = {"String", "String", "JastAddList<ServerVariablesTuple>"}, - kind = {"Token", "Token", "List"} - ) - public ServerObject(String p0, String p1, JastAddList<ServerVariablesTuple> p2) { - setUrl(p0); - setDescription(p1); - setChild(p2, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:25 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:31 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:35 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:39 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:43 - */ - public ServerObject clone() throws CloneNotSupportedException { - ServerObject node = (ServerObject) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:48 - */ - public ServerObject copy() { - try { - ServerObject node = (ServerObject) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:67 - */ - @Deprecated - public ServerObject fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:77 - */ - public ServerObject treeCopyNoTransform() { - ServerObject tree = (ServerObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:97 - */ - public ServerObject treeCopy() { - ServerObject tree = (ServerObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:111 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Url == ((ServerObject) node).tokenString_Url) && (tokenString_Description == ((ServerObject) node).tokenString_Description); - } - /** - * Replaces the lexeme Url. - * @param value The new value for the lexeme Url. - * @apilevel high-level - */ - public void setUrl(String value) { - tokenString_Url = value; - } - /** @apilevel internal - */ - protected String tokenString_Url; - /** - * Retrieves the value for the lexeme Url. - * @return The value for the lexeme Url. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Url") - public String getUrl() { - return tokenString_Url != null ? tokenString_Url : ""; - } - /** - * Replaces the lexeme Description. - * @param value The new value for the lexeme Description. - * @apilevel high-level - */ - public void setDescription(String value) { - tokenString_Description = value; - } - /** @apilevel internal - */ - protected String tokenString_Description; - /** - * Retrieves the value for the lexeme Description. - * @return The value for the lexeme Description. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Description") - public String getDescription() { - return tokenString_Description != null ? tokenString_Description : ""; - } - /** - * Replaces the ServerVariablesTuple list. - * @param list The new list node to be used as the ServerVariablesTuple list. - * @apilevel high-level - */ - public void setServerVariablesTupleList(JastAddList<ServerVariablesTuple> list) { - setChild(list, 0); - } - /** - * Retrieves the number of children in the ServerVariablesTuple list. - * @return Number of children in the ServerVariablesTuple list. - * @apilevel high-level - */ - public int getNumServerVariablesTuple() { - return getServerVariablesTupleList().getNumChild(); - } - /** - * Retrieves the number of children in the ServerVariablesTuple list. - * Calling this method will not trigger rewrites. - * @return Number of children in the ServerVariablesTuple list. - * @apilevel low-level - */ - public int getNumServerVariablesTupleNoTransform() { - return getServerVariablesTupleListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the ServerVariablesTuple list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the ServerVariablesTuple list. - * @apilevel high-level - */ - public ServerVariablesTuple getServerVariablesTuple(int i) { - return (ServerVariablesTuple) getServerVariablesTupleList().getChild(i); - } - /** - * Check whether the ServerVariablesTuple list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasServerVariablesTuple() { - return getServerVariablesTupleList().getNumChild() != 0; - } - /** - * Append an element to the ServerVariablesTuple list. - * @param node The element to append to the ServerVariablesTuple list. - * @apilevel high-level - */ - public void addServerVariablesTuple(ServerVariablesTuple node) { - JastAddList<ServerVariablesTuple> list = (parent == null) ? getServerVariablesTupleListNoTransform() : getServerVariablesTupleList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addServerVariablesTupleNoTransform(ServerVariablesTuple node) { - JastAddList<ServerVariablesTuple> list = getServerVariablesTupleListNoTransform(); - list.addChild(node); - } - /** - * Replaces the ServerVariablesTuple list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setServerVariablesTuple(ServerVariablesTuple node, int i) { - JastAddList<ServerVariablesTuple> list = getServerVariablesTupleList(); - list.setChild(node, i); - } - /** - * Retrieves the ServerVariablesTuple list. - * @return The node representing the ServerVariablesTuple list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="ServerVariablesTuple") - public JastAddList<ServerVariablesTuple> getServerVariablesTupleList() { - JastAddList<ServerVariablesTuple> list = (JastAddList<ServerVariablesTuple>) getChild(0); - return list; - } - /** - * Retrieves the ServerVariablesTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ServerVariablesTuple list. - * @apilevel low-level - */ - public JastAddList<ServerVariablesTuple> getServerVariablesTupleListNoTransform() { - return (JastAddList<ServerVariablesTuple>) getChildNoTransform(0); - } - /** - * @return the element at index {@code i} in the ServerVariablesTuple list without - * triggering rewrites. - */ - public ServerVariablesTuple getServerVariablesTupleNoTransform(int i) { - return (ServerVariablesTuple) getServerVariablesTupleListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the ServerVariablesTuple list. - * @return The node representing the ServerVariablesTuple list. - * @apilevel high-level - */ - public JastAddList<ServerVariablesTuple> getServerVariablesTuples() { - return getServerVariablesTupleList(); - } - /** - * Retrieves the ServerVariablesTuple list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ServerVariablesTuple list. - * @apilevel low-level - */ - public JastAddList<ServerVariablesTuple> getServerVariablesTuplesNoTransform() { - return getServerVariablesTupleListNoTransform(); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ServerVariableObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ServerVariableObject.java deleted file mode 100644 index d7e654fc0c038cee94ee46737de551b0c5c66f8f..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ServerVariableObject.java +++ /dev/null @@ -1,358 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:18 - * @astdecl ServerVariableObject : ASTNode ::= Enum* <Default:String> <Description:String>; - * @production ServerVariableObject : {@link ASTNode} ::= <span class="component">{@link Enum}*</span> <span class="component"><Default:String></span> <span class="component"><Description:String></span>; - - */ -public class ServerVariableObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:132 - */ - public static ServerVariable composeServerVariable (ServerVariableObject serverVariableObject){ - ServerVariable serverVariable = new ServerVariable(); - - if( !serverVariableObject.getDefault().isEmpty() ) - serverVariable.setDefault(serverVariableObject.getDefault()); - if( !serverVariableObject.getDescription().isEmpty() ) - serverVariable.setDescription(serverVariableObject.getDescription()); - if( serverVariableObject.getNumEnum() != 0 ){ - List<String> enums = new ArrayList<>(); - for( Enum e : serverVariableObject.getEnums() ) - enums.add( e.getEnumValue() ); - serverVariable.setEnums( enums ); - } - - return serverVariable; - } - /** - * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:106 - */ - public static ServerVariableObject parseServerVariable(ServerVariable serverVariable){ - ServerVariableObject serverVariableObject = new ServerVariableObject(); - - if( serverVariable.getDefault() != null ) - serverVariableObject.setDefault(serverVariable.getDefault()); - if( serverVariable.getDescription() != null ) - serverVariableObject.setDescription(serverVariable.getDescription()); - if( serverVariable.getEnums() != null ){ - for( String e : serverVariable.getEnums() ) - serverVariableObject.addEnum(new Enum(e)); - } - - return serverVariableObject; - } - /** - * @declaredat ASTNode:1 - */ - public ServerVariableObject() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - setChild(new JastAddList(), 0); - } - /** - * @declaredat ASTNode:14 - */ - @ASTNodeAnnotation.Constructor( - name = {"Enum", "Default", "Description"}, - type = {"JastAddList<Enum>", "String", "String"}, - kind = {"List", "Token", "Token"} - ) - public ServerVariableObject(JastAddList<Enum> p0, String p1, String p2) { - setChild(p0, 0); - setDefault(p1); - setDescription(p2); - } - /** @apilevel low-level - * @declaredat ASTNode:25 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:31 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:35 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:39 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:43 - */ - public ServerVariableObject clone() throws CloneNotSupportedException { - ServerVariableObject node = (ServerVariableObject) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:48 - */ - public ServerVariableObject copy() { - try { - ServerVariableObject node = (ServerVariableObject) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:67 - */ - @Deprecated - public ServerVariableObject fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:77 - */ - public ServerVariableObject treeCopyNoTransform() { - ServerVariableObject tree = (ServerVariableObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:97 - */ - public ServerVariableObject treeCopy() { - ServerVariableObject tree = (ServerVariableObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:111 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Default == ((ServerVariableObject) node).tokenString_Default) && (tokenString_Description == ((ServerVariableObject) node).tokenString_Description); - } - /** - * Replaces the Enum list. - * @param list The new list node to be used as the Enum list. - * @apilevel high-level - */ - public void setEnumList(JastAddList<Enum> list) { - setChild(list, 0); - } - /** - * Retrieves the number of children in the Enum list. - * @return Number of children in the Enum list. - * @apilevel high-level - */ - public int getNumEnum() { - return getEnumList().getNumChild(); - } - /** - * Retrieves the number of children in the Enum list. - * Calling this method will not trigger rewrites. - * @return Number of children in the Enum list. - * @apilevel low-level - */ - public int getNumEnumNoTransform() { - return getEnumListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the Enum list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the Enum list. - * @apilevel high-level - */ - public Enum getEnum(int i) { - return (Enum) getEnumList().getChild(i); - } - /** - * Check whether the Enum list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasEnum() { - return getEnumList().getNumChild() != 0; - } - /** - * Append an element to the Enum list. - * @param node The element to append to the Enum list. - * @apilevel high-level - */ - public void addEnum(Enum node) { - JastAddList<Enum> list = (parent == null) ? getEnumListNoTransform() : getEnumList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addEnumNoTransform(Enum node) { - JastAddList<Enum> list = getEnumListNoTransform(); - list.addChild(node); - } - /** - * Replaces the Enum list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setEnum(Enum node, int i) { - JastAddList<Enum> list = getEnumList(); - list.setChild(node, i); - } - /** - * Retrieves the Enum list. - * @return The node representing the Enum list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="Enum") - public JastAddList<Enum> getEnumList() { - JastAddList<Enum> list = (JastAddList<Enum>) getChild(0); - return list; - } - /** - * Retrieves the Enum list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the Enum list. - * @apilevel low-level - */ - public JastAddList<Enum> getEnumListNoTransform() { - return (JastAddList<Enum>) getChildNoTransform(0); - } - /** - * @return the element at index {@code i} in the Enum list without - * triggering rewrites. - */ - public Enum getEnumNoTransform(int i) { - return (Enum) getEnumListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the Enum list. - * @return The node representing the Enum list. - * @apilevel high-level - */ - public JastAddList<Enum> getEnums() { - return getEnumList(); - } - /** - * Retrieves the Enum list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the Enum list. - * @apilevel low-level - */ - public JastAddList<Enum> getEnumsNoTransform() { - return getEnumListNoTransform(); - } - /** - * Replaces the lexeme Default. - * @param value The new value for the lexeme Default. - * @apilevel high-level - */ - public void setDefault(String value) { - tokenString_Default = value; - } - /** @apilevel internal - */ - protected String tokenString_Default; - /** - * Retrieves the value for the lexeme Default. - * @return The value for the lexeme Default. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Default") - public String getDefault() { - return tokenString_Default != null ? tokenString_Default : ""; - } - /** - * Replaces the lexeme Description. - * @param value The new value for the lexeme Description. - * @apilevel high-level - */ - public void setDescription(String value) { - tokenString_Description = value; - } - /** @apilevel internal - */ - protected String tokenString_Description; - /** - * Retrieves the value for the lexeme Description. - * @return The value for the lexeme Description. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Description") - public String getDescription() { - return tokenString_Description != null ? tokenString_Description : ""; - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ServerVariablesTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ServerVariablesTuple.java deleted file mode 100644 index b132f092e655fd50667db1507995a050e366b5a7..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ServerVariablesTuple.java +++ /dev/null @@ -1,214 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:15 - * @astdecl ServerVariablesTuple : ASTNode ::= <Name:String> ServerVariableObject; - * @production ServerVariablesTuple : {@link ASTNode} ::= <span class="component"><Name:String></span> <span class="component">{@link ServerVariableObject}</span>; - - */ -public class ServerVariablesTuple extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public ServerVariablesTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"Name", "ServerVariableObject"}, - type = {"String", "ServerVariableObject"}, - kind = {"Token", "Child"} - ) - public ServerVariablesTuple(String p0, ServerVariableObject p1) { - setName(p0); - setChild(p1, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:23 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:29 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:33 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:37 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:41 - */ - public ServerVariablesTuple clone() throws CloneNotSupportedException { - ServerVariablesTuple node = (ServerVariablesTuple) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:46 - */ - public ServerVariablesTuple copy() { - try { - ServerVariablesTuple node = (ServerVariablesTuple) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:65 - */ - @Deprecated - public ServerVariablesTuple fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:75 - */ - public ServerVariablesTuple treeCopyNoTransform() { - ServerVariablesTuple tree = (ServerVariablesTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:95 - */ - public ServerVariablesTuple treeCopy() { - ServerVariablesTuple tree = (ServerVariablesTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:109 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Name == ((ServerVariablesTuple) node).tokenString_Name); - } - /** - * Replaces the lexeme Name. - * @param value The new value for the lexeme Name. - * @apilevel high-level - */ - public void setName(String value) { - tokenString_Name = value; - } - /** @apilevel internal - */ - protected String tokenString_Name; - /** - * Retrieves the value for the lexeme Name. - * @return The value for the lexeme Name. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Name") - public String getName() { - return tokenString_Name != null ? tokenString_Name : ""; - } - /** - * Replaces the ServerVariableObject child. - * @param node The new node to replace the ServerVariableObject child. - * @apilevel high-level - */ - public void setServerVariableObject(ServerVariableObject node) { - setChild(node, 0); - } - /** - * Retrieves the ServerVariableObject child. - * @return The current node used as the ServerVariableObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="ServerVariableObject") - public ServerVariableObject getServerVariableObject() { - return (ServerVariableObject) getChild(0); - } - /** - * Retrieves the ServerVariableObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the ServerVariableObject child. - * @apilevel low-level - */ - public ServerVariableObject getServerVariableObjectNoTransform() { - return (ServerVariableObject) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/Tag.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/Tag.java deleted file mode 100644 index a030e911a44e251971281ee8240667fbda200d4a..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/Tag.java +++ /dev/null @@ -1,186 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:50 - * @astdecl Tag : ASTNode ::= <Tag:String>; - * @production Tag : {@link ASTNode} ::= <span class="component"><Tag:String></span>; - - */ -public class Tag extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public Tag() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - } - /** - * @declaredat ASTNode:12 - */ - @ASTNodeAnnotation.Constructor( - name = {"Tag"}, - type = {"String"}, - kind = {"Token"} - ) - public Tag(String p0) { - setTag(p0); - } - /** @apilevel low-level - * @declaredat ASTNode:21 - */ - protected int numChildren() { - return 0; - } - /** - * @apilevel internal - * @declaredat ASTNode:27 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:31 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:35 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:39 - */ - public Tag clone() throws CloneNotSupportedException { - Tag node = (Tag) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:44 - */ - public Tag copy() { - try { - Tag node = (Tag) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:63 - */ - @Deprecated - public Tag fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:73 - */ - public Tag treeCopyNoTransform() { - Tag tree = (Tag) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:93 - */ - public Tag treeCopy() { - Tag tree = (Tag) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:107 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Tag == ((Tag) node).tokenString_Tag); - } - /** - * Replaces the lexeme Tag. - * @param value The new value for the lexeme Tag. - * @apilevel high-level - */ - public void setTag(String value) { - tokenString_Tag = value; - } - /** @apilevel internal - */ - protected String tokenString_Tag; - /** - * Retrieves the value for the lexeme Tag. - * @return The value for the lexeme Tag. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Tag") - public String getTag() { - return tokenString_Tag != null ? tokenString_Tag : ""; - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/TagObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/TagObject.java deleted file mode 100644 index c62a9cdd7fc95c263861acec5c2f96b5937f2308..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/TagObject.java +++ /dev/null @@ -1,415 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:88 - * @astdecl TagObject : ASTNode ::= <Name:String> <Description:String> [ExternalDocObject] Extension*; - * @production TagObject : {@link ASTNode} ::= <span class="component"><Name:String></span> <span class="component"><Description:String></span> <span class="component">[{@link ExternalDocObject}]</span> <span class="component">{@link Extension}*</span>; - - */ -public class TagObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:628 - */ - public static org.openapi4j.parser.model.v3.Tag composeTag (TagObject tagObject){ - org.openapi4j.parser.model.v3.Tag tag = new org.openapi4j.parser.model.v3.Tag(); - - tag.setName( tagObject.getName() ); - - if( !tagObject.getDescription().isEmpty() ) - tag.setDescription( tagObject.getDescription() ); - if( tagObject.hasExternalDocObject() ) - tag.setExternalDocs( ExternalDocObject.composeExternalDocs(tagObject.getExternalDocObject()) ); - if( tagObject.getNumExtension() != 0 ){ - Map<String, Object> extensionMap = new HashMap<>(); - for( Extension e : tagObject.getExtensions() ) - extensionMap.put(e.getKey(), e.getValue()); - tag.setExtensions(extensionMap); - } - - return tag; - } - /** - * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:621 - */ - public static TagObject parseTag(org.openapi4j.parser.model.v3.Tag tag){ - TagObject tagObject = new TagObject(); - - tagObject.setName( tag.getName() ); - - if( tag.getDescription() != null ) - tagObject.setDescription( tag.getDescription() ); - if( tag.getExternalDocs() != null ) - tagObject.setExternalDocObject( ExternalDocObject.parseExternalDocs(tag.getExternalDocs()) ); - if( tag.getExtensions() != null ){ - for( String key : tag.getExtensions().keySet() ) - tagObject.addExtension(new Extension(key, tag.getExtensions().get(key))); - } - - return tagObject; - } - /** - * @declaredat ASTNode:1 - */ - public TagObject() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[2]; - setChild(new Opt(), 0); - setChild(new JastAddList(), 1); - } - /** - * @declaredat ASTNode:15 - */ - @ASTNodeAnnotation.Constructor( - name = {"Name", "Description", "ExternalDocObject", "Extension"}, - type = {"String", "String", "Opt<ExternalDocObject>", "JastAddList<Extension>"}, - kind = {"Token", "Token", "Opt", "List"} - ) - public TagObject(String p0, String p1, Opt<ExternalDocObject> p2, JastAddList<Extension> p3) { - setName(p0); - setDescription(p1); - setChild(p2, 0); - setChild(p3, 1); - } - /** @apilevel low-level - * @declaredat ASTNode:27 - */ - protected int numChildren() { - return 2; - } - /** - * @apilevel internal - * @declaredat ASTNode:33 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:37 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:41 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public TagObject clone() throws CloneNotSupportedException { - TagObject node = (TagObject) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:50 - */ - public TagObject copy() { - try { - TagObject node = (TagObject) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:69 - */ - @Deprecated - public TagObject fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:79 - */ - public TagObject treeCopyNoTransform() { - TagObject tree = (TagObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:99 - */ - public TagObject treeCopy() { - TagObject tree = (TagObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:113 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Name == ((TagObject) node).tokenString_Name) && (tokenString_Description == ((TagObject) node).tokenString_Description); - } - /** - * Replaces the lexeme Name. - * @param value The new value for the lexeme Name. - * @apilevel high-level - */ - public void setName(String value) { - tokenString_Name = value; - } - /** @apilevel internal - */ - protected String tokenString_Name; - /** - * Retrieves the value for the lexeme Name. - * @return The value for the lexeme Name. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Name") - public String getName() { - return tokenString_Name != null ? tokenString_Name : ""; - } - /** - * Replaces the lexeme Description. - * @param value The new value for the lexeme Description. - * @apilevel high-level - */ - public void setDescription(String value) { - tokenString_Description = value; - } - /** @apilevel internal - */ - protected String tokenString_Description; - /** - * Retrieves the value for the lexeme Description. - * @return The value for the lexeme Description. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Description") - public String getDescription() { - return tokenString_Description != null ? tokenString_Description : ""; - } - /** - * Replaces the optional node for the ExternalDocObject child. This is the <code>Opt</code> - * node containing the child ExternalDocObject, not the actual child! - * @param opt The new node to be used as the optional node for the ExternalDocObject child. - * @apilevel low-level - */ - public void setExternalDocObjectOpt(Opt<ExternalDocObject> opt) { - setChild(opt, 0); - } - /** - * Replaces the (optional) ExternalDocObject child. - * @param node The new node to be used as the ExternalDocObject child. - * @apilevel high-level - */ - public void setExternalDocObject(ExternalDocObject node) { - getExternalDocObjectOpt().setChild(node, 0); - } - /** - * Check whether the optional ExternalDocObject child exists. - * @return {@code true} if the optional ExternalDocObject child exists, {@code false} if it does not. - * @apilevel high-level - */ - public boolean hasExternalDocObject() { - return getExternalDocObjectOpt().getNumChild() != 0; - } - /** - * Retrieves the (optional) ExternalDocObject child. - * @return The ExternalDocObject child, if it exists. Returns {@code null} otherwise. - * @apilevel low-level - */ - public ExternalDocObject getExternalDocObject() { - return (ExternalDocObject) getExternalDocObjectOpt().getChild(0); - } - /** - * Retrieves the optional node for the ExternalDocObject child. This is the <code>Opt</code> node containing the child ExternalDocObject, not the actual child! - * @return The optional node for child the ExternalDocObject child. - * @apilevel low-level - */ - @ASTNodeAnnotation.OptChild(name="ExternalDocObject") - public Opt<ExternalDocObject> getExternalDocObjectOpt() { - return (Opt<ExternalDocObject>) getChild(0); - } - /** - * Retrieves the optional node for child ExternalDocObject. This is the <code>Opt</code> node containing the child ExternalDocObject, not the actual child! - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child ExternalDocObject. - * @apilevel low-level - */ - public Opt<ExternalDocObject> getExternalDocObjectOptNoTransform() { - return (Opt<ExternalDocObject>) getChildNoTransform(0); - } - /** - * Replaces the Extension list. - * @param list The new list node to be used as the Extension list. - * @apilevel high-level - */ - public void setExtensionList(JastAddList<Extension> list) { - setChild(list, 1); - } - /** - * Retrieves the number of children in the Extension list. - * @return Number of children in the Extension list. - * @apilevel high-level - */ - public int getNumExtension() { - return getExtensionList().getNumChild(); - } - /** - * Retrieves the number of children in the Extension list. - * Calling this method will not trigger rewrites. - * @return Number of children in the Extension list. - * @apilevel low-level - */ - public int getNumExtensionNoTransform() { - return getExtensionListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the Extension list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the Extension list. - * @apilevel high-level - */ - public Extension getExtension(int i) { - return (Extension) getExtensionList().getChild(i); - } - /** - * Check whether the Extension list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasExtension() { - return getExtensionList().getNumChild() != 0; - } - /** - * Append an element to the Extension list. - * @param node The element to append to the Extension list. - * @apilevel high-level - */ - public void addExtension(Extension node) { - JastAddList<Extension> list = (parent == null) ? getExtensionListNoTransform() : getExtensionList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addExtensionNoTransform(Extension node) { - JastAddList<Extension> list = getExtensionListNoTransform(); - list.addChild(node); - } - /** - * Replaces the Extension list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setExtension(Extension node, int i) { - JastAddList<Extension> list = getExtensionList(); - list.setChild(node, i); - } - /** - * Retrieves the Extension list. - * @return The node representing the Extension list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="Extension") - public JastAddList<Extension> getExtensionList() { - JastAddList<Extension> list = (JastAddList<Extension>) getChild(1); - return list; - } - /** - * Retrieves the Extension list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the Extension list. - * @apilevel low-level - */ - public JastAddList<Extension> getExtensionListNoTransform() { - return (JastAddList<Extension>) getChildNoTransform(1); - } - /** - * @return the element at index {@code i} in the Extension list without - * triggering rewrites. - */ - public Extension getExtensionNoTransform(int i) { - return (Extension) getExtensionListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the Extension list. - * @return The node representing the Extension list. - * @apilevel high-level - */ - public JastAddList<Extension> getExtensions() { - return getExtensionList(); - } - /** - * Retrieves the Extension list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the Extension list. - * @apilevel low-level - */ - public JastAddList<Extension> getExtensionsNoTransform() { - return getExtensionListNoTransform(); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/Trace.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/Trace.java deleted file mode 100644 index c860fbda4e10c9bed7ed0dd01edfbb675ddb70c0..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/Trace.java +++ /dev/null @@ -1,193 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:46 - * @astdecl Trace : ASTNode ::= OperationObject; - * @production Trace : {@link ASTNode} ::= <span class="component">{@link OperationObject}</span>; - - */ -public class Trace extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public Trace() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"OperationObject"}, - type = {"OperationObject"}, - kind = {"Child"} - ) - public Trace(OperationObject p0) { - setChild(p0, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public Trace clone() throws CloneNotSupportedException { - Trace node = (Trace) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public Trace copy() { - try { - Trace node = (Trace) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public Trace fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public Trace treeCopyNoTransform() { - Trace tree = (Trace) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public Trace treeCopy() { - Trace tree = (Trace) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node); - } - /** - * Replaces the OperationObject child. - * @param node The new node to replace the OperationObject child. - * @apilevel high-level - */ - public void setOperationObject(OperationObject node) { - setChild(node, 0); - } - /** - * Retrieves the OperationObject child. - * @return The current node used as the OperationObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="OperationObject") - public OperationObject getOperationObject() { - return (OperationObject) getChild(0); - } - /** - * Retrieves the OperationObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the OperationObject child. - * @apilevel low-level - */ - public OperationObject getOperationObjectNoTransform() { - return (OperationObject) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/XmlObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/XmlObject.java deleted file mode 100644 index a4a93d71e41c57234669b3cd369b59cc9fbe2f81..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/XmlObject.java +++ /dev/null @@ -1,310 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import org.openapi4j.core.model.OAIContext; -import java.io.IOException; -import java.util.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import javax.net.ssl.HttpsURLConnection; -import java.util.Random; -import java.util.stream.IntStream; -/** - * @ast node - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:107 - * @astdecl XmlObject : ASTNode ::= <Name:String> <Namespace:String> <Prefix:String> <Attribute:Boolean> <Wrapped:Boolean>; - * @production XmlObject : {@link ASTNode} ::= <span class="component"><Name:String></span> <span class="component"><Namespace:String></span> <span class="component"><Prefix:String></span> <span class="component"><Attribute:Boolean></span> <span class="component"><Wrapped:Boolean></span>; - - */ -public class XmlObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:763 - */ - public static Xml composeXml (XmlObject xmlObject) { - Xml xml = new Xml(); - - if( !xmlObject.getName().isEmpty() ) - xml.setName(xmlObject.getName()); - if( !xmlObject.getNamespace().isEmpty() ) - xml.setNamespace(xmlObject.getNamespace()); - if( !xmlObject.getPrefix().isEmpty() ) - xml.setPrefix(xmlObject.getPrefix()); - if( xmlObject.getAttribute() != null ) - xml.setAttribute((boolean) xmlObject.getAttribute()); - if( xmlObject.getWrapped() != null ) - xml.setWrapped((boolean) xmlObject.getWrapped()); - - return xml; - } - /** - * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:775 - */ - public static XmlObject parseXml (Xml xml) { - XmlObject xmlObject = new XmlObject(); - - if( xml.getName() != null ) - xmlObject.setName(xml.getName()); - if( xml.getNamespace() != null ) - xmlObject.setNamespace(xml.getNamespace()); - if( xml.getPrefix() != null ) - xmlObject.setPrefix(xml.getPrefix()); - if( xml.getAttribute() != null ) - xmlObject.setAttribute(xml.getAttribute()); - if( xml.getWrapped() != null ) - xmlObject.setWrapped(xml.getWrapped()); - - return xmlObject; - } - /** - * @declaredat ASTNode:1 - */ - public XmlObject() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - } - /** - * @declaredat ASTNode:12 - */ - @ASTNodeAnnotation.Constructor( - name = {"Name", "Namespace", "Prefix", "Attribute", "Wrapped"}, - type = {"String", "String", "String", "Boolean", "Boolean"}, - kind = {"Token", "Token", "Token", "Token", "Token"} - ) - public XmlObject(String p0, String p1, String p2, Boolean p3, Boolean p4) { - setName(p0); - setNamespace(p1); - setPrefix(p2); - setAttribute(p3); - setWrapped(p4); - } - /** @apilevel low-level - * @declaredat ASTNode:25 - */ - protected int numChildren() { - return 0; - } - /** - * @apilevel internal - * @declaredat ASTNode:31 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:35 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:39 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:43 - */ - public XmlObject clone() throws CloneNotSupportedException { - XmlObject node = (XmlObject) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:48 - */ - public XmlObject copy() { - try { - XmlObject node = (XmlObject) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:67 - */ - @Deprecated - public XmlObject fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:77 - */ - public XmlObject treeCopyNoTransform() { - XmlObject tree = (XmlObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:97 - */ - public XmlObject treeCopy() { - XmlObject tree = (XmlObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:111 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Name == ((XmlObject) node).tokenString_Name) && (tokenString_Namespace == ((XmlObject) node).tokenString_Namespace) && (tokenString_Prefix == ((XmlObject) node).tokenString_Prefix) && (tokenBoolean_Attribute == ((XmlObject) node).tokenBoolean_Attribute) && (tokenBoolean_Wrapped == ((XmlObject) node).tokenBoolean_Wrapped); - } - /** - * Replaces the lexeme Name. - * @param value The new value for the lexeme Name. - * @apilevel high-level - */ - public void setName(String value) { - tokenString_Name = value; - } - /** @apilevel internal - */ - protected String tokenString_Name; - /** - * Retrieves the value for the lexeme Name. - * @return The value for the lexeme Name. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Name") - public String getName() { - return tokenString_Name != null ? tokenString_Name : ""; - } - /** - * Replaces the lexeme Namespace. - * @param value The new value for the lexeme Namespace. - * @apilevel high-level - */ - public void setNamespace(String value) { - tokenString_Namespace = value; - } - /** @apilevel internal - */ - protected String tokenString_Namespace; - /** - * Retrieves the value for the lexeme Namespace. - * @return The value for the lexeme Namespace. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Namespace") - public String getNamespace() { - return tokenString_Namespace != null ? tokenString_Namespace : ""; - } - /** - * Replaces the lexeme Prefix. - * @param value The new value for the lexeme Prefix. - * @apilevel high-level - */ - public void setPrefix(String value) { - tokenString_Prefix = value; - } - /** @apilevel internal - */ - protected String tokenString_Prefix; - /** - * Retrieves the value for the lexeme Prefix. - * @return The value for the lexeme Prefix. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Prefix") - public String getPrefix() { - return tokenString_Prefix != null ? tokenString_Prefix : ""; - } - /** - * Replaces the lexeme Attribute. - * @param value The new value for the lexeme Attribute. - * @apilevel high-level - */ - public void setAttribute(Boolean value) { - tokenBoolean_Attribute = value; - } - /** @apilevel internal - */ - protected Boolean tokenBoolean_Attribute; - /** - * Retrieves the value for the lexeme Attribute. - * @return The value for the lexeme Attribute. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Attribute") - public Boolean getAttribute() { - return tokenBoolean_Attribute; - } - /** - * Replaces the lexeme Wrapped. - * @param value The new value for the lexeme Wrapped. - * @apilevel high-level - */ - public void setWrapped(Boolean value) { - tokenBoolean_Wrapped = value; - } - /** @apilevel internal - */ - protected Boolean tokenBoolean_Wrapped; - /** - * Retrieves the value for the lexeme Wrapped. - * @return The value for the lexeme Wrapped. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Wrapped") - public Boolean getWrapped() { - return tokenBoolean_Wrapped; - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/main/jastadd/RandomRequestGenerator.jadd b/src/main/jastadd/RandomRequestGenerator.jadd index 6bd09d424ad831aa9430249a9188c9b5c57dff12..424a83e89ea054f80ec351d3b212eaad8deb6b26 100644 --- a/src/main/jastadd/RandomRequestGenerator.jadd +++ b/src/main/jastadd/RandomRequestGenerator.jadd @@ -9,6 +9,25 @@ import java.util.stream.IntStream; aspect RandomRequestGenerator { + /* + syn String PathObject.getRequestURI(Ramdom r); + coll Set OpenAPI.requestURIs(Random r); + uncache PathObject.getRequestURI(); + syn Set OpenAPI.requestURIs(); + + */ + + /* + syn Map<String, String> OpenAPIObject.generateUrls(); + eq OpenAPIObject.generateUrls() { + Map<String, String> Urls = new HashMap<>(); + String baseUrl = this.getServerObject(0).getUrl(); + + return Urls; + }*/ + + coll Set<> + public void OpenAPIObject.generateRequests() throws Exception { String baseUrl = this.getServerObject(0).getUrl(); diff --git a/src/main/java/de/tudresden/inf/st/openapi/OpenAPIMain.java b/src/main/java/de/tudresden/inf/st/openapi/OpenAPIMain.java index 3ecd506dded9f4a935594787fa009350c0a079fe..7d21dc70aac769135b733f9bf2cb5bc7b92273da 100644 --- a/src/main/java/de/tudresden/inf/st/openapi/OpenAPIMain.java +++ b/src/main/java/de/tudresden/inf/st/openapi/OpenAPIMain.java @@ -86,6 +86,7 @@ public class OpenAPIMain { //writer.close(); + Map<String, String> s = new HashMap<>(); if (args.length > 0) { fileName = args[0];