com.objectwave.utility
Class ScalarTypeFactory

java.lang.Object
  |
  +--com.objectwave.utility.ScalarTypeFactory

public class ScalarTypeFactory
extends java.lang.Object

This class is used by the JavaGrinder framework to create new instances of custom ScalarType objects. By their very nature these objects are application specific, this class is just a coordinator of the factory objects necessary to create the new instances.

Version:
$Id: ScalarTypeFactory.java,v 2.0 2001/06/11 15:46:53 dave_hoag Exp $
Author:
dhoag
See Also:
ScalarTypeGeneratorIF

Field Summary
protected static ScalarTypeGeneratorIF[] generators
           
 
Constructor Summary
ScalarTypeFactory()
           
 
Method Summary
static ScalarType create(java.lang.Class scalarType, java.lang.String str)
          Use the registered ScalarTypeGenerator to create a new instance of the ScalarType object.
static void registerGenerator(ScalarTypeGeneratorIF generator)
          Add a new ScalarTypeGenerator to the list of known generators.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

generators

protected static ScalarTypeGeneratorIF[] generators
Constructor Detail

ScalarTypeFactory

public ScalarTypeFactory()
Method Detail

create

public static ScalarType create(java.lang.Class scalarType,
                                java.lang.String str)
                         throws java.text.ParseException,
                                NotFoundException
Use the registered ScalarTypeGenerator to create a new instance of the ScalarType object.

Parameters:
scalarType - java.lang.Class The first generator that generates types that are assignable to the this parameter will be used to create the new instance.
str -
Returns:
java.lang.Object
Throws:
java.text.ParseException
NotFoundException

registerGenerator

public static void registerGenerator(ScalarTypeGeneratorIF generator)
Add a new ScalarTypeGenerator to the list of known generators.

Parameters:
generator - ScalarTypeGenerator