|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.org.ogsadai.tools.EditorUtils
public class EditorUtils
Editor utilities.
| Constructor Summary | |
|---|---|
EditorUtils()
|
|
| Method Summary | |
|---|---|
static void |
addKeyValue(KeyValueProperties properties,
java.lang.String keyString,
java.lang.String value)
Add a configuration property. |
static void |
deleteKeyValue(KeyValueProperties properties,
java.lang.String keyString)
Delete a configuration property. |
static java.lang.String |
getArgument(java.lang.String[] arguments,
int index,
java.lang.String error)
Get the ith argument from an array. |
static void |
getKeyValue(KeyValueProperties properties,
java.lang.String keyString)
Get a configuration property. |
static void |
invokeStringMethod(java.lang.Object object,
java.lang.String method,
java.lang.String[] arguments)
Invoke by reflection a method that takes 0 or more string arguments. |
static void |
listKeys(KeyValueProperties properties)
List configuration property keys only. |
static void |
listKeyValues(KeyValueProperties properties)
List key-value properties properties. |
static void |
printException(java.lang.Throwable e)
Print an exception chain, displaying the localized messages. |
static void |
purgeKeyValues(KeyValueProperties properties)
Purge configuration properties. |
static java.util.List<java.lang.String> |
tokenize(java.lang.String str)
Tokenize the given string into a list of strings. |
static java.util.List<java.lang.String> |
tokenizeRegexp(java.lang.String str)
Tokenize the given string into a list of strings. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EditorUtils()
| Method Detail |
|---|
public static void invokeStringMethod(java.lang.Object object,
java.lang.String method,
java.lang.String[] arguments)
throws ConfigEditorException
object - Object.method - Method name.arguments - Arguments.
ConfigEditorException - If there is a problem in the invocation.public static void printException(java.lang.Throwable e)
e - Exception.public static java.util.List<java.lang.String> tokenizeRegexp(java.lang.String str)
str - String.
public static java.util.List<java.lang.String> tokenize(java.lang.String str)
throws java.io.IOException
str - String.
java.io.IOException - If any problems arise.public static void listKeyValues(KeyValueProperties properties)
properties - Key-value properties.public static void listKeys(KeyValueProperties properties)
properties - Key-value properties.
public static void getKeyValue(KeyValueProperties properties,
java.lang.String keyString)
throws KeyValueUnknownException
properties - Key-value properties.keyString - Key as a string.
KeyValueUnknownException - If the key is not known to the configuration properties.
public static void deleteKeyValue(KeyValueProperties properties,
java.lang.String keyString)
throws KeyValueUnknownException
properties - Key-value properties.keyString - Key as a string.
KeyValueUnknownException - If the key is not known to the configuration properties.
public static void addKeyValue(KeyValueProperties properties,
java.lang.String keyString,
java.lang.String value)
properties - Key-value properties.keyString - Key as a string.value - Value.public static void purgeKeyValues(KeyValueProperties properties)
properties - Key-value properties.
public static java.lang.String getArgument(java.lang.String[] arguments,
int index,
java.lang.String error)
arguments - Array of arguments.index - Index of requested argument.error - Error message.
java.lang.IllegalArgumentException - If the index is out of bounds. The exception will
contain the given error message.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||