类 FormatHelper
- java.lang.Object
- org.springframework.expression.spel.ast.FormatHelper
public class FormatHelper extends Object
Utility methods (formatters etc) used during parsing and evaluation.- 作者:
- Andy Clement
构造器概要
构造器 构造器 说明 FormatHelper()
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static String
formatClassNameForMessage(Class<?> clazz)
Determine a readable name for a given Class object.static String
formatMethodForMessage(String name, List<TypeDescriptor> argumentTypes)
Produce a readable representation for a given method name with specified arguments.
构造器详细资料
FormatHelper
public FormatHelper()
方法详细资料
formatMethodForMessage
public static String formatMethodForMessage(String name, List<TypeDescriptor> argumentTypes)
Produce a readable representation for a given method name with specified arguments.- 参数:
name
- the name of the methodargumentTypes
- the types of the arguments to the method- 返回:
- a nicely formatted representation, e.g.
foo(String,int)
formatClassNameForMessage
public static String formatClassNameForMessage(Class<?> clazz)
Determine a readable name for a given Class object.A String array will have the formatted name "java.lang.String[]".
- 参数:
clazz
- the Class whose name is to be formatted- 返回:
- a formatted String suitable for message inclusion
- 另请参阅:
ClassUtils.getQualifiedName(Class)