001    /* This file was generated with JastAdd2 (http://jastadd.org) version 2.1.13-12-g880e696 */
002    package org.extendj.ast;
003    
004    import java.util.HashSet;
005    import java.io.File;
006    import java.util.Set;
007    import java.util.Collections;
008    import java.util.Collection;
009    import java.util.ArrayList;
010    import beaver.*;
011    import java.util.*;
012    import java.io.ByteArrayOutputStream;
013    import java.io.PrintStream;
014    import java.lang.reflect.InvocationTargetException;
015    import java.lang.reflect.Method;
016    import org.jastadd.util.*;
017    import java.util.zip.*;
018    import java.io.*;
019    import org.jastadd.util.PrettyPrintable;
020    import org.jastadd.util.PrettyPrinter;
021    import java.io.FileNotFoundException;
022    import java.io.BufferedInputStream;
023    import java.io.DataInputStream;
024    /**
025     * @ast node
026     * @declaredat /home/jesper/git/extendj/java5/grammar/Generics.ast:20
027     * @production AbstractWildcard : {@link Access};
028    
029     */
030    public abstract class AbstractWildcard extends Access implements Cloneable {
031      /**
032       * @aspect FunctionalInterface
033       * @declaredat /home/jesper/git/extendj/java8/frontend/FunctionalInterface.jrag:245
034       */
035      public boolean sameType(AbstractWildcard w) {
036        if (this instanceof Wildcard && w instanceof Wildcard) {
037          return true;
038        } else if (this instanceof WildcardExtends && w instanceof WildcardExtends) {
039          Access a1 = ((WildcardExtends) this).getAccess();
040          Access a2 = ((WildcardExtends) w).getAccess();
041          return a1.sameType(a2);
042        } else if (this instanceof WildcardSuper && w instanceof WildcardSuper) {
043          Access a1 = ((WildcardSuper) this).getAccess();
044          Access a2 = ((WildcardSuper) w).getAccess();
045          return a1.sameType(a2);
046        } else {
047          return false;
048        }
049      }
050      /**
051       * @declaredat ASTNode:1
052       */
053      public AbstractWildcard() {
054        super();
055      }
056      /**
057       * Initializes the child array to the correct size.
058       * Initializes List and Opt nta children.
059       * @apilevel internal
060       * @ast method
061       * @declaredat ASTNode:10
062       */
063      public void init$Children() {
064      }
065      /**
066       * @apilevel low-level
067       * @declaredat ASTNode:15
068       */
069      protected int numChildren() {
070        return 0;
071      }
072      /**
073       * @apilevel internal
074       * @declaredat ASTNode:21
075       */
076      public boolean mayHaveRewrite() {
077        return false;
078      }
079      /**
080       * @apilevel internal
081       * @declaredat ASTNode:27
082       */
083      public void flushAttrCache() {
084        super.flushAttrCache();
085      }
086      /**
087       * @apilevel internal
088       * @declaredat ASTNode:33
089       */
090      public void flushCollectionCache() {
091        super.flushCollectionCache();
092      }
093      /**
094       * @apilevel internal
095       * @declaredat ASTNode:39
096       */
097      public void flushRewriteCache() {
098        super.flushRewriteCache();
099      }
100      /**
101       * @apilevel internal
102       * @declaredat ASTNode:45
103       */
104      public AbstractWildcard clone() throws CloneNotSupportedException {
105        AbstractWildcard node = (AbstractWildcard) super.clone();
106        return node;
107      }
108      /**
109       * Create a deep copy of the AST subtree at this node.
110       * The copy is dangling, i.e. has no parent.
111       * @return dangling copy of the subtree at this node
112       * @apilevel low-level
113       * @deprecated Please use treeCopy or treeCopyNoTransform instead
114       * @declaredat ASTNode:56
115       */
116      @Deprecated
117      public abstract AbstractWildcard fullCopy();
118      /**
119       * Create a deep copy of the AST subtree at this node.
120       * The copy is dangling, i.e. has no parent.
121       * @return dangling copy of the subtree at this node
122       * @apilevel low-level
123       * @declaredat ASTNode:64
124       */
125      public abstract AbstractWildcard treeCopyNoTransform();
126      /**
127       * Create a deep copy of the AST subtree at this node.
128       * The subtree of this node is traversed to trigger rewrites before copy.
129       * The copy is dangling, i.e. has no parent.
130       * @return dangling copy of the subtree at this node
131       * @apilevel low-level
132       * @declaredat ASTNode:72
133       */
134      public abstract AbstractWildcard treeCopy();
135      /**
136       * @apilevel internal
137       */
138      public ASTNode rewriteTo() {
139        return super.rewriteTo();
140      }
141    }