Enum Class Stage
- All Implemented Interfaces:
Serializable, Comparable<Stage>, Constable
The stage or "level" inside the framework at which a properties value is set.
JDA-Commands has the following stages in this order:
CONFIGURATION-> setting of builder properties, extension loading, construction of framework componentsINITIALIZED-> after starting the framework (basically afterJDACBuilder.start()completed), e.g. all definitions are indexed etc.RUNTIME-> inside a runtime but outside of processing anGenericInteractionCreateEvent, e.g. whenInstantiator.instance(Class, Introspection)is calledPREPARATION-> during the preparation of anGenericInteractionCreateEventfor theINTERACTIONstage, e.g. where type adapters get calledINTERACTION-> when processing anGenericInteractionCreateEvent, e.g. inMiddleware.accept(InvocationContext)or inside a user defined interaction controller method
Generally, a stage includes all properties that were set in a former stage:
INTERACTIONincludesCONFIGURATION,INITIALIZED,RUNTIMEandPREPARATIONPREPARATIONincludesCONFIGURATION,INITIALIZEDandRUNTIMERUNTIMEincludesCONFIGURATIONandINITIALIZEDINITIALIZEDincludesCONFIGURATION
To know in which stage a Property is available take a look at Property.stage().
More technical, a Stage with a certain ordinal contains all stages with a lower ordinal value:
stageA ⊆ stageB if stageA.ordinal < stageB.ordinal
Many user implementable methods are annotated with IntrospectionAccess. To get a hint in which stage this method
will be called by JDA-Commands you can take a look at IntrospectionAccess.value().
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
-
Enum Constant Details
-
CONFIGURATION
-
INITIALIZED
-
RUNTIME
-
PREPARATION
-
INTERACTION
-
-
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
-