From c0b1b0e25841b203e71fbf39fadda0010de45b41 Mon Sep 17 00:00:00 2001 From: Edwin Kempin Date: Tue, 1 Oct 2013 14:13:54 +0200 Subject: [PATCH] Document how a plugin can get its name injected Change-Id: I2065492b32dee2eb66c1c2e608bd6eec62c28c45 Signed-off-by: Edwin Kempin --- Documentation/dev-plugins.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Documentation/dev-plugins.txt b/Documentation/dev-plugins.txt index c0c44f38ba..5d57862b00 100644 --- a/Documentation/dev-plugins.txt +++ b/Documentation/dev-plugins.txt @@ -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 ~~~~~~~~~~~~~