001 /* This file was generated with JastAdd2 (http://jastadd.org) version R20130213 */ 002 package AST; 003 004 import java.util.HashSet; 005 import java.io.File; 006 import java.util.*; 007 import beaver.*; 008 import java.util.ArrayList; 009 import java.util.zip.*; 010 import java.io.*; 011 import java.io.FileNotFoundException; 012 import java.util.Collection; 013 /** 014 * @production Wildcard : {@link AbstractWildcard}; 015 * @ast node 016 * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/Generics.ast:21 017 */ 018 public class Wildcard extends AbstractWildcard implements Cloneable { 019 /** 020 * @apilevel low-level 021 */ 022 public void flushCache() { 023 } 024 /** 025 * @apilevel internal 026 */ 027 public void flushCollectionCache() { 028 } 029 /** 030 * @apilevel internal 031 */ 032 @SuppressWarnings({"unchecked", "cast"}) 033 public Wildcard clone() throws CloneNotSupportedException { 034 Wildcard node = (Wildcard)super.clone(); 035 node.type_computed = false; 036 node.type_value = null; 037 node.in$Circle(false); 038 node.is$Final(false); 039 return node; 040 } 041 /** 042 * @apilevel internal 043 */ 044 @SuppressWarnings({"unchecked", "cast"}) 045 public Wildcard copy() { 046 047 try { 048 Wildcard node = (Wildcard) clone(); 049 node.parent = null; 050 if(children != null) 051 node.children = (ASTNode[]) children.clone(); 052 053 return node; 054 } catch (CloneNotSupportedException e) { 055 throw new Error("Error: clone not supported for " + getClass().getName()); 056 } 057 058 }/** 059 * Create a deep copy of the AST subtree at this node. 060 * The copy is dangling, i.e. has no parent. 061 * @return dangling copy of the subtree at this node 062 * @apilevel low-level 063 */ 064 @SuppressWarnings({"unchecked", "cast"}) 065 public Wildcard fullCopy() { 066 067 Wildcard tree = (Wildcard) copy(); 068 if (children != null) { 069 for (int i = 0; i < children.length; ++i) { 070 071 ASTNode child = (ASTNode) children[i]; 072 if(child != null) { 073 child = child.fullCopy(); 074 tree.setChild(child, i); 075 } 076 } 077 } 078 return tree; 079 080 } /** 081 * @ast method 082 * @aspect GenericsPrettyPrint 083 * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/GenericsPrettyPrint.jrag:161 084 */ 085 public void toString(StringBuffer s) { 086 s.append("?"); 087 } 088 /** 089 * @ast method 090 * 091 */ 092 public Wildcard() { 093 super(); 094 095 096 } 097 /** 098 * Initializes the child array to the correct size. 099 * Initializes List and Opt nta children. 100 * @apilevel internal 101 * @ast method 102 * @ast method 103 * 104 */ 105 public void init$Children() { 106 } 107 /** 108 * @apilevel low-level 109 * @ast method 110 * 111 */ 112 protected int numChildren() { 113 return 0; 114 } 115 /** 116 * @apilevel internal 117 * @ast method 118 * 119 */ 120 public boolean mayHaveRewrite() { 121 return false; 122 } 123 /** 124 * @apilevel internal 125 */ 126 protected boolean type_computed = false; 127 /** 128 * @apilevel internal 129 */ 130 protected TypeDecl type_value; 131 /** 132 * @attribute syn 133 * @aspect LookupParTypeDecl 134 * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/Generics.jrag:1369 135 */ 136 @SuppressWarnings({"unchecked", "cast"}) 137 public TypeDecl type() { 138 if(type_computed) { 139 return type_value; 140 } 141 ASTNode$State state = state(); 142 int num = state.boundariesCrossed; 143 boolean isFinal = this.is$Final(); 144 type_value = type_compute(); 145 if(isFinal && num == state().boundariesCrossed){ type_computed = true; } 146 return type_value; 147 } 148 /** 149 * @apilevel internal 150 */ 151 private TypeDecl type_compute() { return typeWildcard(); } 152 /** 153 * @attribute inh 154 * @aspect LookupParTypeDecl 155 * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/Generics.jrag:1374 156 */ 157 @SuppressWarnings({"unchecked", "cast"}) 158 public TypeDecl typeWildcard() { 159 ASTNode$State state = state(); 160 TypeDecl typeWildcard_value = getParent().Define_TypeDecl_typeWildcard(this, null); 161 return typeWildcard_value; 162 } 163 /** 164 * @apilevel internal 165 */ 166 public ASTNode rewriteTo() { 167 return super.rewriteTo(); 168 } 169 }