Class InvocationResult.Builder

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

public static final class InvocationResult.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 InvocationResult.Builder result(Object result)
      Sets the result of the invocation.
      Parameters:
      result - the result of the invocation
      Returns:
      the builder instance
    • exception

      public InvocationResult.Builder exception(Exception exception)
      Sets the exception that occurred during the invocation.
      Parameters:
      exception - the exception that occurred during the invocation
      Returns:
      the builder instance
    • build

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