Document how a plugin can get its name injected
Change-Id: I2065492b32dee2eb66c1c2e608bd6eec62c28c45 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
parent
ffc633f72e
commit
c0b1b0e258
@ -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
|
||||
~~~~~~~~~~~~~
|
||||
|
Loading…
Reference in New Issue
Block a user