Package org.exolab.castor.xml.handlers
Class DefaultFieldHandlerFactory
- java.lang.Object
-
- org.exolab.castor.mapping.FieldHandlerFactory
-
- org.exolab.castor.xml.handlers.DefaultFieldHandlerFactory
-
public class DefaultFieldHandlerFactory extends FieldHandlerFactory
The default FieldHandlerFactory implementation. Used by the Introspector. This implementation only supports java.sql.Time and java.sql.Timestamp.- Version:
- $Revision: 6671 $ $Date: 2004-04-08 22:44:47 -0600 (Thu, 08 Apr 2004) $
- Author:
- Keith Visco
-
-
Constructor Summary
Constructors Constructor Description DefaultFieldHandlerFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GeneralizedFieldHandler
createFieldHandler(java.lang.Class type)
Creates a GeneralizedFieldHandler for the given class type.java.lang.Class[]
getSupportedTypes()
Returns an array of the supported Class types for this FieldHandlerFactory.boolean
isSupportedType(java.lang.Class type)
Returns true if the given Class type is supported by this FieldHandlerFactory.
-
-
-
Method Detail
-
getSupportedTypes
public java.lang.Class[] getSupportedTypes()
Returns an array of the supported Class types for this FieldHandlerFactory. The array may be empty, but must not be null.- Specified by:
getSupportedTypes
in classFieldHandlerFactory
- Returns:
- an array of supported Class types.
-
isSupportedType
public boolean isSupportedType(java.lang.Class type)
Returns true if the given Class type is supported by this FieldHandlerFactory. If the type is supported, a call tocreateFieldHandler(java.lang.Class)
will return a valid FieldHandler. If the type is not supported, a call to createFieldHandler may return null or throw a MappingException.- Specified by:
isSupportedType
in classFieldHandlerFactory
- Parameters:
type
- the Class type to determine support for.- Returns:
- true if the given Class type is supported.
-
createFieldHandler
public GeneralizedFieldHandler createFieldHandler(java.lang.Class type) throws MappingException
Creates a GeneralizedFieldHandler for the given class type. The method should return a new GeneralizedFieldHandler as an "underlying" FieldHandler will need to be set by the caller.- Specified by:
createFieldHandler
in classFieldHandlerFactory
- Parameters:
type
- the Class type to create the FieldHandler for.- Returns:
- a new FieldHandler
- Throws:
MappingException
- if avalueOf
method cannot be found.
-
-