|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.specrunner.plugins.core.factories.PluginFactoryImpl
org.specrunner.plugins.core.factories.PluginFactoryAttribute
public class PluginFactoryAttribute
An implementation which uses a attribute to return the plugin. To map a
plugin to a given attribute add a 'plugin_attribute.properties'
file and add the name of the class.
i.e. bean=test.PluginAny, then just use attribute
bean="anything" anywhere in the specification.
| Field Summary |
|---|
| Fields inherited from class org.specrunner.plugins.core.factories.PluginFactoryImpl |
|---|
aliasToTypeNames, aliasToTypes, file, initialized, kind, templates, typeNamesToAlias |
| Constructor Summary | |
|---|---|
PluginFactoryAttribute()
Creates the factory loading file 'sr_plugins_attribute.properties'. |
|
| Method Summary | |
|---|---|
protected void |
byAttribute(IContext context,
IPluginGroup result,
nu.xom.Element ele)
Lookup plugin classes using attribute enumeration as reference. |
protected void |
byMapping(IContext context,
IPluginGroup result,
nu.xom.Element ele)
Lookup plugin classes using mapped attributes as reference. |
IPlugin |
newPlugin(nu.xom.Node node,
IContext context)
Creates a new plugin. |
| Methods inherited from class org.specrunner.plugins.core.factories.PluginFactoryImpl |
|---|
bind, finalizePlugin, getAlias, getClass, getKind, initialize, test |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PluginFactoryAttribute()
| Method Detail |
|---|
public IPlugin newPlugin(nu.xom.Node node,
IContext context)
throws PluginException
IPluginFactory
node - The source node for plugin creation.context - The context.
PluginException - On creation error.
protected void byMapping(IContext context,
IPluginGroup result,
nu.xom.Element ele)
throws PluginException
context - The context.result - The result set.ele - The corresponding element.
PluginException - On plugin errors.
protected void byAttribute(IContext context,
IPluginGroup result,
nu.xom.Element ele)
throws PluginException
context - The context.result - The result set.ele - The corresponding element.
PluginException - On plugin errors.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||