Package org.web3d.vrml.parser
Class FieldParserFactory
java.lang.Object
org.web3d.vrml.parser.FieldParserFactory
- Direct Known Subclasses:
DefaultFieldParserFactory
Representation of a parser factory for field content.
This is the representation of a basic VRML parser. An parser implementation would extend this instance to provide a specific parser. The implementation class is specified by defining a system property
org.web3d.vrml.parser.field.factoryThe value of this property is the fully qualified class name of that implementation. When the
ngetFieldParserFactory()
method is
called it will read that property and create a new instance using
reflection. The implementation must have a public, zero argument constructor
in order to be loaded.
Each time the newVRMLParserFactory()
method is called, it will
re-read the property and create an instance of the class. This allows you
to create different parser instances for each call within the one JVM
instance. If no property is defined then the default implementation is used.
- Version:
- $Revision: 1.4 $
- Author:
- Justin Couch
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Construct a default instance of this factory. -
Method Summary
Modifier and TypeMethodDescriptionstatic FieldParserFactory
Create a new factory parser instance each time this method is called.abstract VRMLFieldReader
newFieldParser
(int major, int minor) Request a new instance of a parser for fields of the given specification version.
-
Field Details
-
FACTORY_CLASS_PROP
-
-
Constructor Details
-
FieldParserFactory
protected FieldParserFactory()Construct a default instance of this factory.
-
-
Method Details
-
getFieldParserFactory
Create a new factory parser instance each time this method is called. Looks up the system property and builds a new instance on demand.- Returns:
- An instance of the factory
- Throws:
FactoryConfigurationError
- The class could not be found for some reason or other startup error.
-
newFieldParser
Request a new instance of a parser for fields of the given specification version.- Parameters:
major
- The major version number of the field to be parsedminor
- The minor version number of the field to be parsed- Returns:
- A new parser instance
-