Class JDACBuilderData
java.lang.Object
com.github.kaktushose.jda.commands.extension.JDACBuilderData
- Direct Known Subclasses:
JDACBuilder
Readonly view of a
JDACBuilder
. Acts as a snapshot of the current builder state during jda-commands startup.- Implementation Note:
This class is used to give implementations of
Extension
access to properties involved in the creation ofJDACommands
.Please note that this class only gives read not write access to the
JDACBuilder
.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Class
<?> protected Collection
<ClassFinder> protected final JDAContext
protected InteractionControllerInstantiator
protected Descriptor
protected ErrorMessageFactory
protected ExpirationStrategy
protected final Map
<Class<? extends Extension.Data>, Extension.Data> protected ExtensionFilter
protected InteractionDefinition.ReplyConfig
protected GuildScopeProvider
protected Collection
<Extension> protected LocalizationFunction
static final org.slf4j.Logger
protected final Set
<Map.Entry<Priority, Middleware>> protected final String[]
protected PermissionsProvider
protected final Map
<Class<?>, TypeAdapter<?>> protected final Map
<Class<? extends Annotation>, Validator> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
JDACBuilderData
(Class<?> baseClass, String[] packages, JDAContext context) -
Method Summary
Modifier and TypeMethodDescription@NotNull Class
<?> the base class provided by the user for classpath scanning@NotNull Collection
<ClassFinder> @NotNull JDAContext
context()
theJDAContext
to be used@NotNull InteractionControllerInstantiator
@NotNull Descriptor
@NotNull ErrorMessageFactory
@NotNull ExpirationStrategy
@NotNull GuildScopeProvider
@NotNull LocalizationFunction
@NotNull ClassFinder
@NotNull Collection
<Map.Entry<Priority, Middleware>> @NotNull String[]
packages()
the packages provided by the user for classpath scanning@NotNull PermissionsProvider
@NotNull Map
<Class<?>, TypeAdapter<?>> @NotNull Map
<Class<? extends Annotation>, Validator>
-
Field Details
-
log
public static final org.slf4j.Logger log -
baseClass
-
packages
-
context
-
loadedExtensions
-
extensionData
-
extensionFilter
-
controllerInstantiator
-
expirationStrategy
-
permissionsProvider
-
errorMessageFactory
-
guildScopeProvider
-
descriptor
-
classFinders
-
middlewares
-
validators
-
typeAdapters
-
globalReplyConfig
-
localizationFunction
-
-
Constructor Details
-
JDACBuilderData
-
-
Method Details
-
packages
the packages provided by the user for classpath scanning -
context
theJDAContext
to be used -
baseClass
the base class provided by the user for classpath scanning -
globalReplyConfig
- Returns:
- the global
InteractionDefinition.ReplyConfig
provided by the user
-
expirationStrategy
- Returns:
- the
ExpirationStrategy
to be used
-
localizationFunction
- Returns:
- the
LocalizationFunction
to be used. Can be added via anExtension
-
controllerInstantiator
- Returns:
- the
InteractionControllerInstantiator
to be used. Can be added via anExtension
-
permissionsProvider
- Returns:
- the
PermissionsProvider
to be used. Can be added via anExtension
-
errorMessageFactory
- Returns:
- the
ErrorMessageFactory
to be used. Can be added via anExtension
-
guildScopeProvider
- Returns:
- the
GuildScopeProvider
to be used. Can be added via anExtension
-
descriptor
- Returns:
- the
Descriptor
to be used. Can be added via anExtension
-
classFinders
- Returns:
- the
ClassFinder
s to be used. Can be added via anExtension
-
mergedClassFinder
- Returns:
- a
ClassFinder
that searches in allClassFinder
s returned byclassFinders()
-
middlewares
- Returns:
- the
Middleware
s to be used. Can be added via anExtension
-
validators
-
typeAdapters
- Returns:
- the
TypeAdapter
s to be used. Can be added via anExtension
-