01: /*
02: * xtc - The eXTensible Compiler
03: * Copyright (C) 2006 Robert Grimm
04: *
05: * This program is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU General Public License
07: * version 2 as published by the Free Software Foundation.
08: *
09: * This program is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12: * GNU General Public License for more details.
13: *
14: * You should have received a copy of the GNU General Public License
15: * along with this program; if not, write to the Free Software
16: * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
17: * USA.
18: */
19: package xtc.type;
20:
21: /**
22: * Representation of a reference to statically allocated memory. A
23: * static reference has neither a base nor an offset.
24: *
25: * @author Robert Grimm
26: * @version $Revision: 1.3 $
27: */
28: public class StaticReference extends VariableReference {
29:
30: /**
31: * Create a new anonymous static reference.
32: *
33: * @param type The declared type.
34: */
35: public StaticReference(Type type) {
36: super (type);
37: }
38:
39: /**
40: * Create a new static reference.
41: *
42: * @param name The declared name.
43: * @param type The declared type.
44: */
45: public StaticReference(String name, Type type) {
46: super (name, type);
47: }
48:
49: public boolean isStatic() {
50: return true;
51: }
52:
53: public boolean isConstant() {
54: return true;
55: }
56:
57: }
|