aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/javac/handlers/HandleVal.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2011-10-24 21:48:43 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2011-10-24 22:02:14 +0200
commitc402dd86379e532895f73ee209c432f84bb5f421 (patch)
treef5d59432ec551caf2b02c88279a9d8890ef5e26b /src/core/lombok/javac/handlers/HandleVal.java
parent335d6e64c66f85110cc8cafbe1155917e821db68 (diff)
downloadlombok-c402dd86379e532895f73ee209c432f84bb5f421.tar.gz
lombok-c402dd86379e532895f73ee209c432f84bb5f421.tar.bz2
lombok-c402dd86379e532895f73ee209c432f84bb5f421.zip
pretty big refactor; introduced a new source package which should be (and is) separately compilable, i.e. has no deps on any of the others.
This is preparation work for being able to access some of these from lombok.ast without creating a cyclic dependency nightmare.
Diffstat (limited to 'src/core/lombok/javac/handlers/HandleVal.java')
-rw-r--r--src/core/lombok/javac/handlers/HandleVal.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/lombok/javac/handlers/HandleVal.java b/src/core/lombok/javac/handlers/HandleVal.java
index bc70899d..b8de8996 100644
--- a/src/core/lombok/javac/handlers/HandleVal.java
+++ b/src/core/lombok/javac/handlers/HandleVal.java
@@ -21,8 +21,9 @@
*/
package lombok.javac.handlers;
+import static lombok.javac.handlers.JavacHandlerUtil.*;
+
import lombok.val;
-import lombok.javac.Javac;
import lombok.javac.JavacASTAdapter;
import lombok.javac.JavacASTVisitor;
import lombok.javac.JavacNode;
@@ -51,7 +52,7 @@ public class HandleVal extends JavacASTAdapter {
JCTree source = local.vartype;
- if (!Javac.typeMatches(val.class, localNode, local.vartype)) return;
+ if (!typeMatches(val.class, localNode, local.vartype)) return;
JCExpression rhsOfEnhancedForLoop = null;
if (local.init == null) {
@@ -77,7 +78,7 @@ public class HandleVal extends JavacASTAdapter {
local.mods.flags |= Flags.FINAL;
if (!localNode.shouldDeleteLombokAnnotations()) {
- JCAnnotation valAnnotation = Javac.recursiveSetGeneratedBy(localNode.getTreeMaker().Annotation(local.vartype, List.<JCExpression>nil()), source);
+ JCAnnotation valAnnotation = recursiveSetGeneratedBy(localNode.getTreeMaker().Annotation(local.vartype, List.<JCExpression>nil()), source);
local.mods.annotations = local.mods.annotations == null ? List.of(valAnnotation) : local.mods.annotations.append(valAnnotation);
}
@@ -126,7 +127,7 @@ public class HandleVal extends JavacASTAdapter {
local.vartype = JavacResolution.createJavaLangObject(localNode.getTreeMaker(), localNode.getAst());
throw e;
} finally {
- Javac.recursiveSetGeneratedBy(local.vartype, source);
+ recursiveSetGeneratedBy(local.vartype, source);
}
}
}