|
The Spring Framework | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.core.Conventions
public abstract class Conventions
Provides methods to support various naming and other conventions used throughout the framework. Mainly for internal use within the framework.
| Constructor Summary | |
|---|---|
Conventions()
|
|
| Method Summary | |
|---|---|
static String |
attributeNameToPropertyName(String attributeName)
Convert Strings in attribute name format (lowercase, hyphens separating words)
into property name format (camel-cased). |
static String |
getQualifiedAttributeName(Class enclosingClass,
String attributeName)
Return an attribute name qualified by the supplied enclosing Class. |
static String |
getVariableName(Object value)
Determine the conventional variable name for the supplied code>Object based on its concrete type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Conventions()
| Method Detail |
|---|
public static String getVariableName(Object value)
Class.
So, com.myapp.Product becomes product.
For arrays, we use the pluralized version of the array component type.
For Collections we attempt to 'peek ahead' in the
Collection to determine the component type and
return the pluralized version of that component type.
public static String attributeNameToPropertyName(String attributeName)
Strings in attribute name format (lowercase, hyphens separating words)
into property name format (camel-cased). For example, transaction-manager is
converted into transactionManager.
public static String getQualifiedAttributeName(Class enclosingClass,
String attributeName)
Class. For example,
the attribute name 'foo' qualified by Class 'com.myapp.SomeClass'
would be 'com.myapp.SomeClass.foo'
|
The Spring Framework | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||