org.specrunner.plugins.core.factories
Class PluginFactoryCustom

java.lang.Object
  extended by org.specrunner.plugins.core.factories.PluginFactoryImpl
      extended by org.specrunner.plugins.core.factories.PluginFactoryCustom
All Implemented Interfaces:
IPluginFactory

public class PluginFactoryCustom
extends PluginFactoryImpl

Returns a plugin based on a 'custom' attribute.

i.e. custom="test.PluginSysout",

or based on a file ' plugin_custom.properties , i.e. add new=test.PluginCustomized, and use custom="new" anywhere in the specification.

Author:
Thiago Santos

Field Summary
static String ATTRIBUTE
          Attribute with custom plugin information.
 
Fields inherited from class org.specrunner.plugins.core.factories.PluginFactoryImpl
aliasToTypeNames, aliasToTypes, templates, typeNamesToAlias
 
Constructor Summary
PluginFactoryCustom()
          Creates the factory loading file 'sr_plugins_custom.properties'.
 
Method Summary
 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
 

Field Detail

ATTRIBUTE

public static final String ATTRIBUTE
Attribute with custom plugin information.

See Also:
Constant Field Values
Constructor Detail

PluginFactoryCustom

public PluginFactoryCustom()
Creates the factory loading file 'sr_plugins_custom.properties'.

Method Detail

newPlugin

public IPlugin newPlugin(nu.xom.Node node,
                         IContext context)
                  throws PluginException
Description copied from interface: IPluginFactory
Creates a new plugin.

Parameters:
node - The source node for plugin creation.
context - The context.
Returns:
A plugin based on source information.
Throws:
PluginException - On creation error.


Copyright © 2014. All rights reserved.