org.springframework.expression.spel.ast
Class FormatHelper

java.lang.Object
  extended by org.springframework.expression.spel.ast.FormatHelper

public class FormatHelper
extends Object

Utility methods (formatters, etc) used during parsing and evaluation.

Author:
Andy Clement

Constructor Summary
FormatHelper()
           
 
Method Summary
static String formatClassNameForMessage(Class<?> clazz)
          Produce a nice string for a given class object.
static String formatMethodForMessage(String name, List<TypeDescriptor> argumentTypes)
          Produce a nice string for a given method name with specified arguments.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormatHelper

public FormatHelper()
Method Detail

formatMethodForMessage

public static String formatMethodForMessage(String name,
                                            List<TypeDescriptor> argumentTypes)
Produce a nice string for a given method name with specified arguments.

Parameters:
name - the name of the method
argumentTypes - the types of the arguments to the method
Returns:
nicely formatted string, eg. foo(String,int)

formatClassNameForMessage

public static String formatClassNameForMessage(Class<?> clazz)
Produce a nice string for a given class object. For example a string array will have the formatted name "java.lang.String[]".

Parameters:
clazz - The class whose name is to be formatted
Returns:
a formatted string suitable for message inclusion