Java SQL Date Check isDateValue(Class inValueType)

Here you can find the source of isDateValue(Class inValueType)

Description

Check whether the given value is a java.util.Date (but not one of the JDBC-specific subclasses).

License

LGPL

Declaration

private static boolean isDateValue(Class<?> inValueType) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

public class Main {
    /**//from   w ww. jav  a  2  s.  c om
     * Check whether the given value is a {@code java.util.Date}
     * (but not one of the JDBC-specific subclasses).
     */
    private static boolean isDateValue(Class<?> inValueType) {
        return (java.util.Date.class.isAssignableFrom(inValueType)
                && !(java.sql.Date.class.isAssignableFrom(inValueType)
                        || java.sql.Time.class.isAssignableFrom(inValueType)
                        || java.sql.Timestamp.class.isAssignableFrom(inValueType)));
    }
}

Related

  1. isDate(Object obj)
  2. isDate(String str)
  3. isDate(String val)
  4. isDateOneAfterDateTwo(Date dateOne, Date dateTwo)
  5. isDateType(Class targetType)
  6. isDateValue(Object inValue)