1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
/** Just like a variable except it cannot hold a variable value--it
* holds a type like TYPE size=BIG;
*
* You would create a UserDefinedType("size", ...lookup BIG...)
*
* In essence, this is anything in the TYPE section. This is how
* new types are introduced--they build upon TypeSpecifier objects
* that represent records, scalars etc...
*/
import java.io.*;
public class UserDefinedType extends Symbol implements Serializable {
protected TypeSpecifier type;
public UserDefinedType(String name, TypeSpecifier type) {
super(name);
setType(type);
}
public TypeSpecifier getType() {
return type;
}
public void setType(TypeSpecifier type) {
this.type = type;
}
}
|