| |
Pattern asPattern(String regexp) |
| Parameters |
regexp | The regular expression |
| Returns |
A Pattern object, which can be used for string comparisons.
|
| |
String getClassName(Object objectOrClass) |
| Parameters |
objectOrClass |
The Java object or class to get the class name for.
|
| Returns |
The class name or None in case something non-Java is passed in.
|
| |
Object getProperty(Object object, String name) |
| Parameters |
object | The object to get the property for. |
name | The name of the property. |
| Returns | The property value. |
| |
boolean isInstance(Object object, String className) |
| Parameters |
object | The object to check. |
className | The name of the class or interface to test for. |
| Returns |
True if the object is an instance of the given class or implements the given
interface.
|
| |
void logError(String msg, boolean nowrap=false) |
| Parameters |
msg | The message to log. |
nowrap |
If true, lines of the message will not be wrapped in the report. Use for potentially
long messages. This parameter has no effect if the message needs to be buffered.
|
| |
void logMessage(String msg, boolean dontcompactify=false, boolean report=false, boolean nowrap=false) |
| Parameters |
msg | The message to log. |
dontcompactify | If true, the message will never be removed from a
compact run log. |
report | If true, the message will appear in the report. |
nowrap |
If true, lines of the message will not be wrapped in the report. Use for potentially
long messages. This parameter has no effect if the message needs to be buffered.
|
| |
void logWarning(String msg, boolean report=true, boolean nowrap=false) |
| Parameters |
msg | The message to log. |
report | If true (the default), the warning will be listed in the
report. Set this to false to exclude this specific warning from the report. |
nowrap |
If true, lines of the message will not be wrapped in the report. Use for potentially
long messages. This parameter has no effect if the message needs to be buffered.
|
| |
void print(Object object, ...) |
| Parameters |
object | The object, which should be printed. |
| |
void println(Object object) |
| Parameters |
object | The object, which should be printed. |
| |
void setProperty(Object object, String name, Object value) |
| Parameters |
object | The object to set the property for. |
name | The name of the property. |
value | The value to set. Null to remove the property. |
| |
String toString(Object object, String nullValue) |
| Parameters |
object | The object to get the string representation for. |
nullValue | The value to return if object is None, the empty string by default. |
| Returns |
Jython 8-bit or Unicode strings are returned unchanged, Java objects are turned into
a string via toString. In Jython, everything else is converted into an
8-bit Jython string.
|
| |
VariableData wrapObject(Object value, String stringValue, String description) |
| Parameters |
value | The object to wrap and to return upon rc.getObj(). |
stringValue | Optional string representation of the object, when accessed e.g. via rc.getStr(). |
description | Optional description of the object (Visible in log files and stack traces instead of the stringValue). |
| Returns |
The object wrapped in a VariableData instance.
|
| |