Enum Class RPCInternalInstanceFactory.SpecialArg

java.lang.Object
java.lang.Enum<RPCInternalInstanceFactory.SpecialArg>
eu.cloudnetservice.driver.impl.network.rpc.generation.RPCInternalInstanceFactory.SpecialArg
All Implemented Interfaces:
Serializable, Comparable<RPCInternalInstanceFactory.SpecialArg>, Constable
Enclosing class:
RPCInternalInstanceFactory

public static enum RPCInternalInstanceFactory.SpecialArg extends Enum<RPCInternalInstanceFactory.SpecialArg>
A collection of special args that can be passed to a super constructor when invoking. If the extra argument array on an instance construct call contains this enum, the value is replaced with the value passed to the instance factory.
Since:
4.0
  • Enum Constant Details

  • Field Details

  • Constructor Details

    • SpecialArg

      private SpecialArg(@NonNull @NonNull Class<?> argType)
      Constructs a new special arg.
      Parameters:
      argType - the type that will be injected in the final step.
      Throws:
      NullPointerException - if the given arg type is null.
  • Method Details

    • values

      public static RPCInternalInstanceFactory.SpecialArg[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static RPCInternalInstanceFactory.SpecialArg valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • fromParamMappingIndex

      @NonNull static @NonNull RPCInternalInstanceFactory.SpecialArg fromParamMappingIndex(int paramMappingIndex)
      Get the special argument represented by the given param mapping index or throws an exception if the param mapping index is invalid.
      Parameters:
      paramMappingIndex - the param mapping index to get the special arg for.
      Returns:
      the special arg mapped to the given param mapping index.
      Throws:
      IllegalStateException - if the given param mapping value is invalid.
    • argType

      @NonNull @NonNull Class<?> argType()
      Get the argument type that will be injected into the constructor.
      Returns:
      the argument type that will be injected into the constructor.