From 20dc1e124d606cf4298d5112b6d3c4f6c74e9b68 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Wed, 9 Mar 2016 18:11:17 +0000 Subject: Introduce Type interface --- .../java/org/zwobble/couscous/ast/InterfaceNode.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/main/java/org/zwobble/couscous/ast/InterfaceNode.java') 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 typeParameters, - Set superTypes, + Set superTypes, List methods) { return new InterfaceNode(name, typeParameters, superTypes, methods); } - private final TypeName name; + private final ScalarType name; private final List typeParameters; - private final Set superTypes; + private final Set superTypes; private final List methods; private InterfaceNode( - TypeName name, + ScalarType name, List typeParameters, - Set superTypes, + Set superTypes, List 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 getSuperTypes() { + public Set getSuperTypes() { return superTypes; } -- cgit v1.2.3