diff options
Diffstat (limited to 'src/lombok/javac/JavacAST.java')
-rw-r--r-- | src/lombok/javac/JavacAST.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/lombok/javac/JavacAST.java b/src/lombok/javac/JavacAST.java index 7050df75..f0544256 100644 --- a/src/lombok/javac/JavacAST.java +++ b/src/lombok/javac/JavacAST.java @@ -94,6 +94,31 @@ public class JavacAST extends AST<JCTree> { return symtab; } + @Override protected Node buildTree(JCTree node, Kind kind) { + switch ( kind ) { + case COMPILATION_UNIT: + return buildCompilationUnit((JCCompilationUnit) node); + case TYPE: + return buildType((JCClassDecl) node); + case FIELD: + return buildField((JCVariableDecl) node); + case INITIALIZER: + return buildInitializer((JCBlock) node); + case METHOD: + return buildMethod((JCMethodDecl) node); + case ARGUMENT: + return buildLocalVar((JCVariableDecl) node, kind); + case LOCAL: + return buildLocalVar((JCVariableDecl) node, kind); + case STATEMENT: + return buildStatementOrExpression(node); + case ANNOTATION: + return buildAnnotation((JCAnnotation) node); + default: + throw new AssertionError("Did not expect: " + kind); + } + } + private Node buildCompilationUnit(JCCompilationUnit top) { List<Node> childNodes = new ArrayList<Node>(); for ( JCTree s : top.defs ) { @@ -310,6 +335,11 @@ public class JavacAST extends AST<JCTree> { } /** {@inheritDoc} */ + @Override public Node getNodeFor(JCTree obj) { + return (Node) super.getNodeFor(obj); + } + + /** {@inheritDoc} */ @Override public Node directUp() { return (Node) super.directUp(); } |