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
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe channel supplier to get the channel into which the rpc calls should be sent.The base rpc used for the class invocation, can be null.Special pointer that will be replaced with the rpc sender responsible for the target class. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Class<?> static final intprivate static final RPCInternalInstanceFactory.SpecialArg[] -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateSpecialArg(@NonNull Class<?> argType) Constructs a new special arg. -
Method Summary
Modifier and TypeMethodDescriptionargType()Get the argument type that will be injected into the constructor.(package private) static @NonNull RPCInternalInstanceFactory.SpecialArgfromParamMappingIndex(int paramMappingIndex) Get the special argument represented by the given param mapping index or throws an exception if the param mapping index is invalid.Returns the enum constant of this class with the specified name.values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
RPC_SENDER
Special pointer that will be replaced with the rpc sender responsible for the target class. -
RPC_CHAIN_BASE
The base rpc used for the class invocation, can be null. -
CHANNEL_SUPPLIER
The channel supplier to get the channel into which the rpc calls should be sent.
-
-
Field Details
-
VALUES
-
SPECIAL_ARG_MAX_INDEX
public static final int SPECIAL_ARG_MAX_INDEX -
argType
-
-
Constructor Details
-
SpecialArg
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
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
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 nameNullPointerException- 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
-