Top Description Constructors Methods
org.springframework.expression.spel.ast

pack-priv abstract Class FormatHelper

extends Object
Class Inheritance
Imports
java.util.List, .StringJoiner, org.springframework.core.convert.TypeDescriptor, org.springframework.lang.Nullable

Utility methods (formatters, etc) used during parsing and evaluation.
Authors
Andy Clement, Sam Brannen

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv static String

Returns:

a formatted String suitable for message inclusion
formatClassNameForMessage
(Class<?>
the Class whose name is to be formatted
clazz
)

Determine a readable name for a given Class object.

pack-priv static String

Returns:

a nicely formatted representation — for example, foo(java.lang.String,int)
formatMethodForMessage
(String
the name of the method
name
,
List<TypeDescriptor>
the types of the arguments to the method
argumentTypes
)

Produce a readable representation for a given method name with specified arguments.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

FormatHelperback to summary
pack-priv FormatHelper()

Method Detail

formatClassNameForMessageback to summary
pack-priv 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[]".

Parameters
clazz:Class<?>

the Class whose name is to be formatted

Returns:String

a formatted String suitable for message inclusion

formatMethodForMessageback to summary
pack-priv static String formatMethodForMessage(String name, List<TypeDescriptor> argumentTypes)

Produce a readable representation for a given method name with specified arguments.

Parameters
name:String

the name of the method

argumentTypes:List<TypeDescriptor>

the types of the arguments to the method

Returns:String

a nicely formatted representation — for example, foo(java.lang.String,int)