SourceInfo Remover

Removes Debugging information from classes, this includes: comments and soruce-info attributes

// Given Input
package dev.sim0n.evaluator.test.impl.annotation;

import dev.sim0n.evaluator.Main;
import dev.sim0n.evaluator.test.Test;
import dev.sim0n.evaluator.test.impl.annotation.TestAnnotation;

@TestAnnotation(string="Test", doubleValue=0.36, intValue=36)
public class AnnotationTest
implements Test {
    public void handle() {
        Class<AnnotationTest> clazz = AnnotationTest.class;
        if (clazz.isAnnotationPresent(TestAnnotation.class)) {
            TestAnnotation annotation = (TestAnnotation)clazz.getAnnotation(TestAnnotation.class);
            String value = annotation.string();
            double doubleValue = annotation.doubleValue();
            int intValue = annotation.intValue();
            Main.LOG.println("Testing annotations");
            Main.LOG.println(String.format((String)"%s, %s, %d", (Object[])new Object[]{value, doubleValue, intValue}));
        }
    }
}
// Output
package dev.sim0n.evaluator.test.impl.annotation;

import dev.sim0n.evaluator.Main;
import dev.sim0n.evaluator.test.Test;
import dev.sim0n.evaluator.test.impl.annotation.TestAnnotation;

@TestAnnotation(string="Test", doubleValue=0.36, intValue=36)
public class AnnotationTest
implements Test {
    public void handle() {
        Class<AnnotationTest> clazz = AnnotationTest.class;
        if (clazz.isAnnotationPresent(TestAnnotation.class)) {
            TestAnnotation annotation = (TestAnnotation)clazz.getAnnotation(TestAnnotation.class);
            String value = annotation.string();
            double doubleValue = annotation.doubleValue();
            int intValue = annotation.intValue();
            Main.LOG.println("Testing annotations");
            Main.LOG.println(String.format((String)"%s, %s, %d", (Object[])new Object[]{value, doubleValue, intValue}));
        }
    }
}
j

Last updated