unbbayes.prs.builder.extension.impl
Class ClassInstantiationPluginNodeBuilder

java.lang.Object
  extended by unbbayes.prs.builder.extension.PluginNodeBuilder
      extended by unbbayes.prs.builder.extension.impl.ClassInstantiationPluginNodeBuilder
All Implemented Interfaces:
INodeBuilder

public class ClassInstantiationPluginNodeBuilder
extends PluginNodeBuilder

This is a plugin node builder which basically uses Class.newInstance() in order to build a node. It generates a name using a static numeric field

Author:
Shou Matsumoto

Constructor Summary
ClassInstantiationPluginNodeBuilder()
          The default constructor must be public for plugin support
ClassInstantiationPluginNodeBuilder(Class clazz)
          This is equivalent to calling ClassInstantiationPluginNodeBuilder() and then setNodeClass(Class)
 
Method Summary
 IPluginNode buildPluginNode()
          Obtains an instance of plugin node
static int getCounter()
           
 String getNamePrefix()
           
 Class getNodeClass()
          This is the class (implementing IPluginNode) which will be instantiated by this builder
static void setCounter(int counter)
           
 void setNamePrefix(String namePrefix)
           
 void setNodeClass(Class clazz)
          This is the class (implementing IPluginNode) which will be instantiated by this builder
 
Methods inherited from class unbbayes.prs.builder.extension.PluginNodeBuilder
buildNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassInstantiationPluginNodeBuilder

public ClassInstantiationPluginNodeBuilder()
The default constructor must be public for plugin support


ClassInstantiationPluginNodeBuilder

public ClassInstantiationPluginNodeBuilder(Class clazz)
This is equivalent to calling ClassInstantiationPluginNodeBuilder() and then setNodeClass(Class)

Parameters:
clazz -
Method Detail

buildPluginNode

public IPluginNode buildPluginNode()
                            throws InstantiationException,
                                   IllegalAccessException
Description copied from class: PluginNodeBuilder
Obtains an instance of plugin node

Specified by:
buildPluginNode in class PluginNodeBuilder
Returns:
Throws:
InstantiationException
IllegalAccessException

getNodeClass

public Class getNodeClass()
This is the class (implementing IPluginNode) which will be instantiated by this builder

Returns:
the clazz

setNodeClass

public void setNodeClass(Class clazz)
This is the class (implementing IPluginNode) which will be instantiated by this builder

Parameters:
clazz - the clazz to set

getCounter

public static int getCounter()
Returns:
the counter

setCounter

public static void setCounter(int counter)
Parameters:
counter - the counter to set

getNamePrefix

public String getNamePrefix()
Returns:
the namePrefix

setNamePrefix

public void setNamePrefix(String namePrefix)
Parameters:
namePrefix - the namePrefix to set


Copyright © 2001-2010 University of Brasilia - UnB. All Rights Reserved.