1 46 package org.codehaus.groovy.ast; 47 48 49 55 public class Type { 56 57 public static final Type DYNAMIC_TYPE = new Type(); 58 59 private String name; 60 private boolean dynamic; 61 transient private String realName = ""; 63 public Type() { 64 this.name = "java.lang.Object"; 65 this.dynamic = true; 66 } 67 68 public Type(String name) { 69 this.name = name; 70 this.dynamic = false; 71 } 72 73 public Type(String name, boolean isDynamic) { 74 this.name = name; 75 this.dynamic = isDynamic; 76 } 77 78 public String toString() { 79 return super.toString() + "[name:" + name + " dynamic: " + dynamic + " real name: " + realName + "]"; 80 } 81 82 public String getName() { 83 return name; 84 } 85 86 public boolean isDynamic() { 87 return dynamic; 88 } 89 92 public String getRealName() { 93 return realName; 94 } 95 98 public void setRealName(String realName) { 99 this.realName = realName; 100 } 101 102 public void setDynamic(boolean b) { 103 dynamic = b; 104 } 105 } 106 | Popular Tags |