Record Class DefaultRPCImplementationBuilder.DefaultInstanceAllocator<T>

java.lang.Object
java.lang.Record
eu.cloudnetservice.driver.impl.network.rpc.generation.DefaultRPCImplementationBuilder.DefaultInstanceAllocator<T>
Type Parameters:
T - the type that is being constructed by the allocator.
Record Components:
baseRPC - the base rpc to use for the constructed rpc implementation.
classRPCSender - the rpc sender to use for the generated class.
channelSupplier - thw channel supplier to use for rpc executions.
additionalConstructorParameters - the additional super constructor parameters.
internalInstanceFactory - the internal instance factory to delegate to.
All Implemented Interfaces:
eu.cloudnetservice.driver.network.rpc.factory.RPCImplementationBuilder.InstanceAllocator<T>
Enclosing class:
DefaultRPCImplementationBuilder<T>

private static record DefaultRPCImplementationBuilder.DefaultInstanceAllocator<T>(@Nullable eu.cloudnetservice.driver.network.rpc.ChainableRPC baseRPC, @NonNull eu.cloudnetservice.driver.network.rpc.RPCSender classRPCSender, @NonNull Supplier<eu.cloudnetservice.driver.network.NetworkChannel> channelSupplier, @NonNull Object[] additionalConstructorParameters, @NonNull RPCInternalInstanceFactory internalInstanceFactory) extends Record implements eu.cloudnetservice.driver.network.rpc.factory.RPCImplementationBuilder.InstanceAllocator<T>
The default implementation of an instance allocator using an internal instance factory as delegation.
Since:
4.0
  • Field Details

  • Constructor Details

  • Method Details

    • withBaseRPC

      @NonNull public @NonNull eu.cloudnetservice.driver.network.rpc.factory.RPCImplementationBuilder.InstanceAllocator<T> withBaseRPC(@Nullable @Nullable eu.cloudnetservice.driver.network.rpc.ChainableRPC baseRPC)
      Specified by:
      withBaseRPC in interface eu.cloudnetservice.driver.network.rpc.factory.RPCImplementationBuilder.InstanceAllocator<T>
    • withTargetChannel

      @NonNull public @NonNull eu.cloudnetservice.driver.network.rpc.factory.RPCImplementationBuilder.InstanceAllocator<T> withTargetChannel(@NonNull @NonNull Supplier<eu.cloudnetservice.driver.network.NetworkChannel> channelSupplier)
      Specified by:
      withTargetChannel in interface eu.cloudnetservice.driver.network.rpc.factory.RPCImplementationBuilder.InstanceAllocator<T>
    • withAdditionalConstructorParameters

      @NonNull public @NonNull eu.cloudnetservice.driver.network.rpc.factory.RPCImplementationBuilder.InstanceAllocator<T> withAdditionalConstructorParameters(Object... additionalConstructorParams)
      Specified by:
      withAdditionalConstructorParameters in interface eu.cloudnetservice.driver.network.rpc.factory.RPCImplementationBuilder.InstanceAllocator<T>
    • changeConstructorParameter

      @NonNull public @NonNull eu.cloudnetservice.driver.network.rpc.factory.RPCImplementationBuilder.InstanceAllocator<T> changeConstructorParameter(int index, Object newConstructorParameter)
      Specified by:
      changeConstructorParameter in interface eu.cloudnetservice.driver.network.rpc.factory.RPCImplementationBuilder.InstanceAllocator<T>
    • insertConstructorParameters

      @NonNull public @NonNull eu.cloudnetservice.driver.network.rpc.factory.RPCImplementationBuilder.InstanceAllocator<T> insertConstructorParameters(int index, Object... parameters)
      Specified by:
      insertConstructorParameters in interface eu.cloudnetservice.driver.network.rpc.factory.RPCImplementationBuilder.InstanceAllocator<T>
    • appendConstructorParameters

      @NonNull public @NonNull eu.cloudnetservice.driver.network.rpc.factory.RPCImplementationBuilder.InstanceAllocator<T> appendConstructorParameters(Object... parameters)
      Specified by:
      appendConstructorParameters in interface eu.cloudnetservice.driver.network.rpc.factory.RPCImplementationBuilder.InstanceAllocator<T>
    • allocate

      @NonNull public T allocate()
      Specified by:
      allocate in interface eu.cloudnetservice.driver.network.rpc.factory.RPCImplementationBuilder.InstanceAllocator<T>
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • baseRPC

      @Nullable public @Nullable eu.cloudnetservice.driver.network.rpc.ChainableRPC baseRPC()
      Returns the value of the baseRPC record component.
      Returns:
      the value of the baseRPC record component
    • classRPCSender

      @NonNull public @NonNull eu.cloudnetservice.driver.network.rpc.RPCSender classRPCSender()
      Returns the value of the classRPCSender record component.
      Returns:
      the value of the classRPCSender record component
    • channelSupplier

      @NonNull public @NonNull Supplier<eu.cloudnetservice.driver.network.NetworkChannel> channelSupplier()
      Returns the value of the channelSupplier record component.
      Returns:
      the value of the channelSupplier record component
    • additionalConstructorParameters

      @NonNull public @NonNull Object[] additionalConstructorParameters()
      Returns the value of the additionalConstructorParameters record component.
      Returns:
      the value of the additionalConstructorParameters record component
    • internalInstanceFactory

      @NonNull public @NonNull RPCInternalInstanceFactory internalInstanceFactory()
      Returns the value of the internalInstanceFactory record component.
      Returns:
      the value of the internalInstanceFactory record component