public class

FormatHelper

extends Object
java.lang.Object
   ↳ org.springframework.expression.spel.ast.FormatHelper

Class Overview

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

Summary

Public Constructors
FormatHelper()
Public Methods
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.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public FormatHelper ()

Public Methods

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

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)