Merge "Document how a plugin can get its name injected"
This commit is contained in:
commit
96e70cc532
@ -174,6 +174,23 @@ manifest_entries = [
|
|||||||
]
|
]
|
||||||
----
|
----
|
||||||
|
|
||||||
|
A plugin can get its own name injected at runtime:
|
||||||
|
|
||||||
|
[source,java]
|
||||||
|
----
|
||||||
|
public class MyClass {
|
||||||
|
|
||||||
|
private final String pluginName;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
public MyClass(@PluginName String pluginName) {
|
||||||
|
this.pluginName = pluginName;
|
||||||
|
}
|
||||||
|
|
||||||
|
...
|
||||||
|
}
|
||||||
|
----
|
||||||
|
|
||||||
[[reload_method]]
|
[[reload_method]]
|
||||||
Reload Method
|
Reload Method
|
||||||
~~~~~~~~~~~~~
|
~~~~~~~~~~~~~
|
||||||
|
Loading…
Reference in New Issue
Block a user