diff options
author | Reinier Zwitserloot <reinier@tipit.to> | 2009-06-09 18:27:10 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@tipit.to> | 2009-06-09 18:27:10 +0200 |
commit | 41fb7cba62b543243c784757d1af4e05824ddc4e (patch) | |
tree | b910a78f31576d08f7a95440edb8f630cf4164eb /src/lombok/agent/eclipse/TransformCompilationUnitDeclaration.java | |
parent | 525211b872b982b880aa2bed5e263ec582593f0d (diff) | |
download | lombok-41fb7cba62b543243c784757d1af4e05824ddc4e.tar.gz lombok-41fb7cba62b543243c784757d1af4e05824ddc4e.tar.bz2 lombok-41fb7cba62b543243c784757d1af4e05824ddc4e.zip |
Many changes:
- Split off the actual agent work into a separate src package in preparation for creating separate jars. Involved a lot of renaming
- Renamed TransformCompilationUnitDeclaration to TransformEclipseAST, as this class will also be transforming e.g. MethodDeclaration objects.
- Expanded the patching to also patch in transform calls when the parser fills in the Statement array for existing constructors, methods, and initializers.
- Redesigned the ClassLoaderWorkaround class quite a bit.
- Positioning should not work correctly ('jump to method' should jump to the getter annotation).
(Apparently, Clinit objects are always fully parsed in the original run, so no need to patch anything there).
Diffstat (limited to 'src/lombok/agent/eclipse/TransformCompilationUnitDeclaration.java')
-rw-r--r-- | src/lombok/agent/eclipse/TransformCompilationUnitDeclaration.java | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/lombok/agent/eclipse/TransformCompilationUnitDeclaration.java b/src/lombok/agent/eclipse/TransformCompilationUnitDeclaration.java deleted file mode 100644 index 7c29a795..00000000 --- a/src/lombok/agent/eclipse/TransformCompilationUnitDeclaration.java +++ /dev/null @@ -1,22 +0,0 @@ -package lombok.agent.eclipse; - -import org.eclipse.jdt.internal.compiler.ast.Annotation; -import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration; -import org.eclipse.jdt.internal.compiler.ast.FieldDeclaration; -import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration; - -public class TransformCompilationUnitDeclaration { - /** This is a 'magic' method signature - it is this one that will be called. Don't rename anything! */ - - public static void transform(CompilationUnitDeclaration ast) { - if ( ast.types != null ) for ( TypeDeclaration type : ast.types ) { - if ( type.fields != null ) for ( FieldDeclaration field : type.fields ) { - if ( field.annotations != null ) for ( Annotation annotation : field.annotations ) { - if ( annotation.type.toString().equals("Getter") ) { - new HandleGetter_ecj().apply(type, field); - } - } - } - } - } -} |