removed enum
This commit is contained in:
parent
783b90bdd2
commit
2de11a50ec
1 changed files with 0 additions and 33 deletions
|
@ -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<Integer, InvokeType> 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);
|
||||
}
|
||||
|
||||
|
||||
}
|
Reference in a new issue