rename getstatic code to hashCode

This commit is contained in:
hengyunabc committed 2018-10-18 16:30:59 +08:00
1 parent 3442f3d95c
commit f95447a493
1 file changed
+5 -5
@@ -49,7 +49,7 @@ public class GetStaticCommand extends AnnotatedCommand {
private String classPattern; private String classPattern;
private String fieldPattern; private String fieldPattern;
private String express; private String express;
private String code = null; private String hashCode = null;
private boolean isRegEx = false; private boolean isRegEx = false;
private int expand = 1; private int expand = 1;
@@ -71,10 +71,10 @@ public class GetStaticCommand extends AnnotatedCommand {
this.express = express; this.express = express;
} }
@Option(shortName = "c", longName = "code") @Option(shortName = "c", longName = "classloader")
@Description("The hash code of the special class's classLoader") @Description("The hash code of the special class's classLoader")
public void setCode(String code) { public void setCode(String hashCode) {
this.code = code; this.hashCode = hashCode;
} }
@Option(shortName = "E", longName = "regex", flag = true) @Option(shortName = "E", longName = "regex", flag = true)
@@ -93,7 +93,7 @@ public class GetStaticCommand extends AnnotatedCommand {
public void process(CommandProcess process) { public void process(CommandProcess process) {
RowAffect affect = new RowAffect(); RowAffect affect = new RowAffect();
Instrumentation inst = process.session().getInstrumentation(); Instrumentation inst = process.session().getInstrumentation();
Set<Class<?>> matchedClasses = SearchUtils.searchClassOnly(inst, classPattern, isRegEx, code); Set<Class<?>> matchedClasses = SearchUtils.searchClassOnly(inst, classPattern, isRegEx, hashCode);
try { try {
if (matchedClasses == null || matchedClasses.isEmpty()) { if (matchedClasses == null || matchedClasses.isEmpty()) {