aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/zwobble/couscous/ast/InterfaceNode.java
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-03-09 18:11:17 +0000
committerMichael Williamson <mike@zwobble.org>2016-03-09 18:11:17 +0000
commit20dc1e124d606cf4298d5112b6d3c4f6c74e9b68 (patch)
tree47914e8b0356b2f40e3723eae650d3bb6f100dd4 /src/main/java/org/zwobble/couscous/ast/InterfaceNode.java
parent8ac6cb16b727b5e3d28ab89fee1d169a4f74d9a1 (diff)
Introduce Type interface
Diffstat (limited to 'src/main/java/org/zwobble/couscous/ast/InterfaceNode.java')
-rw-r--r--src/main/java/org/zwobble/couscous/ast/InterfaceNode.java18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/main/java/org/zwobble/couscous/ast/InterfaceNode.java b/src/main/java/org/zwobble/couscous/ast/InterfaceNode.java
index e5b876d..97faae4 100644
--- a/src/main/java/org/zwobble/couscous/ast/InterfaceNode.java
+++ b/src/main/java/org/zwobble/couscous/ast/InterfaceNode.java
@@ -1,5 +1,7 @@
package org.zwobble.couscous.ast;
+import org.zwobble.couscous.ast.types.ScalarType;
+import org.zwobble.couscous.ast.types.Type;
import org.zwobble.couscous.ast.visitors.NodeMapper;
import org.zwobble.couscous.ast.visitors.NodeTransformer;
@@ -8,23 +10,23 @@ import java.util.Set;
public class InterfaceNode implements TypeNode {
public static InterfaceNode declareInterface(
- TypeName name,
+ ScalarType name,
List<FormalTypeParameterNode> typeParameters,
- Set<TypeName> superTypes,
+ Set<Type> superTypes,
List<MethodNode> methods)
{
return new InterfaceNode(name, typeParameters, superTypes, methods);
}
- private final TypeName name;
+ private final ScalarType name;
private final List<FormalTypeParameterNode> typeParameters;
- private final Set<TypeName> superTypes;
+ private final Set<Type> superTypes;
private final List<MethodNode> methods;
private InterfaceNode(
- TypeName name,
+ ScalarType name,
List<FormalTypeParameterNode> typeParameters,
- Set<TypeName> superTypes,
+ Set<Type> superTypes,
List<MethodNode> methodNodes)
{
this.name = name;
@@ -34,7 +36,7 @@ public class InterfaceNode implements TypeNode {
}
@Override
- public TypeName getName() {
+ public ScalarType getName() {
return name;
}
@@ -44,7 +46,7 @@ public class InterfaceNode implements TypeNode {
}
@Override
- public Set<TypeName> getSuperTypes() {
+ public Set<Type> getSuperTypes() {
return superTypes;
}