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 @Nullable InteractionControllerInstantiator
protected @Nullable Descriptor
protected @Nullable Embeds
protected @Nullable ErrorMessageFactory
protected ExpirationStrategy
protected final Map
<Class<? extends Extension.Data>, Extension.Data> protected ExtensionFilter
protected CommandDefinition.CommandConfig
protected InteractionDefinition.ReplyConfig
protected @Nullable GuildScopeProvider
protected @Nullable Collection
<Extension<Extension.Data>> protected boolean
protected @Nullable Localizer
static final org.slf4j.Logger
protected final Set
<Map.Entry<Priority, Middleware>> protected final String[]
protected @Nullable PermissionsProvider
protected boolean
protected final Map
<Map.Entry<io.github.kaktushose.proteus.type.Type<?>, io.github.kaktushose.proteus.type.Type<?>>, TypeAdapter<?, ?>> protected final Map
<Class<? extends Annotation>, Validator<?, ?>> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
JDACBuilderData
(Class<?> baseClass, String[] packages, JDAContext context) -
Method Summary
Modifier and TypeMethodDescriptionClass
<?> the base class provided by the user for classpath scanningcontext()
theJDAContext
to be usedembeds()
i18n()
boolean
String[]
packages()
the packages provided by the user for classpath scanningboolean
Map
<Map.Entry<io.github.kaktushose.proteus.type.Type<?>, io.github.kaktushose.proteus.type.Type<?>>, TypeAdapter<?, ?>> 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
-
localizer
-
classFinders
-
middlewares
-
validators
-
typeAdapters
protected final Map<Map.Entry<io.github.kaktushose.proteus.type.Type<?>, io.github.kaktushose.proteus.type.Type<?>>, TypeAdapter<?,?>> typeAdapters -
globalReplyConfig
-
globalCommandConfig
-
shutdownJDA
protected boolean shutdownJDA -
localizeCommands
protected boolean localizeCommands -
embeds
-
-
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
-
globalCommandConfig
-
expirationStrategy
- Returns:
- the
ExpirationStrategy
to be used
-
shutdownJDA
public boolean shutdownJDA()- Returns:
- whether the JDA instance should be shutdown if the configuration/start of JDA-Commands fails or
JDACommands.shutdown()
is called.
-
localizeCommands
public boolean localizeCommands()- Returns:
- whether JDA-Commands should use the
I18n
feature to localize commands.
-
controllerInstantiator
- Returns:
- the
InteractionControllerInstantiator
to be used. Can be added via anExtension
-
localizer
-
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
public Map<Map.Entry<io.github.kaktushose.proteus.type.Type<?>, io.github.kaktushose.proteus.type.Type<?>>, TypeAdapter<?,?>> typeAdapters()- Returns:
- the
TypeAdapter
s to be used. Can be added via anExtension
-
embeds
-
i18n
-