createArgumentList(declaration, arguments, new IArgumentFactory() {
createArgumentList(declaration, arguments, new IArgumentFactory() {
createArgumentList(declaration, arguments, new IArgumentFactory() {
declaration.accept(finder); final List arguments= new ArrayList(declaration.parameters().size() + 1); final boolean result= createArgumentList(declaration, arguments, new VisibilityAdjustingArgumentFactory(ast, rewrites, adjustments) {
declaration.accept(finder); final List<ASTNode> arguments= new ArrayList<>(declaration.parameters().size() + 1); createArgumentList(declaration, arguments, new VisibilityAdjustingArgumentFactory(ast, rewrites, adjustments) {
declaration.accept(finder); final List<ASTNode> arguments= new ArrayList<>(declaration.parameters().size() + 1); createArgumentList(declaration, arguments, new VisibilityAdjustingArgumentFactory(ast, rewrites, adjustments) {
reference.setName(ast.newSimpleName(fMethodName)); reference.setQualifier(ASTNodeFactory.newName(ast, JavaModelUtil.getFullyQualifiedName(fTargetType))); createArgumentList(declaration, reference.parameters(), new IArgumentFactory() {
reference.setName(ast.newSimpleName(fMethodName)); reference.setQualifier(ASTNodeFactory.newName(ast, fTargetType.getFullyQualifiedName('.'))); createArgumentList(declaration, reference.parameters(), new IArgumentFactory() {
reference.setName(ast.newSimpleName(fMethodName)); reference.setQualifier(ASTNodeFactory.newName(ast, fTargetType.getFullyQualifiedName('.'))); createArgumentList(declaration, reference.parameters(), new IArgumentFactory() {
protected ASTNode createBody(BodyDeclaration bd) throws JavaModelException { MethodDeclaration methodDeclaration= (MethodDeclaration) bd; final MethodInvocation invocation= getAst().newMethodInvocation(); invocation.setName(getAst().newSimpleName(getNewElementName())); invocation.setExpression(createSimpleTargetAccessExpression(methodDeclaration)); fNeededInsertion= createArgumentList(methodDeclaration, invocation.arguments(), new VisibilityAdjustingArgumentFactory(getAst(), fRewrites, fAdjustments)); final Block block= getAst().newBlock(); block.statements().add(createMethodInvocation(methodDeclaration, invocation)); if (!fSourceRewrite.getCu().equals(fTargetType.getCompilationUnit())) fSourceRewrite.getImportRemover().registerRemovedNode(methodDeclaration.getBody()); return block; }
@Override protected ASTNode createBody(BodyDeclaration bd) throws JavaModelException { MethodDeclaration methodDeclaration= (MethodDeclaration) bd; final MethodInvocation invocation= getAst().newMethodInvocation(); invocation.setName(getAst().newSimpleName(getNewElementName())); invocation.setExpression(createSimpleTargetAccessExpression(methodDeclaration)); createArgumentList(methodDeclaration, invocation.arguments(), new VisibilityAdjustingArgumentFactory(getAst(), fRewrites, fAdjustments)); final Block block= getAst().newBlock(); block.statements().add(createMethodInvocation(methodDeclaration, invocation)); if (!fSourceRewrite.getCu().equals(fTargetType.getCompilationUnit())) fSourceRewrite.getImportRemover().registerRemovedNode(methodDeclaration.getBody()); return block; }
@Override protected ASTNode createBody(BodyDeclaration bd) throws JavaModelException { MethodDeclaration methodDeclaration= (MethodDeclaration) bd; final MethodInvocation invocation= getAst().newMethodInvocation(); invocation.setName(getAst().newSimpleName(getNewElementName())); invocation.setExpression(createSimpleTargetAccessExpression(methodDeclaration)); createArgumentList(methodDeclaration, invocation.arguments(), new VisibilityAdjustingArgumentFactory(getAst(), fRewrites, fAdjustments)); final Block block= getAst().newBlock(); block.statements().add(createMethodInvocation(methodDeclaration, invocation)); if (!fSourceRewrite.getCu().equals(fTargetType.getCompilationUnit())) fSourceRewrite.getImportRemover().registerRemovedNode(methodDeclaration.getBody()); return block; }