| java.lang.Object org.springframework.core.Conventions
Conventions | abstract public class Conventions (Code) | | Provides methods to support various naming and other conventions used
throughout the framework. Mainly for internal use within the framework.
author: Rob Harrop author: Juergen Hoeller since: 2.0 |
attributeNameToPropertyName | public static String attributeNameToPropertyName(String attributeName)(Code) | | Convert String s in attribute name format (lowercase, hyphens separating words)
into property name format (camel-cased). For example, transaction-manager is
converted into transactionManager .
|
getQualifiedAttributeName | public static String getQualifiedAttributeName(Class enclosingClass, String attributeName)(Code) | | Return an attribute name qualified by the supplied enclosing
Class . For example,
the attribute name 'foo ' qualified by
Class 'com.myapp.SomeClass '
would be 'com.myapp.SomeClass.foo '
|
getVariableName | public static String getVariableName(Object value)(Code) | | Determine the conventional variable name for the supplied
code>Object based on its concrete type. The convention
used is to return the uncapitalized short name of the Class .
So, com.myapp.Product becomes product .
For arrays, we use the pluralized version of the array component type.
For Collection s we attempt to 'peek ahead' in the
Collection to determine the component type and
return the pluralized version of that component type.
|
|
|