aboutsummaryrefslogtreecommitdiff
path: root/src/utils/lombok/javac/java6/CommentCollectingParser.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/lombok/javac/java6/CommentCollectingParser.java')
-rw-r--r--src/utils/lombok/javac/java6/CommentCollectingParser.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/utils/lombok/javac/java6/CommentCollectingParser.java b/src/utils/lombok/javac/java6/CommentCollectingParser.java
index 215bf5b6..d5d3c256 100644
--- a/src/utils/lombok/javac/java6/CommentCollectingParser.java
+++ b/src/utils/lombok/javac/java6/CommentCollectingParser.java
@@ -21,7 +21,7 @@
*/
package lombok.javac.java6;
-import lombok.core.ReferenceFieldAugment;
+import static lombok.javac.CommentCatcher.JCCompilationUnit_comments;
import lombok.javac.CommentInfo;
import com.sun.tools.javac.parser.EndPosParser;
@@ -31,21 +31,18 @@ import com.sun.tools.javac.tree.JCTree.JCCompilationUnit;
import com.sun.tools.javac.util.List;
class CommentCollectingParser extends EndPosParser {
-
- private final ReferenceFieldAugment<JCCompilationUnit, List<CommentInfo>> commentsField;
private final Lexer lexer;
- protected CommentCollectingParser(Parser.Factory fac, Lexer S, boolean keepDocComments, ReferenceFieldAugment<JCCompilationUnit, List<CommentInfo>> commentsField) {
+ protected CommentCollectingParser(Parser.Factory fac, Lexer S, boolean keepDocComments) {
super(fac, S, keepDocComments);
lexer = S;
- this.commentsField = commentsField;
}
@Override public JCCompilationUnit compilationUnit() {
JCCompilationUnit result = super.compilationUnit();
if (lexer instanceof CommentCollectingScanner) {
List<CommentInfo> comments = ((CommentCollectingScanner)lexer).getComments();
- commentsField.set(result, comments);
+ JCCompilationUnit_comments.set(result, comments);
}
return result;
}