public class Filters
extends java.lang.Object
Constructor and Description |
---|
Filters() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Object |
add(java.lang.Object o1,
java.lang.Class<?> c1,
java.lang.Object o2,
java.lang.Class<?> c2)
Add the given values.
|
static java.util.List<ClassMetaData> |
addAccessPathMetaDatas(java.util.List<ClassMetaData> metas,
ClassMetaData[] path)
Add the given access path metadatas to the full path list, making sure
to maintain only base metadatas in the list.
|
static boolean |
canConvert(java.lang.Class<?> c1,
java.lang.Class<?> c2,
boolean strict)
Return whether an instance of the first class can be converted to
an instance of the second.
|
static java.lang.String |
clip(java.lang.String s,
java.lang.String first,
java.lang.String last,
boolean fail)
Removes the first and last string if they are the terminal sequence in the given string.
|
static java.lang.Object |
convert(java.lang.Object o,
java.lang.Class<?> type) |
static java.lang.Object |
convert(java.lang.Object o,
java.lang.Class<?> type,
boolean strictNumericConversion)
Convert the given value to the given type.
|
static java.lang.Object |
convertToMatchMethodArgument(java.lang.Object o,
java.lang.reflect.Method method)
Convert the given value to match the given (presumably a setter) method argument type.
|
static java.lang.Object |
divide(java.lang.Object o1,
java.lang.Class<?> c1,
java.lang.Object o2,
java.lang.Class<?> c2)
Divide the given values.
|
static java.lang.Object |
getDefaultForNull(java.lang.Class<?> nType) |
static AggregateListener |
hintToAggregateListener(java.lang.Object hint,
java.lang.ClassLoader loader)
Convert the user-given hint value to an aggregate listener.
|
static AggregateListener[] |
hintToAggregateListeners(java.lang.Object hint,
java.lang.ClassLoader loader)
Convert the user-given hint value to an array of aggregate listeners.
|
static FilterListener |
hintToFilterListener(java.lang.Object hint,
java.lang.ClassLoader loader)
Convert the user-given hint value to a filter listener.
|
static FilterListener[] |
hintToFilterListeners(java.lang.Object hint,
java.lang.ClassLoader loader)
Convert the user-given hint value to an array of filter listeners.
|
static java.lang.Object |
hintToGetter(java.lang.Object target,
java.lang.String hintKey)
Return the value of the property named by the hint key.
|
static void |
hintToSetter(java.lang.Object target,
java.lang.String hintKey,
java.lang.Object value)
Set the value of the property named by the hint key.
|
static boolean |
isJDBCTemporalSyntax(java.lang.String s)
Affirms if the given String is enclosed in {}.
|
static boolean |
isTemporalType(java.lang.Class<?> c)
Affirms if the given class is Data, Time or Timestamp.
|
static java.lang.Object |
mod(java.lang.Object o1,
java.lang.Class<?> c1,
java.lang.Object o2,
java.lang.Class<?> c2)
Mod the given values.
|
static java.lang.Object |
multiply(java.lang.Object o1,
java.lang.Class<?> c1,
java.lang.Object o2,
java.lang.Class<?> c2)
Multiply the given values.
|
static java.util.List<java.lang.String> |
parseDeclaration(java.lang.String dec,
char split,
java.lang.String decType)
Parses the given declarations into a list of type, name, type, name...
|
static java.lang.Object |
parseJDBCTemporalSyntax(java.lang.String s)
Parses the given string assuming it is a JDBC key expression.
|
static java.lang.Class<?> |
promote(java.lang.Class<?> c1,
java.lang.Class<?> c2)
Given two types, return type they should both be converted
to before performing any operations between them.
|
static java.util.List<java.lang.String> |
splitExpressions(java.lang.String str,
char split,
int expected)
Split the given expression list into distinct expressions.
|
static java.lang.Object |
subtract(java.lang.Object o1,
java.lang.Class<?> c1,
java.lang.Object o2,
java.lang.Class<?> c2)
Subtract the given values.
|
static java.lang.Class<?> |
unwrap(java.lang.Class<?> c)
Return the correct primitive type for the given class, if it is a
wrapper.
|
static java.lang.Class<?> |
wrap(java.lang.Class<?> c)
Return the correct wrapper type for the given class.
|
public static java.lang.Class<?> wrap(java.lang.Class<?> c)
public static java.lang.Class<?> unwrap(java.lang.Class<?> c)
public static java.lang.Class<?> promote(java.lang.Class<?> c1, java.lang.Class<?> c2)
public static boolean canConvert(java.lang.Class<?> c1, java.lang.Class<?> c2, boolean strict)
public static java.lang.Object convertToMatchMethodArgument(java.lang.Object o, java.lang.reflect.Method method)
o
- given valuemethod
- a presumably setter methodpublic static java.lang.Object convert(java.lang.Object o, java.lang.Class<?> type)
public static java.lang.Object convert(java.lang.Object o, java.lang.Class<?> type, boolean strictNumericConversion)
public static java.lang.Object add(java.lang.Object o1, java.lang.Class<?> c1, java.lang.Object o2, java.lang.Class<?> c2)
public static java.lang.Object subtract(java.lang.Object o1, java.lang.Class<?> c1, java.lang.Object o2, java.lang.Class<?> c2)
public static java.lang.Object multiply(java.lang.Object o1, java.lang.Class<?> c1, java.lang.Object o2, java.lang.Class<?> c2)
public static java.lang.Object divide(java.lang.Object o1, java.lang.Class<?> c1, java.lang.Object o2, java.lang.Class<?> c2)
public static java.lang.Object mod(java.lang.Object o1, java.lang.Class<?> c1, java.lang.Object o2, java.lang.Class<?> c2)
public static java.util.List<java.lang.String> parseDeclaration(java.lang.String dec, char split, java.lang.String decType)
decType
- the type of declaration being parsed, for use in
error messagespublic static java.util.List<java.lang.String> splitExpressions(java.lang.String str, char split, int expected)
public static java.util.List<ClassMetaData> addAccessPathMetaDatas(java.util.List<ClassMetaData> metas, ClassMetaData[] path)
public static AggregateListener hintToAggregateListener(java.lang.Object hint, java.lang.ClassLoader loader)
public static AggregateListener[] hintToAggregateListeners(java.lang.Object hint, java.lang.ClassLoader loader)
public static FilterListener hintToFilterListener(java.lang.Object hint, java.lang.ClassLoader loader)
public static FilterListener[] hintToFilterListeners(java.lang.Object hint, java.lang.ClassLoader loader)
public static java.lang.Object hintToGetter(java.lang.Object target, java.lang.String hintKey)
public static void hintToSetter(java.lang.Object target, java.lang.String hintKey, java.lang.Object value)
public static java.lang.Object parseJDBCTemporalSyntax(java.lang.String s)
public static boolean isJDBCTemporalSyntax(java.lang.String s)
public static java.lang.String clip(java.lang.String s, java.lang.String first, java.lang.String last, boolean fail)
s
- a string to be examinedfirst
- the characters in the beginning of the given stringlast
- the characters in the end of the given stringfail
- if true throws exception if the given string does not have the given terminal sequences.public static boolean isTemporalType(java.lang.Class<?> c)
public static java.lang.Object getDefaultForNull(java.lang.Class<?> nType)
Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.