Merge "Document how a plugin can get its name injected"

This commit is contained in:
David Pursehouse 2013-10-02 06:46:19 +00:00 committed by Gerrit Code Review
commit 96e70cc532

View File

@ -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
~~~~~~~~~~~~~ ~~~~~~~~~~~~~