// Path: src/core/lombok/core/util/Arrays.java
// public final class Arrays {
// 
//   /**
//    * Convenience method for creating arrays.
//    * @param <T> the type of elements of the array.
//    * @param elements the array, in varargs form.
//    * @return the given array in varargs form.
//    */
//   public static <T> T[] array(T...elements) {
//     return elements;
//   }
//   
//   /**
//    * Returns a copy of the given array.
//    * @param <T> the type of the given array.
//    * @param array the given array.
//    * @return a copy of the given array.
//    */
//   public static <T> T[] copy(T[] array) {
//     return copyOf(array, array.length);
//   }
//   
//   /**
//    * Indicates whether the given array has elements or not.
//    * @param array the given array.
//    * @return {@code true} if the given array is not {@code null} and contains at least one element; {@code false} 
//    * otherwise.
//    */
//   public static boolean isNotEmpty(Object[] array) {
//     return array != null && array.length > 0;
//   }
// 
//   private Arrays() {}
// }
// 
// Path: src/eclipse/lombok/eclipse/handlers/Eclipse.java
// static MethodDeclaration methodDeclaration(CompilationResult compilationResult, ASTNode source) {
//   MethodDeclaration method = new MethodDeclaration(compilationResult);
//   copySourceStartAndEnt(source, method);
//   setGeneratedBy(method, source);
//   return method;
// }
// 
// Path: src/eclipse/lombok/eclipse/handlers/MemberChecks.java
// static boolean isField(EclipseNode node) {
//   return FIELD.equals(node.getKind());
// }


import static lombok.core.util.Arrays.*;
import static lombok.eclipse.Eclipse.ECLIPSE_DO_NOT_TOUCH_FLAG;
import static lombok.eclipse.handlers.Eclipse.methodDeclaration;
import static lombok.eclipse.handlers.MemberChecks.isField;
import lombok.eclipse.EclipseNode;
import org.eclipse.jdt.internal.compiler.ast.*;
  }

  MethodBuilder withReturnType(TypeReference newReturnType) {
    returnType = newReturnType;
    return this;
  }

  MethodBuilder withParameters(Argument[] newParameters) {
    parameters = copy(newParameters);
    return this;
  }

  MethodBuilder withThrowsClauses(TypeReference[] newThrowsClauses) {
    throwsClauses = copy(newThrowsClauses);
    return this;
  }

  MethodBuilder withBody(Statement[] newBody) {
    body = copy(newBody);
    return this;
  }

  MethodBuilder withAnnotations(Annotation[] newAnnotations) {
    annotations = copy(newAnnotations);
    return this;
  }

  MethodDeclaration buildWith(EclipseNode node) {
    TypeDeclaration parent = parentOf(node);
    ASTNode source = node.get();
// Path: src/core/lombok/core/util/Arrays.java
// public final class Arrays {
// 
//   /**
//    * Convenience method for creating arrays.
//    * @param <T> the type of elements of the array.
//    * @param elements the array, in varargs form.
//    * @return the given array in varargs form.
//    */
//   public static <T> T[] array(T...elements) {
//     return elements;
//   }
//   
//   /**
//    * Returns a copy of the given array.
//    * @param <T> the type of the given array.
//    * @param array the given array.
//    * @return a copy of the given array.
//    */
//   public static <T> T[] copy(T[] array) {
//     return copyOf(array, array.length);
//   }
//   
//   /**
//    * Indicates whether the given array has elements or not.
//    * @param array the given array.
//    * @return {@code true} if the given array is not {@code null} and contains at least one element; {@code false} 
//    * otherwise.
//    */
//   public static boolean isNotEmpty(Object[] array) {
//     return array != null && array.length > 0;
//   }
// 
//   private Arrays() {}
// }
// 
// Path: src/eclipse/lombok/eclipse/handlers/Eclipse.java
// static MethodDeclaration methodDeclaration(CompilationResult compilationResult, ASTNode source) {
//   MethodDeclaration method = new MethodDeclaration(compilationResult);
//   copySourceStartAndEnt(source, method);
//   setGeneratedBy(method, source);
//   return method;
// }
// 
// Path: src/eclipse/lombok/eclipse/handlers/MemberChecks.java
// static boolean isField(EclipseNode node) {
//   return FIELD.equals(node.getKind());
// }


// Path: src/eclipse/lombok/eclipse/handlers/MethodBuilder.java
import static lombok.core.util.Arrays.*;
import static lombok.eclipse.Eclipse.ECLIPSE_DO_NOT_TOUCH_FLAG;
import static lombok.eclipse.handlers.Eclipse.methodDeclaration;
import static lombok.eclipse.handlers.MemberChecks.isField;
import lombok.eclipse.EclipseNode;
import org.eclipse.jdt.internal.compiler.ast.*;

  }

  MethodBuilder withReturnType(TypeReference newReturnType) {
    returnType = newReturnType;
    return this;
  }

  MethodBuilder withParameters(Argument[] newParameters) {
    parameters = copy(newParameters);
    return this;
  }

  MethodBuilder withThrowsClauses(TypeReference[] newThrowsClauses) {
    throwsClauses = copy(newThrowsClauses);
    return this;
  }

  MethodBuilder withBody(Statement[] newBody) {
    body = copy(newBody);
    return this;
  }

  MethodBuilder withAnnotations(Annotation[] newAnnotations) {
    annotations = copy(newAnnotations);
    return this;
  }

  MethodDeclaration buildWith(EclipseNode node) {
    TypeDeclaration parent = parentOf(node);
    ASTNode source = node.get();
    MethodDeclaration method = methodDeclaration(parent.compilationResult, source);