org.springframework.expression.spel.ast
Class FormatHelper

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

public class FormatHelper
extends java.lang.Object

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

Author:
Andy Clement

Constructor Summary
FormatHelper()
           
 
Method Summary
static java.lang.String formatClassNameForMessage(java.lang.Class<?> clazz)
          Produce a nice string for a given class object.
static java.lang.String formatMethodForMessage(java.lang.String name, java.util.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 java.lang.String formatMethodForMessage(java.lang.String name,
                                                      java.util.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 java.lang.String formatClassNameForMessage(java.lang.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