From 56470c01483077849dae33f65364bad987afac7a Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Tue, 6 Oct 2015 11:02:51 +0100 Subject: Combine type reference and class name into type name --- .../org/zwobble/couscous/backends/python/PrimitiveMethods.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/main/java/org/zwobble/couscous/backends/python/PrimitiveMethods.java') diff --git a/src/main/java/org/zwobble/couscous/backends/python/PrimitiveMethods.java b/src/main/java/org/zwobble/couscous/backends/python/PrimitiveMethods.java index 67f66ea..02db3b2 100644 --- a/src/main/java/org/zwobble/couscous/backends/python/PrimitiveMethods.java +++ b/src/main/java/org/zwobble/couscous/backends/python/PrimitiveMethods.java @@ -4,9 +4,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import org.zwobble.couscous.ast.TypeName; import org.zwobble.couscous.backends.python.ast.PythonExpressionNode; import org.zwobble.couscous.values.StringValue; -import org.zwobble.couscous.values.TypeReference; import com.google.common.collect.ImmutableMap; @@ -29,16 +29,16 @@ public class PrimitiveMethods { .build(); - private static final Map> METHODS = - ImmutableMap.>builder() + private static final Map> METHODS = + ImmutableMap.>builder() .put(StringValue.REF, STRING_METHODS) .build(); - public static boolean isPrimitive(TypeReference type) { + public static boolean isPrimitive(TypeName type) { return METHODS.containsKey(type); } - public static Optional getPrimitiveMethod(TypeReference type, String methodName) { + public static Optional getPrimitiveMethod(TypeName type, String methodName) { return Optional.ofNullable(METHODS.get(type)) .flatMap(methodsForType -> Optional.ofNullable(methodsForType.get(methodName))); } -- cgit v1.2.3