001 /* This file was generated with JastAdd2 (http://jastadd.org) version 2.1.3 */ 002 package AST; 003 004 import java.util.Collection; 005 import java.util.ArrayList; 006 import java.util.HashSet; 007 /** 008 * @ast node 009 * @declaredat /home/csz-naf/examples/PicoJava/spec/picojava.ast:20 010 * @production PrimitiveDecl : {@link TypeDecl}; 011 012 */ 013 public class PrimitiveDecl extends TypeDecl implements Cloneable { 014 /** 015 * @apilevel internal 016 */ 017 public PrimitiveDecl clone() throws CloneNotSupportedException { 018 PrimitiveDecl node = (PrimitiveDecl) super.clone(); 019 node.in$Circle(false); 020 node.is$Final(false); 021 return node; 022 } 023 /** 024 * @apilevel internal 025 */ 026 public PrimitiveDecl copy() { 027 try { 028 PrimitiveDecl node = (PrimitiveDecl) clone(); 029 node.parent = null; 030 if(children != null) { 031 node.children = (ASTNode[]) children.clone(); 032 } 033 return node; 034 } catch (CloneNotSupportedException e) { 035 throw new Error("Error: clone not supported for " + getClass().getName()); 036 } 037 } 038 /** 039 * Create a deep copy of the AST subtree at this node. 040 * The copy is dangling, i.e. has no parent. 041 * @return dangling copy of the subtree at this node 042 * @apilevel low-level 043 */ 044 public PrimitiveDecl fullCopy() { 045 PrimitiveDecl tree = (PrimitiveDecl) copy(); 046 if (children != null) { 047 for (int i = 0; i < children.length; ++i) { 048 ASTNode child = (ASTNode) children[i]; 049 if(child != null) { 050 child = child.fullCopy(); 051 tree.setChild(child, i); 052 } 053 } 054 } 055 return tree; 056 } 057 /** 058 * @aspect PrettyPrint 059 * @declaredat /home/csz-naf/examples/PicoJava/spec/PrettyPrint.jadd:60 060 */ 061 public void prettyPrint(StringBuilder sb, int t) { } 062 /** 063 */ 064 public PrimitiveDecl() { 065 super(); 066 } 067 /** 068 * Initializes the child array to the correct size. 069 * Initializes List and Opt nta children. 070 * @apilevel internal 071 * @ast method 072 */ 073 public void init$Children() { 074 } 075 /** 076 */ 077 public PrimitiveDecl(String p0) { 078 setName(p0); 079 } 080 /** 081 * @apilevel low-level 082 */ 083 protected int numChildren() { 084 return 0; 085 } 086 /** 087 * @apilevel internal 088 */ 089 public boolean mayHaveRewrite() { 090 return false; 091 } 092 /** 093 * @apilevel low-level 094 */ 095 public void flushCache() { 096 super.flushCache(); 097 } 098 /** 099 * @apilevel internal 100 */ 101 public void flushCollectionCache() { 102 super.flushCollectionCache(); 103 } 104 /** 105 * Replaces the lexeme Name. 106 * @param value The new value for the lexeme Name. 107 * @apilevel high-level 108 */ 109 public void setName(String value) { 110 tokenString_Name = value; 111 } 112 /** 113 * Retrieves the value for the lexeme Name. 114 * @return The value for the lexeme Name. 115 * @apilevel high-level 116 */ 117 public String getName() { 118 return tokenString_Name != null ? tokenString_Name : ""; 119 } 120 /** 121 * @apilevel internal 122 */ 123 public ASTNode rewriteTo() { return super.rewriteTo(); 124 }}