public abstract class BasePlugin<TPluginContainer> extends java.lang.Object implements Plugin<TPluginContainer>
Plugin that only registers a
single Environment with the same name as this Plugin| Modifier and Type | Field and Description |
|---|---|
protected Environment |
environment |
protected java.lang.String |
name |
protected TPluginContainer |
pluginContainer |
| Modifier | Constructor and Description |
|---|---|
protected |
BasePlugin(java.lang.String name) |
protected |
BasePlugin(java.lang.String name,
com.google.inject.Injector rootInjector,
com.google.inject.Module module) |
protected |
BasePlugin(java.lang.String name,
com.google.inject.Injector rootInjector,
com.google.inject.Module module,
java.lang.Class<?>... earlyServices) |
protected |
BasePlugin(java.lang.String name,
com.google.inject.Injector rootInjector,
com.google.inject.Module module,
com.google.inject.Key<?>... earlyServices) |
protected |
BasePlugin(java.lang.String name,
com.google.inject.Injector rootInjector,
com.google.inject.Module module,
com.google.inject.TypeLiteral<?>... earlyServices) |
protected |
BasePlugin(java.lang.String name,
com.google.inject.Injector rootInjector,
com.google.inject.Module module,
com.google.common.reflect.TypeToken<?>... earlyServices) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyToBuilder(Environment.Builder builder) |
int |
compareTo(Plugin<TPluginContainer> o) |
protected Environment.Builder |
createDefaultBuilder(java.lang.String name,
com.google.inject.Injector rootInjector,
com.google.inject.Module module) |
boolean |
equals(java.lang.Object obj) |
java.util.Set<Environment> |
getAllEnvironments() |
java.lang.String |
getName() |
TPluginContainer |
getPluginContainer() |
Environment |
getPrimaryEnvironment()
Note: while not explicitly necessary, it is generally advisable
to override this method by getting the
Environment
from Environment.Builder#whenReady(Consumer) and setting
it in a field in your implementing class |
java.lang.String |
toString() |
protected void |
whenLoaded(Environment environment) |
protected void |
whenReady(Environment environment) |
protected void |
whenReloaded(Environment environment) |
@Inject protected TPluginContainer pluginContainer
protected Environment environment
protected final java.lang.String name
protected BasePlugin(java.lang.String name,
com.google.inject.Injector rootInjector,
com.google.inject.Module module,
com.google.inject.Key<?>... earlyServices)
protected BasePlugin(java.lang.String name,
com.google.inject.Injector rootInjector,
com.google.inject.Module module,
java.lang.Class<?>... earlyServices)
protected BasePlugin(java.lang.String name,
com.google.inject.Injector rootInjector,
com.google.inject.Module module,
com.google.inject.TypeLiteral<?>... earlyServices)
protected BasePlugin(java.lang.String name,
com.google.inject.Injector rootInjector,
com.google.inject.Module module,
com.google.common.reflect.TypeToken<?>... earlyServices)
protected BasePlugin(java.lang.String name,
com.google.inject.Injector rootInjector,
com.google.inject.Module module)
protected BasePlugin(java.lang.String name)
protected Environment.Builder createDefaultBuilder(java.lang.String name, com.google.inject.Injector rootInjector, com.google.inject.Module module)
protected void applyToBuilder(Environment.Builder builder)
protected void whenLoaded(Environment environment)
protected void whenReady(Environment environment)
protected void whenReloaded(Environment environment)
public java.lang.String toString()
toString in class java.lang.Objectpublic int compareTo(Plugin<TPluginContainer> o)
compareTo in interface java.lang.Comparable<Plugin<TPluginContainer>>public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic TPluginContainer getPluginContainer()
getPluginContainer in interface Plugin<TPluginContainer>public Environment getPrimaryEnvironment()
Plugin
Note: while not explicitly necessary, it is generally advisable
to override this method by getting the Environment
from Environment.Builder#whenReady(Consumer) and setting
it in a field in your implementing class
getPrimaryEnvironment in interface Plugin<TPluginContainer>Environment for this Pluginpublic java.util.Set<Environment> getAllEnvironments()
getAllEnvironments in interface Plugin<TPluginContainer>Set of all environments registered to this Plugin