From 2de11a50ec746c40df2de009afa38b656348f7af Mon Sep 17 00:00:00 2001 From: Claudio Maggioni Date: Mon, 9 Jan 2023 18:05:26 +0100 Subject: [PATCH] removed enum --- .../src-profiler/ex8/InvokeType.java | 33 ------------------- 1 file changed, 33 deletions(-) delete mode 100644 DiSLProject2022/src-profiler/ex8/InvokeType.java diff --git a/DiSLProject2022/src-profiler/ex8/InvokeType.java b/DiSLProject2022/src-profiler/ex8/InvokeType.java deleted file mode 100644 index 78b6c86..0000000 --- a/DiSLProject2022/src-profiler/ex8/InvokeType.java +++ /dev/null @@ -1,33 +0,0 @@ -package ex8; - -import org.objectweb.asm.Opcodes; - -import java.util.HashMap; - -public enum InvokeType { - STATIC("static"), - DYNAMIC("dynamic"), - SPECIAL("special"), - VIRTUAL("virtual"); - - final String name; - - final static HashMap opcodeToInvokeType = new HashMap<>() { - { - put(Opcodes.INVOKESTATIC, InvokeType.STATIC); - put(Opcodes.INVOKEDYNAMIC, InvokeType.DYNAMIC); - put(Opcodes.INVOKESPECIAL, InvokeType.SPECIAL); - put(Opcodes.INVOKEVIRTUAL, InvokeType.VIRTUAL); - } - }; - - InvokeType(String name) { - this.name = name; - } - - static InvokeType fromOpcode(int opCode) { - return opcodeToInvokeType.get(opCode); - } - - -}