Representation of new instance expression, e.g., new T.
| 28 | * Representation of new instance expression, e.g., new T. |
| 29 | */ |
| 30 | public class NewInstance implements NewExp { |
| 31 | |
| 32 | private final ClassType type; |
| 33 | |
| 34 | public NewInstance(ClassType type) { |
| 35 | this.type = type; |
| 36 | } |
| 37 | |
| 38 | @Override |
| 39 | public ClassType getType() { |
| 40 | return type; |
| 41 | } |
| 42 | |
| 43 | @Override |
| 44 | public <T> T accept(ExpVisitor<T> visitor) { |
| 45 | return visitor.visit(this); |
| 46 | } |
| 47 | |
| 48 | @Override |
| 49 | public String toString() { |
| 50 | return "new " + type; |
| 51 | } |
| 52 | } |
nothing calls this directly
no outgoing calls
no test coverage detected