类 FormatHelper


  • public class FormatHelper
    extends Object
    Utility methods (formatters etc) used during parsing and evaluation.
    作者:
    Andy Clement
    • 方法详细资料

      • 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 method
        argumentTypes - 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)