public MethodTreeImpl(
      @Nullable TypeTree returnType,
      IdentifierTree simpleName,
      FormalParametersListTreeImpl parameters,
      @Nullable SyntaxToken throwsToken,
      ListTree<TypeTree> throwsClauses,
      @Nullable BlockTree block,
      @Nullable SyntaxToken semicolonToken) {

    super(returnType == null ? Kind.CONSTRUCTOR : Kind.METHOD);

    this.typeParameters = new TypeParameterListTreeImpl();
    this.modifiers = null;
    this.returnType = returnType;
    this.simpleName = Preconditions.checkNotNull(simpleName);
    this.parameters = Preconditions.checkNotNull(parameters);
    this.openParenToken = parameters.openParenToken();
    this.closeParenToken = parameters.closeParenToken();
    this.block = block;
    this.semicolonToken = semicolonToken;
    this.throwsToken = throwsToken;
    this.throwsClauses = Preconditions.checkNotNull(throwsClauses);
    this.defaultToken = null;
    this.defaultValue = null;
  }
 public MethodTreeImpl(
     FormalParametersListTreeImpl parameters,
     @Nullable SyntaxToken defaultToken,
     @Nullable ExpressionTree defaultValue) {
   super(Kind.METHOD);
   this.typeParameters = new TypeParameterListTreeImpl();
   this.parameters = parameters;
   this.openParenToken = parameters.openParenToken();
   this.closeParenToken = parameters.closeParenToken();
   this.block = null;
   this.throwsToken = null;
   this.throwsClauses = QualifiedIdentifierListTreeImpl.emptyList();
   this.defaultToken = defaultToken;
   this.defaultValue = defaultValue;
 }