|
1 |
| package edu.rice.cs.dynamicjava.symbol; |
|
2 |
| |
|
3 |
| import edu.rice.cs.dynamicjava.symbol.type.Type; |
|
4 |
| |
|
5 |
| |
|
6 |
| |
|
7 |
| |
|
8 |
| public class LocalVariable implements Variable { |
|
9 |
| private final String _name; |
|
10 |
| private final Type _type; |
|
11 |
| private final boolean _isFinal; |
|
12 |
| |
|
13 |
| |
|
14 |
| |
|
15 |
| |
|
16 |
| |
|
17 |
| |
|
18 |
2857
| public LocalVariable(String name, Type type, boolean isFinal) {
|
|
19 |
2857
| _name = name;
|
|
20 |
2857
| _type = type;
|
|
21 |
2857
| _isFinal = isFinal;
|
|
22 |
| } |
|
23 |
| |
|
24 |
6219
| public String declaredName() { return _name; }
|
|
25 |
| |
|
26 |
5976
| public Type type() { return _type; }
|
|
27 |
| |
|
28 |
478
| public boolean isFinal() { return _isFinal; }
|
|
29 |
| |
|
30 |
0
| public String toString() {
|
|
31 |
0
| return "LocalVariable(" + _name + ": " + _type + ")@" + Integer.toHexString(hashCode());
|
|
32 |
| } |
|
33 |
| } |