[CLEANUP] Switched to String.format and cleanup

This commit is contained in:
Alexander Bielen
2018-11-27 20:12:54 +01:00
parent 38f7961dc5
commit 2523cd19e3
3 changed files with 3 additions and 7 deletions
@@ -38,7 +38,7 @@ public class Getter implements Injectable {
this.fieldLocation = ASMUtils.getClass(fieldLocation);
this.fieldNode = ASMUtils.getField(ASMUtils.getClass(fieldLocation), fieldNode, fieldDesc);
this.methodName = methodName;
this.returnDesc = returnDesc == null && this.fieldNode != null ? this.fieldNode.desc : returnDesc;
this.returnDesc = (returnDesc == null && this.fieldNode != null) ? this.fieldNode.desc : returnDesc;
this.staticMethod = staticMethod;
this.multiplier = multiplier;
Core.verbose(methodName + "[" + fieldLocation + "." + fieldNode + "]");
@@ -81,10 +81,6 @@ public class Invoker implements Injectable {
@Override
public String toString() {
return new StringBuilder()
.append("Injectable type: Invoker")
.append(", accessor: ").append(methodLocation.name)
.append(", method name: ").append(methodName)
.append(", invokes method: ").append(mName).toString();
return String.format("Injectable type: Invoker, accessor: %s, method name: %s, invokes method: %s", methodLocation.name, methodName, mName);
}
}
@@ -25,7 +25,7 @@ public class Setter implements Injectable {
this.into = ASMUtils.getClass(into);
this.field = ASMUtils.getField(this.fieldLocation, fieldName, fieldDesc);
this.name = methodName;
this.desc = (desc == null) && this.field != null ? this.field.desc : desc;
this.desc = (desc == null && this.field != null) ? this.field.desc : desc;
this.methodStatic = methodStatic;
}