Example usage for org.springframework.util ClassUtils ARRAY_SUFFIX

List of usage examples for org.springframework.util ClassUtils ARRAY_SUFFIX

Introduction

In this page you can find the example usage for org.springframework.util ClassUtils ARRAY_SUFFIX.

Prototype

String ARRAY_SUFFIX

To view the source code for org.springframework.util ClassUtils ARRAY_SUFFIX.

Click Source Link

Document

Suffix for array class names: "[]" .

Usage

From source file:org.springframework.util.ClassUtils.java

/**
 * Build a nice qualified name for an array:
 * component type class name + "[]"./*from   w  w  w . j a  v a 2s .  c o m*/
 * @param clazz the array class
 * @return a qualified name for the array class
 */
private static String getQualifiedNameForArray(Class clazz) {
    StringBuffer buffer = new StringBuffer();
    while (clazz.isArray()) {
        clazz = clazz.getComponentType();
        buffer.append(ClassUtils.ARRAY_SUFFIX);
    }
    buffer.insert(0, clazz.getName());
    return buffer.toString();
}