Example #1
0
 public <T extends JCTree> T build(final lombok.ast.Node<?> node, final Class<T> extectedType) {
   if (node == null) return null;
   JCTree tree = node.accept(this, null);
   if ((JCStatement.class == extectedType) && (tree instanceof JCExpression)) {
     tree = M(node).Exec((JCExpression) tree);
   }
   return Cast.<T>uncheckedCast(tree);
 }
Example #2
0
 private TreeMaker M(final lombok.ast.Node<?> node) {
   final JCTree posHint = node.posHint();
   return sourceNode.getTreeMaker().at(posHint == null ? source.pos : posHint.pos);
 }