diff options
author | Roel Spilker <r.spilker@gmail.com> | 2010-11-22 23:02:08 +0100 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2010-11-22 23:02:08 +0100 |
commit | 8eb05b357d37b8e58cfb4ecb331371c88f1a856b (patch) | |
tree | 6576e7498333121091568bfaca600278977611df /src/core/lombok/javac/JavacResolution.java | |
parent | 3a89cbe7e7610c649c45e3647d766fdb027f068d (diff) | |
parent | 7dede9a6647ded762701d70d6e71066557196fb5 (diff) | |
download | lombok-8eb05b357d37b8e58cfb4ecb331371c88f1a856b.tar.gz lombok-8eb05b357d37b8e58cfb4ecb331371c88f1a856b.tar.bz2 lombok-8eb05b357d37b8e58cfb4ecb331371c88f1a856b.zip |
Merge branch 'master' of git@github.com:rzwitserloot/lombok
Diffstat (limited to 'src/core/lombok/javac/JavacResolution.java')
-rw-r--r-- | src/core/lombok/javac/JavacResolution.java | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/core/lombok/javac/JavacResolution.java b/src/core/lombok/javac/JavacResolution.java index 653e6d6d..730cca31 100644 --- a/src/core/lombok/javac/JavacResolution.java +++ b/src/core/lombok/javac/JavacResolution.java @@ -242,7 +242,7 @@ public class JavacResolution { } } - public Map<JCTree, JCTree> resolve(JavacNode node) { + public Map<JCTree, JCTree> resolveMethodMember(JavacNode node) { ArrayDeque<JCTree> stack = new ArrayDeque<JCTree>(); { @@ -268,6 +268,28 @@ public class JavacResolution { } } + public void resolveClassMember(JavacNode node) { + ArrayDeque<JCTree> stack = new ArrayDeque<JCTree>(); + + { + JavacNode n = node; + while (n != null) { + stack.push(n.get()); + n = n.up(); + } + } + + logDisabler.disableLoggers(); + try { + EnvFinder finder = new EnvFinder(node.getContext()); + while (!stack.isEmpty()) stack.pop().accept(finder); + + attrib(node.get(), finder.get()); + } finally { + logDisabler.enableLoggers(); + } + } + private void attrib(JCTree tree, Env<AttrContext> env) { if (tree instanceof JCBlock) attr.attribStat(tree, env); else if (tree instanceof JCMethodDecl) attr.attribStat(((JCMethodDecl)tree).body, env); |