diff options
author | Reinier Zwitserloot <reinier@tipit.to> | 2009-06-24 01:23:10 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@tipit.to> | 2009-06-24 01:23:10 +0200 |
commit | 6d425594176e8493ecec4d5e958a2dcbd611eeb1 (patch) | |
tree | 08c86f7b155949b1f7ab9fc59b0a8fa288868f55 /src/lombok/javac/HandlerLibrary.java | |
parent | c346b5c0546364e1721d0eda37ea5b465a20de0d (diff) | |
download | lombok-6d425594176e8493ecec4d5e958a2dcbd611eeb1.tar.gz lombok-6d425594176e8493ecec4d5e958a2dcbd611eeb1.tar.bz2 lombok-6d425594176e8493ecec4d5e958a2dcbd611eeb1.zip |
Work on HandleData, as well as generalizing features in the the PKG class and updating HandleGetter/Setter to call into it.
Diffstat (limited to 'src/lombok/javac/HandlerLibrary.java')
-rw-r--r-- | src/lombok/javac/HandlerLibrary.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lombok/javac/HandlerLibrary.java b/src/lombok/javac/HandlerLibrary.java index f9404668..ab5388d3 100644 --- a/src/lombok/javac/HandlerLibrary.java +++ b/src/lombok/javac/HandlerLibrary.java @@ -13,6 +13,7 @@ import javax.annotation.processing.Messager; import javax.lang.model.element.TypeElement; import javax.tools.Diagnostic; +import lombok.core.PrintAST; import lombok.core.SpiLoadUtil; import lombok.core.TypeLibrary; import lombok.core.TypeResolver; @@ -27,6 +28,7 @@ public class HandlerLibrary { private final Map<String, AnnotationHandlerContainer<?>> annotationHandlers = new HashMap<String, AnnotationHandlerContainer<?>>(); private final Collection<JavacASTVisitor> visitorHandlers = new ArrayList<JavacASTVisitor>(); private final Messager messager; + private boolean skipPrintAST = true; public HandlerLibrary(Messager messager) { this.messager = messager; @@ -111,6 +113,8 @@ public class HandlerLibrary { String rawType = annotation.annotationType.toString(); boolean handled = false; for ( String fqn : resolver.findTypeMatches(node, rawType) ) { + boolean isPrintAST = fqn.equals(PrintAST.class.getName()); + if ( isPrintAST == skipPrintAST ) continue; AnnotationHandlerContainer<?> container = annotationHandlers.get(fqn); if ( container == null ) continue; @@ -137,4 +141,12 @@ public class HandlerLibrary { public boolean hasHandlerFor(TypeElement annotationType) { return annotationHandlers.containsKey(annotationType.getQualifiedName().toString()); } + + public void skipPrintAST() { + skipPrintAST = true; + } + + public void skipAllButPrintAST() { + skipPrintAST = false; + } } |