Class CompositeProxy.Builder

java.lang.Object
jdk.jpackage.internal.util.CompositeProxy.Builder
Enclosing class:
CompositeProxy

public static final class CompositeProxy.Builder extends Object
Builder of CompositeProxy instances.
  • Method Details

    • create

      public <T> T create(Class<T> interfaceType, Object... slices)
      Returns a proxy instance for the specified interface that dispatches method invocations to the specified handlers. Uses previously configured invocation tunnel and conflict resolver objects with the created proxy object.
      Type Parameters:
      T - the interface type
      Parameters:
      interfaceType - the interface class composite proxy instance should implement
      slices - handlers for the method calls of the interface
      Returns:
      a new instance of Proxy implementing the given interface and dispatching the interface method invocations to the given handlers
    • conflictResolver

      public CompositeProxy.Builder conflictResolver(BinaryOperator<Method> v)
      Sets the method dispatch conflict resolver for this builder. The conflict resolver is used by composite proxy to select a method call handler from multiple candidates.
      Parameters:
      v - the conflict resolver for this builder or null if the default conflict resolver should be used
      Returns:
      this
    • invokeTunnel

      Sets the invocation tunnel for this builder.
      Parameters:
      v - the invocation tunnel for this builder or null if no invocation tunnel should be used
      Returns:
      this