aboutsummaryrefslogtreecommitdiff
path: root/src/utils/lombok/javac/java7/CommentCollectingParser.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/lombok/javac/java7/CommentCollectingParser.java')
-rw-r--r--src/utils/lombok/javac/java7/CommentCollectingParser.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/utils/lombok/javac/java7/CommentCollectingParser.java b/src/utils/lombok/javac/java7/CommentCollectingParser.java
index 0e8a4ef6..27d731ba 100644
--- a/src/utils/lombok/javac/java7/CommentCollectingParser.java
+++ b/src/utils/lombok/javac/java7/CommentCollectingParser.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013 The Project Lombok Authors.
+ * Copyright (C) 2013-2014 The Project Lombok Authors.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -22,8 +22,8 @@
package lombok.javac.java7;
import java.util.List;
-import java.util.Map;
+import lombok.core.ReferenceFieldAugment;
import lombok.javac.CommentInfo;
import com.sun.tools.javac.parser.EndPosParser;
@@ -32,21 +32,21 @@ import com.sun.tools.javac.parser.ParserFactory;
import com.sun.tools.javac.tree.JCTree.JCCompilationUnit;
class CommentCollectingParser extends EndPosParser {
- private final Map<JCCompilationUnit, List<CommentInfo>> commentsMap;
+ private final ReferenceFieldAugment<JCCompilationUnit, List<CommentInfo>> commentsField;
private final Lexer lexer;
protected CommentCollectingParser(ParserFactory fac, Lexer S,
- boolean keepDocComments, boolean keepLineMap, Map<JCCompilationUnit, List<CommentInfo>> commentsMap) {
+ boolean keepDocComments, boolean keepLineMap, ReferenceFieldAugment<JCCompilationUnit, List<CommentInfo>> commentsField) {
super(fac, S, keepDocComments, keepLineMap);
lexer = S;
- this.commentsMap = commentsMap;
+ this.commentsField = commentsField;
}
public JCCompilationUnit parseCompilationUnit() {
JCCompilationUnit result = super.parseCompilationUnit();
if (lexer instanceof CommentCollectingScanner) {
List<CommentInfo> comments = ((CommentCollectingScanner)lexer).getComments();
- commentsMap.put(result, comments);
+ commentsField.set(result, comments);
}
return result;
}