Class Invocation.Builder

java.lang.Object
com.github.thought2code.mcp.annotated.reflect.Invocation.Builder
Enclosing class:
Invocation

public static final class Invocation.Builder extends Object
This class implements the builder pattern for creating a new instance of InvocationResult.
Author:
codeboyzhou
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • result

      public Invocation.Builder result(Object result)
      Sets the result of the invocation.
      Parameters:
      result - the result of the invocation
      Returns:
      the builder instance
    • isError

      public Invocation.Builder isError(boolean isError)
      Sets whether an exception occurred during the invocation.
      Parameters:
      isError - true if an exception occurred, false otherwise
      Returns:
      the builder instance
    • build

      public Invocation build()
      Builds a new instance of InvocationResult with the configured values.
      Returns:
      a new instance of InvocationResult