org.tynamo.util
Class Utils

java.lang.Object
  extended by org.tynamo.util.Utils

public class Utils
extends Object


Field Summary
static String ADD_NEW_MESSAGE
           
static String ADDED_MESSAGE
           
static String APPLY_AND_RETURN_MESSAGE
           
static String APPLY_MESSAGE
           
static String CANCEL_MESSAGE
           
static String DEFAULT
           
static String EDIT_MESSAGE
           
static String LIST_MESSAGE
           
static String NEW_MESSAGE
           
static String REMOVE_MESSAGE
           
static String SAVED_MESSAGE
           
static String SHOW_MESSAGE
           
 
Constructor Summary
Utils()
           
 
Method Summary
static Class checkForCGLIB(Class type)
           
static Class classForName(String className)
           
static void executeOgnlExpression(String ognlExpression, Object member, Object model)
           
static boolean isExcluded(String name, Collection<String> exclusionPatterns)
          Tests whether or not a name matches against at least one exclude pattern.
static String pluralize(String singularNoun)
          Thank you, AndroMDA project...
static String unqualify(String className)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

APPLY_MESSAGE

public static final String APPLY_MESSAGE
See Also:
Constant Field Values

APPLY_AND_RETURN_MESSAGE

public static final String APPLY_AND_RETURN_MESSAGE
See Also:
Constant Field Values

REMOVE_MESSAGE

public static final String REMOVE_MESSAGE
See Also:
Constant Field Values

CANCEL_MESSAGE

public static final String CANCEL_MESSAGE
See Also:
Constant Field Values

ADD_NEW_MESSAGE

public static final String ADD_NEW_MESSAGE
See Also:
Constant Field Values

EDIT_MESSAGE

public static final String EDIT_MESSAGE
See Also:
Constant Field Values

SHOW_MESSAGE

public static final String SHOW_MESSAGE
See Also:
Constant Field Values

LIST_MESSAGE

public static final String LIST_MESSAGE
See Also:
Constant Field Values

NEW_MESSAGE

public static final String NEW_MESSAGE
See Also:
Constant Field Values

ADDED_MESSAGE

public static final String ADDED_MESSAGE
See Also:
Constant Field Values

SAVED_MESSAGE

public static final String SAVED_MESSAGE
See Also:
Constant Field Values

DEFAULT

public static String DEFAULT
Constructor Detail

Utils

public Utils()
Method Detail

classForName

public static Class classForName(String className)

unqualify

public static String unqualify(String className)

pluralize

public static String pluralize(String singularNoun)
Thank you, AndroMDA project... Linguistically pluralizes a singular noun.

Whitespace as well as null> arguments will return an empty String.

Parameters:
singularNoun - A singularNoun to pluralize
Returns:
The plural of the argument singularNoun

checkForCGLIB

public static Class checkForCGLIB(Class type)
Parameters:
type - the (usable) super type if passed a CGLIB enhanced class
Returns:

executeOgnlExpression

public static void executeOgnlExpression(String ognlExpression,
                                         Object member,
                                         Object model)

isExcluded

public static boolean isExcluded(String name,
                                 Collection<String> exclusionPatterns)
Tests whether or not a name matches against at least one exclude pattern.

Parameters:
name - The name to match. Must not be null.
exclusionPatterns - the list of exclude patterns to test against
Returns:
true when the name matches against at least one exclude pattern, or false otherwise.


Copyright © 2004-2009. All Rights Reserved.