aboutsummaryrefslogtreecommitdiff
path: root/src_eclipseagent/lombok/eclipse/agent/EclipseCUDTransformer.java
diff options
context:
space:
mode:
Diffstat (limited to 'src_eclipseagent/lombok/eclipse/agent/EclipseCUDTransformer.java')
-rw-r--r--src_eclipseagent/lombok/eclipse/agent/EclipseCUDTransformer.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/src_eclipseagent/lombok/eclipse/agent/EclipseCUDTransformer.java b/src_eclipseagent/lombok/eclipse/agent/EclipseCUDTransformer.java
index 95689773..b18a1ff1 100644
--- a/src_eclipseagent/lombok/eclipse/agent/EclipseCUDTransformer.java
+++ b/src_eclipseagent/lombok/eclipse/agent/EclipseCUDTransformer.java
@@ -21,6 +21,7 @@
*/
package lombok.eclipse.agent;
+import org.mangosdk.spi.ProviderFor;
import org.objectweb.asm.ClassAdapter;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassVisitor;
@@ -29,15 +30,16 @@ import org.objectweb.asm.FieldVisitor;
import org.objectweb.asm.Opcodes;
/**
- * Transforms Eclipse's <code>org.eclipse.jdt.internal.compiler.ast CompilationUnitDeclaration</code> class,
+ * Transforms Eclipse's <code>org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration</code> class,
* which is the top-level AST Node class for Eclipse.
*
* Transformations applied:<ul>
* <li>A field is added: 'public transient Object $lombokAST = null;'. We use it to cache our own AST object,
* usually of type <code>lombok.eclipse.EclipseAST.</code></li></ul>
*/
-class EclipseCUDTransformer {
- byte[] transform(byte[] classfileBuffer) {
+@ProviderFor(EclipseTransformer.class)
+public class EclipseCUDTransformer implements EclipseTransformer {
+ public byte[] transform(byte[] classfileBuffer) {
ClassReader reader = new ClassReader(classfileBuffer);
ClassWriter writer = new ClassWriter(reader, 0);
@@ -57,4 +59,8 @@ class EclipseCUDTransformer {
cv.visitEnd();
}
}
+
+ @Override public String getTargetClassName() {
+ return "org/eclipse/jdt/internal/compiler/ast/CompilationUnitDeclaration";
+ }
}