| Modifier and Type | Method and Description |
|---|---|
Injector.Builder<T> |
exactly()
Marks this configuration to restrict the field type to be exactly the given one.
|
Injector.Builder<T> |
marked(Annotation annotation)
Adds the given annotation instance to the required annotations.
|
Injector.Builder<T> |
marked(Class<? extends Annotation> annotation)
Adds the given annotation type to the required annotations.
|
Injector.Builder<T> |
nullable()
Marks this configuration as "nullable".
|
void |
with(Injector.Constructor<? extends T> constructor)
Sets the constructor to the given instance and adds this builder to the registry.
|
void |
with(T instance)
Sets the injected instance to always be the given one.
|
public void with(T instance)
instance - The instance we should populate the field withpublic void with(Injector.Constructor<? extends T> constructor)
constructor - The instance constructorpublic Injector.Builder<T> nullable()
public Injector.Builder<T> exactly()
MyPlugin.class and the "exactly" flag set to true
this will only affect fields that have its type set to that, and will ignore fields using subclasses
of the plugin's class.public Injector.Builder<T> marked(Annotation annotation)
annotation - An annotation implementation to check againstpublic Injector.Builder<T> marked(Class<? extends Annotation> annotation)
annotation - An annotation classCopyright © 2014–2015 MountainBlade. All rights reserved.