From 1b99f74f39656e26db81e13f8748a347b971a224 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Fri, 16 Dec 2016 13:26:28 +0100 Subject: [PATCH] Generics als RefType entfernen --- src/de/dhbwstuttgart/bytecode/BytecodeTypeFactory.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/de/dhbwstuttgart/bytecode/BytecodeTypeFactory.java b/src/de/dhbwstuttgart/bytecode/BytecodeTypeFactory.java index 8d9a3fe9..14b77bca 100644 --- a/src/de/dhbwstuttgart/bytecode/BytecodeTypeFactory.java +++ b/src/de/dhbwstuttgart/bytecode/BytecodeTypeFactory.java @@ -63,9 +63,9 @@ public class BytecodeTypeFactory { /** * @see https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-ReferenceTypeSignature */ - private static String generateReferenceTypeSignature(RefType t){ - if(t instanceof RefType)return generateReferenceTypeSignature((RefType)t); - throw new NotImplementedException(); + private static String generateTypeSignature(RefType t){ + if(t.isGenericType())return generateReferenceTypeSignature(t); + return generateGenericTypeSignature(t); } private static String generateReferenceTypeSignature(RefType t){ @@ -80,7 +80,7 @@ public class BytecodeTypeFactory { return ret + ";"; } - private static String generateReferenceTypeSignature(GenericTypeVar t){ + private static String generateGenericTypeSignature(RefType t){ String ret = "T" + t.get_Name(); return ret + ";"; }