org.springframework.expression.spel.ast
Class FormatHelper
java.lang.Object
org.springframework.expression.spel.ast.FormatHelper
public class FormatHelper
- extends Object
Utility methods (formatters, etc) used during parsing and evaluation.
- Author:
- Andy Clement
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FormatHelper
public FormatHelper()
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 methodargumentTypes
- 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