Rename transformers

This commit is contained in:
yushijinhun 2018-09-23 20:33:14 +08:00
parent 6ab2057a59
commit d793848c79
No known key found for this signature in database
GPG key ID: 5BC167F73EA558E4
5 changed files with 8 additions and 8 deletions

View file

@ -52,7 +52,7 @@ public class ClassTransformer implements ClassFileTransformer {
ClassReader reader = new ClassReader(classBuffer); ClassReader reader = new ClassReader(classBuffer);
reader.accept(optionalVisitor.get(), 0); reader.accept(optionalVisitor.get(), 0);
if (currentModified) { if (currentModified) {
Logging.TRANSFORM.info("Transformed " + className + " with " + unit); Logging.TRANSFORM.info("Transformed [" + className + "] with [" + unit + "]");
modified = true; modified = true;
classBuffer = writer.toByteArray(); classBuffer = writer.toByteArray();
} }
@ -88,11 +88,11 @@ public class ClassTransformer implements ClassFileTransformer {
} }
return classBuffer; return classBuffer;
} else { } else {
Logging.TRANSFORM.fine("No transformation is applied to " + className); Logging.TRANSFORM.fine("No transformation is applied to [" + className + "]");
return null; return null;
} }
} catch (Throwable e) { } catch (Throwable e) {
Logging.TRANSFORM.log(Level.WARNING, "Failed to transform " + internalClassName, e); Logging.TRANSFORM.log(Level.WARNING, "Failed to transform [" + internalClassName + "]", e);
} }
} }
return null; return null;
@ -102,7 +102,7 @@ public class ClassTransformer implements ClassFileTransformer {
try { try {
Files.write(Paths.get(className + "_dump.class"), classBuffer, StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING); Files.write(Paths.get(className + "_dump.class"), classBuffer, StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING);
} catch (IOException e) { } catch (IOException e) {
Logging.TRANSFORM.log(Level.WARNING, "Failed to dump class " + className, e); Logging.TRANSFORM.log(Level.WARNING, "Failed to dump class [" + className + "]", e);
} }
} }

View file

@ -25,6 +25,6 @@ public class LocalYggdrasilApiTransformUnit extends LdcTransformUnit {
@Override @Override
public String toString() { public String toString() {
return "deprecated-api-transform"; return "Local Yggdrasil API Transformer";
} }
} }

View file

@ -102,6 +102,6 @@ public class SkinWhitelistTransformUnit implements TransformUnit {
@Override @Override
public String toString() { public String toString() {
return "skin-whitelist-transform"; return "Texture Whitelist Transformer";
} }
} }

View file

@ -22,6 +22,6 @@ public class YggdrasilApiTransformUnit extends RegexTransformUnit {
@Override @Override
public String toString() { public String toString() {
return "yggdrasil-api-transform"; return "Yggdrasil API Transformer";
} }
} }

View file

@ -81,7 +81,7 @@ public class YggdrasilKeyTransformUnit implements TransformUnit {
@Override @Override
public String toString() { public String toString() {
return "yggdrasil-publickey-transform"; return "Yggdrasil Public Key Transformer";
} }
} }