@Override public boolean visitMethodDeclaration(MethodDeclaration node) { JCMethodDecl methodDef = treeMaker.MethodDef( (JCModifiers)toTree(node.astModifiers()), toName(node.astMethodName()), toExpression(node.astReturnTypeReference()), toList(JCTypeParameter.class, node.astTypeVariables()), toList(JCVariableDecl.class, node.astParameters()), toList(JCExpression.class, node.astThrownTypeReferences()), (JCBlock)toTree(node.astBody()), null ); for (JCVariableDecl decl : methodDef.params) { decl.mods.flags |= Flags.PARAMETER; } int start = node.astMethodName().getPosition().getStart(); int end = node.getPosition().getEnd(); return set(node, setPos(start, end, methodDef)); }
@Override public boolean visitMethodDeclaration(MethodDeclaration node) { JCMethodDecl methodDef = treeMaker.MethodDef( (JCModifiers)toTree(node.astModifiers()), toName(node.astMethodName()), toExpression(node.astReturnTypeReference()), toList(JCTypeParameter.class, node.astTypeVariables()), toList(JCVariableDecl.class, node.astParameters()), toList(JCExpression.class, node.astThrownTypeReferences()), (JCBlock)toTree(node.astBody()), null ); for (JCVariableDecl decl : methodDef.params) { decl.mods.flags |= Flags.PARAMETER; } int start = node.astMethodName().getPosition().getStart(); int end = node.getPosition().getEnd(); return set(node, setPos(start, end, methodDef)); }
@Override public boolean visitMethodDeclaration(MethodDeclaration node) { JCMethodDecl methodDef = treeMaker.MethodDef( (JCModifiers)toTree(node.astModifiers()), toName(node.astMethodName()), toExpression(node.astReturnTypeReference()), toList(JCTypeParameter.class, node.astTypeVariables()), toList(JCVariableDecl.class, node.astParameters()), toList(JCExpression.class, node.astThrownTypeReferences()), (JCBlock)toTree(node.astBody()), null ); for (JCVariableDecl decl : methodDef.params) { decl.mods.flags |= Flags.PARAMETER; } int start = node.astMethodName().getPosition().getStart(); int end = node.getPosition().getEnd(); return set(node, setPos(start, end, methodDef)); }