|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.andromda.core.translation.TranslationUtils
Contains translation utilities.
| Constructor Summary | |
TranslationUtils()
TranslationUtils instances should NOT be constructed in standard programming. |
|
| Method Summary | |
static boolean |
containsPattern(String string,
String pattern)
Returns true if the specified pattern with braces around it, like so --> "{pattern}" exists in the string. |
static String |
deleteWhitespace(Object object)
Calls the object's toString method and deletes any whitespace from the value. |
static Object |
getProperty(Object bean,
String property)
Just retriieves properties from a bean, but gives a more informational error when the property can't be retrieved, it also cleans the resulting property from any excess white space |
static String |
getPropertyAsString(Object bean,
String property)
Just retriieves properties from a bean, but gives a more informational error when the property can't be retrieved, it also cleans the resulting property from any excess white space |
static String |
getStartingProperty(String property)
Retrieves the "starting" property name from one that is nested, for example, will return ' |
static String |
removeExtraWhitespace(String string)
Removes any extra whitepace --> does not remove the spaces between the words. |
static String |
replaceFirstPattern(String string,
String pattern,
String replaceWith)
Searches for and replaces the specified pattern with braces around it, like so --> "{pattern}" the first time it occurs in the string |
static String |
replacePattern(String string,
String pattern,
String replaceWith)
Searches for and replaces the specified pattern with braces around it, like so --> "{pattern}" every time it occurs in the string. |
static String |
trimToEmpty(Object object)
Calls the object's toString method and trims the value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TranslationUtils()
TranslationUtils instances should NOT be constructed in standard programming. Instead, the class
should be used as TranslationUtils.replacePattern(" some pattern ");.
This constructor is public to permit tools that require a JavaBean instance to operate.
| Method Detail |
public static String replacePattern(String string,
String pattern,
String replaceWith)
string - the string to to perform replacement on.pattern - the pattern to findreplaceWith - the pattern to place the existing one with.
public static String replaceFirstPattern(String string,
String pattern,
String replaceWith)
string - the string to to perform replacement on.pattern - the pattern to findreplaceWith - the pattern to place the existing one with.
public static boolean containsPattern(String string,
String pattern)
string - the string to to perform replacement on.pattern - the pattern to find
public static String trimToEmpty(Object object)
object - the object to use.
public static String deleteWhitespace(Object object)
object - the object to deleteWhite space from.
public static String getStartingProperty(String property)
property - the property.
public static String removeExtraWhitespace(String string)
string -
public static Object getProperty(Object bean,
String property)
bean - the bean from which to retrieve the propertyproperty - the property name
public static String getPropertyAsString(Object bean,
String property)
bean - the bean from which to retrieve the propertyproperty - the property name
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||