gov.sns.xal.smf
Class AcceleratorNodeFactory

java.lang.Object
  |
  +--gov.sns.xal.smf.AcceleratorNodeFactory

public final class AcceleratorNodeFactory
extends java.lang.Object

Class factory for all AcceleratorNode objects. The factory is used in parsing XML files in XDXF format. Every AcceleratorNode has a type code (in String format) which may be used to instantiate the class. Every AcceleratorNode derived class should register itself in its static class-loader code (static {} block) in order to be recognized by this class factory


Method Summary
static AcceleratorNode create(DataAdaptor adaptor)
          create an accelerator node based on a DataAdaptor
static AcceleratorNode create(java.lang.String strType, java.lang.String strId)
          Creates the node with the specified string id.
static java.lang.String[] getNodeTypes()
          Get set of all AccelerNode type strings
static void registerClass(java.lang.String strType, java.lang.Class clsType)
          Register the AcceleratorNode derived class with the class factory Eg., for the derived class BPM the static block should include static { AcceleratorNodeFactory.registerClass(s_strType, BPM.class) }
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

registerClass

public static void registerClass(java.lang.String strType,
                                 java.lang.Class clsType)
Register the AcceleratorNode derived class with the class factory Eg., for the derived class BPM the static block should include static { AcceleratorNodeFactory.registerClass(s_strType, BPM.class) }

Parameters:
strType - type identifier of the AcceleratorNode class
clsType - Class class for the AcceleratorNode type

getNodeTypes

public static java.lang.String[] getNodeTypes()
Get set of all AccelerNode type strings


create

public static AcceleratorNode create(java.lang.String strType,
                                     java.lang.String strId)
                              throws java.lang.ClassNotFoundException
Creates the node with the specified string id.

java.lang.ClassNotFoundException

create

public static AcceleratorNode create(DataAdaptor adaptor)
                              throws java.lang.ClassNotFoundException
create an accelerator node based on a DataAdaptor

java.lang.ClassNotFoundException