85 |
"]"; |
"]"; |
86 |
} |
} |
87 |
|
|
88 |
|
/** |
89 |
|
* Returns a deep copy of this literal. |
90 |
|
* |
91 |
|
* @return a clone of the literal. |
92 |
|
*/ |
93 |
|
public Literal clone() |
94 |
|
{ |
95 |
|
try |
96 |
|
{ |
97 |
|
Object clonedObject = super.clone(); |
98 |
|
Literal clone = (Literal) clonedObject; |
99 |
|
clone.setType(type.clone()); |
100 |
|
return clone; |
101 |
|
} |
102 |
|
catch (CloneNotSupportedException e) |
103 |
|
{ |
104 |
|
throw new IllegalStateException("Unexpected exception: " + e, e); |
105 |
|
} |
106 |
|
} |
107 |
|
|
108 |
|
/** |
109 |
|
* Sets the type used by the literal to the one specified. |
110 |
|
* |
111 |
|
* @param type the new type to use. |
112 |
|
*/ |
113 |
|
public void setType(Type type) |
114 |
|
{ |
115 |
|
this.type = type; |
116 |
|
} |
117 |
|
|
118 |
} |
} |