Class DateFactory<T extends Date>

java.lang.Object
org.simpleframework.xml.transform.DateFactory<T>

class DateFactory<T extends Date> extends 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:
  • Field Details

    • factory

      private final Constructor<T extends Date> factory
      This is used to create instances of the date object required.
  • Constructor Details

    • DateFactory

      public DateFactory(Class<T> type) throws 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:
      Exception
    • DateFactory

      public DateFactory(Class<T> type, Class... list) throws 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:
      Exception
  • Method Details

    • getInstance

      public T getInstance(Object... list) throws 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:
      Exception