Class DateFactory<T extends java.util.Date>


  • class DateFactory<T extends java.util.Date>
    extends java.lang.Object
    The DateFactory object is used to create instances or subclasses of the Date object. This will create the instances of the date objects using a constructor that takes a single long parameter value.
    See Also:
    DateTransform
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.reflect.Constructor<T> factory
      This is used to create instances of the date object required.
    • Constructor Summary

      Constructors 
      Constructor Description
      DateFactory​(java.lang.Class<T> type)
      Constructor for the DateFactory object.
      DateFactory​(java.lang.Class<T> type, java.lang.Class... list)
      Constructor for the DateFactory object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T getInstance​(java.lang.Object... list)
      This is used to create instances of the date using a delegate date.
      • Methods inherited from class java.lang.Object

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

      • factory

        private final java.lang.reflect.Constructor<T extends java.util.Date> factory
        This is used to create instances of the date object required.
    • Constructor Detail

      • DateFactory

        public DateFactory​(java.lang.Class<T> type)
                    throws java.lang.Exception
        Constructor for the DateFactory object. This is used to create instances of the specified type. All objects created by this instance must take a single long parameter.
        Parameters:
        type - this is the date implementation to be created
        Throws:
        java.lang.Exception
      • DateFactory

        public DateFactory​(java.lang.Class<T> type,
                           java.lang.Class... list)
                    throws java.lang.Exception
        Constructor for the DateFactory object. This is used to create instances of the specified type. All objects created by this instance must take the specified parameter.
        Parameters:
        type - this is the date implementation to be created
        list - is basically the list of accepted parameters
        Throws:
        java.lang.Exception
    • Method Detail

      • getInstance

        public T getInstance​(java.lang.Object... list)
                      throws java.lang.Exception
        This is used to create instances of the date using a delegate date. A long parameter is extracted from the given date an used to instantiate a date of the required type.
        Parameters:
        list - this is the type used to provide the long value
        Returns:
        this returns an instance of the required date type
        Throws:
        java.lang.Exception