|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ocltf.translation.TranslationUtils
Contains translation utilities.
Constructor Summary | |
TranslationUtils()
TranslationUtils instances should NOT be constructed in
standard programming. |
Method Summary | |
static boolean |
containsPattern(java.lang.String string,
java.lang.String pattern)
Returns true if the specified pattern with braces around it, like so --> "{pattern}" exists in the string. |
static java.lang.String |
deleteWhitespace(java.lang.Object object)
Calls the object's toString method and deletes any whitespace from the value. |
static java.lang.Object |
getProperty(java.lang.Object bean,
java.lang.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 java.lang.String |
getPropertyAsString(java.lang.Object bean,
java.lang.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 java.lang.String |
getStartingProperty(java.lang.String property)
Retrieves the "starting" property name from one that is nested, for example, will return ' |
static boolean |
isManyConnectingAssociationEnd(ElementFacade element,
java.lang.String name)
Returns true if the passed in name is a connecting
end and its multiplicity is many. |
static java.lang.String |
removeExtraWhitespace(java.lang.String string)
Removes any extra whitepace --> does not remove the spaces between the words. |
static java.lang.String |
replaceFirstPattern(java.lang.String string,
java.lang.String pattern,
java.lang.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 java.lang.String |
replacePattern(java.lang.String string,
java.lang.String pattern,
java.lang.String replaceWith)
Searches for and replaces the specified pattern with braces around it, like so --> "{pattern}" every time it occurs in the string. |
static java.lang.String |
trimToEmpty(java.lang.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 java.lang.String replacePattern(java.lang.String string, java.lang.String pattern, java.lang.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 java.lang.String replaceFirstPattern(java.lang.String string, java.lang.String pattern, java.lang.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(java.lang.String string, java.lang.String pattern)
string
- the string to to perform replacement on.pattern
- the pattern to find
public static java.lang.String trimToEmpty(java.lang.Object object)
object
- the object to use.
public static java.lang.String deleteWhitespace(java.lang.Object object)
object
- the object to deleteWhite space from.
public static java.lang.String getStartingProperty(java.lang.String property)
property
- the property.
public static java.lang.String removeExtraWhitespace(java.lang.String string)
string
-
public static java.lang.Object getProperty(java.lang.Object bean, java.lang.String property)
bean
- the bean from which to retrieve the propertyproperty
- the property name
public static java.lang.String getPropertyAsString(java.lang.Object bean, java.lang.String property)
bean
- the bean from which to retrieve the propertyproperty
- the property name
public static boolean isManyConnectingAssociationEnd(ElementFacade element, java.lang.String name)
name
is a connecting
end and its multiplicity is many.
element
- the ElementFacade to check.name
- the name of the association.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |