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
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 |
generators
protected static ScalarTypeGeneratorIF[] generators
ScalarTypeFactory
public ScalarTypeFactory()
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