aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/javassist/bytecode/annotation/EnumMemberValue.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/javassist/bytecode/annotation/EnumMemberValue.java')
-rw-r--r--src/main/javassist/bytecode/annotation/EnumMemberValue.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/javassist/bytecode/annotation/EnumMemberValue.java b/src/main/javassist/bytecode/annotation/EnumMemberValue.java
index a0a4e036..0f37178a 100644
--- a/src/main/javassist/bytecode/annotation/EnumMemberValue.java
+++ b/src/main/javassist/bytecode/annotation/EnumMemberValue.java
@@ -18,6 +18,7 @@ package javassist.bytecode.annotation;
import java.io.IOException;
import java.lang.reflect.Method;
+import java.util.Map;
import javassist.ClassPool;
import javassist.bytecode.ConstPool;
@@ -76,6 +77,20 @@ public class EnumMemberValue extends MemberValue {
return loadClass(cl, getType());
}
+ @Override
+ public void renameClass(String oldname, String newname) {
+ String type = cp.getUtf8Info(typeIndex);
+ String newType = Descriptor.rename(type, oldname, newname);
+ setType(Descriptor.toClassName(newType));
+ }
+
+ @Override
+ public void renameClass(Map<String, String> classnames) {
+ String type = cp.getUtf8Info(typeIndex);
+ String newType = Descriptor.rename(type, classnames);
+ setType(Descriptor.toClassName(newType));
+ }
+
/**
* Obtains the enum type name.
*