Enum Class JDACScope
- All Implemented Interfaces:
Scope, Serializable, Comparable<JDACScope>, Constable
The scope or "scope" inside the framework at which a properties value is set.
JDA-Commands has the following scopes 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, JDACIntrospection)is calledPREPARATION-> during the preparation of anGenericInteractionCreateEventfor theINTERACTIONscope, 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 scope includes all properties that were set in a former scope:
INTERACTIONincludesCONFIGURATION,INITIALIZED,RUNTIMEandPREPARATIONPREPARATIONincludesCONFIGURATION,INITIALIZEDandRUNTIMERUNTIMEincludesCONFIGURATIONandINITIALIZEDINITIALIZEDincludesCONFIGURATION
To know in which scope a Property is available take a look at Property.scope().
More technical, a Scope with a certain priority contains all scopes with a lower ordinal value:
scopeA ⊆ scopeB if scopeA.ordinal < scopeB.ordinal
Many user implementable methods are annotated with IntrospectionAccess. To get a hint in which scope 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
-
priority
-