public class IlvExpressionEvaluation extends Object
Modifier and Type | Method and Description |
---|---|
static Color |
brighterColor(Object v)
Implements the
brighterColor(arg) function of CSS expressions. |
static Class<?> |
classForName(String className)
Returns the class object for a given class name.
|
static String |
concat(Object[] args)
Implements the
concat(arg1,... |
static double |
convertDoubleFunctionArgument(Object arg)
Converts an argument of the
double(arg1, op1, arg2, ...) |
static long |
convertLongFunctionArgument(Object arg)
Converts an argument of the
long(arg1, op1, arg2, ...) |
static long |
convertNumberStringToLong(String s)
Converts a string argument of the
long(arg1, op1, arg2, ...) |
static boolean |
convertToBoolean(Object v)
Converts the given value to a
boolean . |
static byte |
convertToByte(Object v)
Converts the given value to a
byte . |
static double |
convertToDouble(Object v)
Converts the given value to a
double . |
static float |
convertToFloat(Object v)
Converts the given value to a
float . |
static int |
convertToInt(Object v)
Converts the given value to an
int . |
static long |
convertToLong(Object v)
Converts the given value to a
long . |
static short |
convertToShort(Object v)
Converts the given value to a
short . |
static String |
convertToString(Object v)
Converts the given value to a
String . |
static Object |
convertToType(Object v,
Object clazzOrClazzName)
Implements the
cast(value,typeAsString) function of CSS
expressions. |
static String |
customFormat(Object formatBean,
Object[] args)
Implements the
customFormat(formatBean,arg0,arg1,...) |
static Color |
darkerColor(Object v)
Implements the
darkerColor(arg) function of CSS expressions. |
static String |
decimalFormat(Object formatArg,
double arg,
Locale locale)
Implements the
decimalFormat(format, arg) function of CSS
expressions compiled with JViews 8.7 or older. |
static String |
decimalFormat(Object formatArg,
double arg,
com.ibm.icu.util.ULocale locale,
String numberSystem)
Implements the
decimalFormat(format, arg) function of CSS
expressions. |
static String |
decimalFormat(Object formatArg,
long arg,
Locale locale)
Implements the
decimalFormat(format, arg) function of CSS
expressions compiled with JViews 8.7 or older. |
static String |
decimalFormat(Object formatArg,
long arg,
com.ibm.icu.util.ULocale locale,
String numberSystem)
Implements the
decimalFormat(format, arg) function of CSS
expressions. |
static String |
decimalFormat(Object formatArg,
Object arg,
Locale locale)
Implements the
decimalFormat(format, arg) function of CSS
expressions compiled with JViews 8.7 or older. |
static String |
decimalFormat(Object formatArg,
Object arg,
com.ibm.icu.util.ULocale locale,
String numberSystem)
Implements the
decimalFormat(format, arg) function of CSS
expressions. |
static double |
divide(double arg1,
double arg2)
Implements the "/" operator of CSS expressions.
|
static double |
doubleExpr(Object[] args)
Implements the
double(arg1, op1, arg2, ...) |
static String |
emptyString()
Implements the
emptyString() function of CSS expressions. |
static boolean |
equals(Object arg1,
Object arg2)
Implements the "==" operator of CSS expressions.
|
static float |
floatExpr(Object[] args)
Implements the
float(arg1, op1, arg2, ...) |
static int |
intExpr(Object[] args)
Implements the
int(arg1, op1, arg2, ...) |
static Object |
invokeConstructor(Class<?> clazz,
Class<?>[] parameterTypes,
Object[] args)
Implements the
new(className,signature,...) |
static Object |
invokeConstructor(String className,
String signature,
Object[] args)
Implements the
new(className,signature,...) |
static Object |
invokeMethod(Object obj,
String methodName,
Class<?>[] parameterTypes,
Object[] args)
Implements the
invoke(value,methodName,signature,...) |
static Object |
invokeMethod(Object obj,
String methodName,
String signature,
Object[] args)
Implements the
invoke(value,methodName,signature,...) |
static Object |
invokeStaticMethod(Class<?> clazz,
String methodName,
Class<?>[] parameterTypes,
Object[] args)
Implements the
invokeStatic(className,methodName,signature,...) |
static Object |
invokeStaticMethod(String className,
String methodName,
String signature,
Object[] args)
Implements the
invokeStatic(className,methodName,signature,...) |
static Object |
localized(Object resourceBundleNameArg,
Object resourceNameArg,
Object localeArg,
Locale defaultLocale)
Implements the
localized(resourceBundleName, resourceName[, locale]) function
of CSS expressions. |
static long |
longExpr(Object[] args)
Implements the
long(arg1, op1, arg2, ...) |
static Number |
max(Object[] args)
Implements the
max(arg1,... |
static String |
messageFormat(Object formatArg,
Object[] args,
Locale locale)
Implements the
messageFormat(format,arg0,arg1,...) |
static String |
messageFormat(Object formatArg,
Object[] args,
com.ibm.icu.util.ULocale locale)
Implements the
messageFormat(format,arg0,arg1,...) |
static Number |
min(Object[] args)
Implements the
min(arg1,... |
static boolean |
notEquals(Object arg1,
Object arg2)
Implements the "!
|
static Object |
plus(Object arg1,
Object arg2)
Implements the "+" operator of CSS expressions.
|
static double |
random()
Implements the
random() function of CSS expressions. |
static double |
random(double n)
Implements the
random(n) function of CSS expressions. |
static float |
random(float n)
Implements the
random(n) function of CSS expressions. |
static int |
random(int n)
Implements the
random(n) function of CSS expressions. |
static long |
random(long n)
Implements the
random(n) function of CSS expressions. |
static Number |
random(Object arg)
Implements the
random(n) function of CSS expressions. |
static long |
remainder(long arg1,
long arg2)
Implements the "%" operator of CSS expressions.
|
static String |
simpleDateFormat(Object formatArg,
Object arg,
Locale locale)
Implements the
simpleDateFormat(format, arg) function of CSS
expressions compiled with JViews 8.7 or older. |
static String |
simpleDateFormat(Object formatArg,
Object arg,
Object localeArg,
com.ibm.icu.util.ULocale defaultLocale)
Implements the
simpleDateFormat(format, arg[, locale])
function of CSS expressions. |
public static long convertToLong(Object v)
long
.v
- The evaluation result of a subexpression.public static int convertToInt(Object v)
int
.v
- The evaluation result of a subexpression.public static short convertToShort(Object v)
short
.v
- The evaluation result of a subexpression.public static byte convertToByte(Object v)
byte
.v
- The evaluation result of a subexpression.public static double convertToDouble(Object v)
double
.v
- The evaluation result of a subexpression.public static float convertToFloat(Object v)
float
.v
- The evaluation result of a subexpression.public static boolean convertToBoolean(Object v)
boolean
.v
- The evaluation result of a subexpression.public static String convertToString(Object v)
String
.v
- The evaluation result of a subexpression.public static Object convertToType(Object v, Object clazzOrClazzName)
cast(value,typeAsString)
function of CSS
expressions.
Converts a given value to a type. If the class name is given as string, the class name must be fully qualified. The primitive type keywords "int", "long" ... are also accepted. Array types are indicated by the brackets, for instance "int[][][]".
v
- The evaluation result of a subexpression.clazzOrClazzName
- A string describing a class, or the class itself.public static Class<?> classForName(String className)
className
- A class name. Array classes and type parameters (generics) are not
supported here.IllegalArgumentException
- if the class could not be found or loadedpublic static Object invokeMethod(Object obj, String methodName, String signature, Object[] args)
invoke(value,methodName,signature,...)
function
of CSS expressions.
Invokes a method via introspection.
obj
- The object on which the method is to be called.methodName
- The name of a public method on the object.signature
- The argument types of the method, as a string. It contains the
fully qualified parameter types, without type parameters
(generics), separated by commas and optionally spaces. The syntax
of the parameter types is the same as in convertToType(java.lang.Object, java.lang.Object)
.
An example signature is
"java.lang.String,int[][],boolean"
.args
- The arguments to be passed to the method.public static Object invokeMethod(Object obj, String methodName, Class<?>[] parameterTypes, Object[] args)
invoke(value,methodName,signature,...)
function
of CSS expressions.
Invokes a method via introspection.
obj
- The object on which the method is to be called.methodName
- The name of a public method on the object.parameterTypes
- The argument types of the method.args
- The arguments to be passed to the method.public static Object invokeStaticMethod(String className, String methodName, String signature, Object[] args)
invokeStatic(className,methodName,signature,...)
function of
CSS expressions.
Invokes a static method via introspection.
className
- The fully-qualified name of a class.methodName
- The name of a public static method on the class.signature
- The argument types of the method, as a string. It contains the
fully qualified parameter types, without type parameters
(generics), separated by commas and optionally spaces. The syntax
of the parameter types is the same as in convertToType(java.lang.Object, java.lang.Object)
.
An example signature is
"java.lang.String,int[][],boolean"
.args
- The arguments to be passed to the method.public static Object invokeStaticMethod(Class<?> clazz, String methodName, Class<?>[] parameterTypes, Object[] args)
invokeStatic(className,methodName,signature,...)
function of
CSS expressions.
Invokes a static method via introspection.
clazz
- A class.methodName
- The name of a public static method on the class.parameterTypes
- The argument types of the method.args
- The arguments to be passed to the method.public static Object invokeConstructor(String className, String signature, Object[] args)
new(className,signature,...)
function of CSS
expressions.
Invokes a constructor via introspection.
className
- The fully-qualified name of a class.signature
- The argument types of the constructor, as a string. It contains
the fully qualified parameter types, without type parameters
(generics), separated by commas and optionally spaces. The syntax
of the parameter types is the same as in convertToType(java.lang.Object, java.lang.Object)
.
An example signature is
"java.lang.String,int[][],boolean"
.args
- The arguments to be passed to the constructor.public static Object invokeConstructor(Class<?> clazz, Class<?>[] parameterTypes, Object[] args)
new(className,signature,...)
function of CSS
expressions.
Invokes a constructor via introspection.
clazz
- A class.parameterTypes
- The argument types of the constructor.args
- The arguments to be passed to the constructor.public static boolean equals(Object arg1, Object arg2)
public static boolean notEquals(Object arg1, Object arg2)
public static Object plus(Object arg1, Object arg2)
public static double divide(double arg1, double arg2)
public static long remainder(long arg1, long arg2)
public static String concat(Object[] args)
concat(arg1,...,argn)
function of CSS
expressions.
Returns the concatenation of the arguments arg1
,...,
argn
as strings.
public static String emptyString()
emptyString()
function of CSS expressions.
Returns an empty string.
public static String messageFormat(Object formatArg, Object[] args, Locale locale)
messageFormat(format,arg0,arg1,...)
function of
CSS expressions compiled with JViews 8.7 or older.
Returns a formatted string. The formatting is done through the
MessageFormat
object corresponding to the first argument. See
class MessageFormat
for details.
public static String messageFormat(Object formatArg, Object[] args, com.ibm.icu.util.ULocale locale)
messageFormat(format,arg0,arg1,...)
function of
CSS expressions.
Returns a formatted string. The formatting is done through the
MessageFormat
object corresponding to the first argument. See
class MessageFormat
for details.
public static String decimalFormat(Object formatArg, Object arg, Locale locale)
decimalFormat(format, arg)
function of CSS
expressions compiled with JViews 8.7 or older.
Returns a formatted string. The formatting is done through the
DecimalFormat
object corresponding to the first argument. See
class DecimalFormat
for details.
public static String decimalFormat(Object formatArg, Object arg, com.ibm.icu.util.ULocale locale, String numberSystem)
decimalFormat(format, arg)
function of CSS
expressions.
Returns a formatted string. The formatting is done through the
DecimalFormat
object corresponding to the first argument. See
class DecimalFormat
for details.
public static String decimalFormat(Object formatArg, long arg, Locale locale)
decimalFormat(format, arg)
function of CSS
expressions compiled with JViews 8.7 or older.
Returns a formatted string. The formatting is done through the
DecimalFormat
object corresponding to the first argument. See
class DecimalFormat
for details.
public static String decimalFormat(Object formatArg, long arg, com.ibm.icu.util.ULocale locale, String numberSystem)
decimalFormat(format, arg)
function of CSS
expressions.
Returns a formatted string. The formatting is done through the
DecimalFormat
object corresponding to the first argument. See
class DecimalFormat
for details.
public static String decimalFormat(Object formatArg, double arg, Locale locale)
decimalFormat(format, arg)
function of CSS
expressions compiled with JViews 8.7 or older.
Returns a formatted string. The formatting is done through the
DecimalFormat
object corresponding to the first argument. See
class DecimalFormat
for details.
public static String decimalFormat(Object formatArg, double arg, com.ibm.icu.util.ULocale locale, String numberSystem)
decimalFormat(format, arg)
function of CSS
expressions.
Returns a formatted string. The formatting is done through the
DecimalFormat
object corresponding to the first argument. See
class DecimalFormat
for details.
public static String simpleDateFormat(Object formatArg, Object arg, Locale locale)
simpleDateFormat(format, arg)
function of CSS
expressions compiled with JViews 8.7 or older.
Returns a formatted string. The formatting is done through the
SimpleDateFormat
object corresponding to the first argument.
See class SimpleDateFormat
for details.
public static String simpleDateFormat(Object formatArg, Object arg, Object localeArg, com.ibm.icu.util.ULocale defaultLocale)
simpleDateFormat(format, arg[, locale])
function of CSS expressions.
Returns a formatted string. The formatting is done through the
SimpleDateFormat
object corresponding to the first argument.
See class SimpleDateFormat
for details.
public static String customFormat(Object formatBean, Object[] args)
customFormat(formatBean,arg0,arg1,...)
function
of CSS expressions.
Returns a formatted string. formatBean
must be a Java object
of type MessageFormat
, NumberFormat
, or DateFormat
.
public static Object localized(Object resourceBundleNameArg, Object resourceNameArg, Object localeArg, Locale defaultLocale)
localized(resourceBundleName, resourceName[, locale])
function
of CSS expressions.
Returns the localized value of the designated resource, fetched from a
ResourceBundle, usually a string. The locale argument may be
null
.
public static double convertDoubleFunctionArgument(Object arg)
double(arg1, op1, arg2, ...)
and
float(arg1, op1, arg2, ...)
functions to a double
value.public static double doubleExpr(Object[] args)
double(arg1, op1, arg2, ...)
function of CSS
expressions.
Evaluates the combination of arguments and operators as an expression. The
operators can be "+", "-", "*", "/". The arguments are interpreted as
numbers of type double
. The result is a number of type
double
.
public static float floatExpr(Object[] args)
float(arg1, op1, arg2, ...)
function of CSS
expressions.
Evaluates the combination of arguments and operators as an expression. The
operators can be "+", "-", "*", "/". The arguments are interpreted as
numbers of type double
. The result is a number of type
float
.
public static long convertNumberStringToLong(String s)
long(arg1, op1, arg2, ...)
and int(arg1, op1, arg2, ...)
functions to a long
value. This is like convertToLong(Object)
, except that it also
allows floating-point numbers and converts them to long
through truncation.public static long convertLongFunctionArgument(Object arg)
long(arg1, op1, arg2, ...)
and
int(arg1, op1, arg2, ...)
functions to a long
value.public static long longExpr(Object[] args)
long(arg1, op1, arg2, ...)
function of CSS
expressions.
Evaluates the combination of arguments and operators as an expression. The
operators can be "+", "-", "*", "/". The arguments are interpreted as
numbers of type long
. The result is a number of type
long
.
public static int intExpr(Object[] args)
int(arg1, op1, arg2, ...)
function of CSS
expressions.
Evaluates the combination of arguments and operators as an expression. The
operators can be "+", "-", "*", "/". The arguments are interpreted as
numbers of type long
. The result is a number of type
int
.
public static double random()
random()
function of CSS expressions.
Returns a random number between 0 (inclusive) and 1 (exclusive).
public static Number random(Object arg)
random(n)
function of CSS expressions.
Returns a random number between 0 (inclusive) and n (exclusive).
public static int random(int n)
random(n)
function of CSS expressions.
Returns a random number between 0 (inclusive) and n (exclusive).
public static long random(long n)
random(n)
function of CSS expressions.
Returns a random number between 0 (inclusive) and n (exclusive).
public static float random(float n)
random(n)
function of CSS expressions.
Returns a random number between 0 (inclusive) and n (exclusive).
public static double random(double n)
random(n)
function of CSS expressions.
Returns a random number between 0 (inclusive) and n (exclusive).
public static Number min(Object[] args)
min(arg1,...,argn)
function of CSS expressions.
Returns the minimum of the arguments arg1
,...,
argn
as numbers.
public static Number max(Object[] args)
max(arg1,...,argn)
function of CSS expressions.
Returns the maximum of the arguments arg1
,...,
argn
as numbers.
public static Color brighterColor(Object v)
brighterColor(arg)
function of CSS expressions.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.