|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.taggercat.el.ELUtils
public class ELUtils
A collection of utility functions used by the EL Parser.
| Field Summary | |
|---|---|
static int |
CAST_BIGDECIMAL
|
static int |
CAST_BIGINTEGER
|
static int |
CAST_BYTE
|
static int |
CAST_DOUBLE
|
static int |
CAST_FLOAT
|
static int |
CAST_INTEGER
|
static int |
CAST_LONG
|
static int |
CAST_SHORT
|
| Method Summary | |
|---|---|
static void |
addStaticMethods(java.lang.Class staticClasss,
java.util.Map<java.lang.String,java.lang.String> functionMap,
java.util.List<java.lang.String> functionNames)
Adds all public static methods declared in the specified class to the EL's function map. |
static java.lang.Object |
getBeanProperty(java.lang.Object startingObject,
java.lang.String scopedMethodName)
Gets the bean property. |
static java.lang.Integer |
getDateDiff(java.util.Calendar cal1,
java.util.Calendar cal2,
int datePart)
Calculates the difference between two dates. |
static int |
getDaysInMonth(int year,
int month)
|
static java.lang.StringBuffer |
getMethodSignature(java.lang.String functionName,
java.util.List functionArgs)
Returns a method signature for the method name, and args |
static void |
initConstants(java.util.Map<java.lang.String,java.lang.Integer> expConstants)
|
static java.lang.Object |
invokeStaticFunction(ELContext elContext,
java.lang.String classname,
java.lang.String functionName,
java.util.List functionArgs)
|
static boolean |
matchLike(java.lang.String searchFieldValue,
java.lang.String searchValue)
String search with wild card support. |
static java.lang.Boolean |
matchRegularExpression(java.lang.String input,
java.lang.String regxString)
Returns true if the input string is matched by the regular expression. |
static java.lang.String |
toBeanGetterName(java.lang.String basicName)
Converts the basic method name to a getter method name. |
static java.util.Date |
toDate(java.lang.String dateStr)
Parses a date string using the formatters initialized in the config class. |
static java.lang.String |
unEscape(java.lang.String str)
Unescape any \", \' \n \r sequences |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int CAST_BIGDECIMAL
public static final int CAST_BIGINTEGER
public static final int CAST_BYTE
public static final int CAST_DOUBLE
public static final int CAST_FLOAT
public static final int CAST_INTEGER
public static final int CAST_LONG
public static final int CAST_SHORT
| Method Detail |
|---|
public static void addStaticMethods(java.lang.Class staticClasss,
java.util.Map<java.lang.String,java.lang.String> functionMap,
java.util.List<java.lang.String> functionNames)
staticClasss - functionMap -
public static boolean matchLike(java.lang.String searchFieldValue,
java.lang.String searchValue)
searchFieldValue - the value to search insearchValue - the value to search for
public static java.lang.Boolean matchRegularExpression(java.lang.String input,
java.lang.String regxString)
throws java.lang.Exception
input - the value to search inregxString - the regular expression to match
java.lang.Exceptionpublic static java.lang.String unEscape(java.lang.String str)
str - the string to unescape
public static java.util.Date toDate(java.lang.String dateStr)
dateStr - the date string
public static void initConstants(java.util.Map<java.lang.String,java.lang.Integer> expConstants)
public static java.lang.Object getBeanProperty(java.lang.Object startingObject,
java.lang.String scopedMethodName)
throws java.lang.IllegalArgumentException
startingObject - the source, or starting object to execute the method onscopedMethodName - the method name of the form = "customer.order.account.foo";
java.lang.IllegalArgumentExceptionpublic static java.lang.String toBeanGetterName(java.lang.String basicName)
basicName - the basic name
public static java.lang.Object invokeStaticFunction(ELContext elContext,
java.lang.String classname,
java.lang.String functionName,
java.util.List functionArgs)
throws java.lang.ClassNotFoundException,
java.lang.IllegalArgumentException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
public static java.lang.StringBuffer getMethodSignature(java.lang.String functionName,
java.util.List functionArgs)
functionName - the function namefunctionArgs - the arg type
public static java.lang.Integer getDateDiff(java.util.Calendar cal1,
java.util.Calendar cal2,
int datePart)
cal1 - the first calendarcal2 - the second calendardatePart - the date part to calculate the difference for
public static int getDaysInMonth(int year,
int month)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||