Class FieldHandlerFactory

  • Direct Known Subclasses:
    DefaultFieldHandlerFactory

    public abstract class FieldHandlerFactory
    extends java.lang.Object
    An abstract factory class for creating GeneralizedFieldHandlers.
    Version:
    $Revision: 5951 $ $Date: 2003-10-23 13:53:59 -0600 (Thu, 23 Oct 2003) $
    Author:
    Keith Visco
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract GeneralizedFieldHandler createFieldHandler​(java.lang.Class type)
      Creates a GeneralizedFieldHandler for the given class type.
      abstract java.lang.Class[] getSupportedTypes()
      Returns an array of the supported Class types for this FieldHandlerFactory.
      abstract boolean isSupportedType​(java.lang.Class type)
      Returns true if the given Class type is supported by this FieldHandlerFactory.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FieldHandlerFactory

        public FieldHandlerFactory()
    • Method Detail

      • getSupportedTypes

        public abstract 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.
        Returns:
        an array of supported Class types.
      • isSupportedType

        public abstract 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 to #createFieldHandler will return a valid FieldHandler. If the type is not supported, a call to createFieldHandler may return null or throw a MappingException.
        Parameters:
        type - the Class type to determine support for.
        Returns:
        true if the given Class type is supported.
      • createFieldHandler

        public abstract 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.
        Parameters:
        type - the Class type to create the FieldHandler for.
        Throws:
        MappingException