Class MappingMetaData
java.lang.Object
org.apache.xbean.spring.context.impl.MappingMetaData
A helper class which understands how to map an XML namespaced element to
Spring bean configurations
- Since:
- 2.0
- Version:
- $Id$
- Author:
- James Strachan
-
Constructor Summary
ConstructorsConstructorDescriptionMappingMetaData
(String packageName) Creates an empty MappingMetaData for the specified Java package.MappingMetaData
(Properties properties) Creates MappingMetaData using the specified properties which contan the package name. -
Method Summary
Modifier and TypeMethodDescriptionstatic String
constructorToPropertyName
(Constructor constructor) getClassName
(String localName) Returns the Java class name for the given XML element namegetContentProperty
(String elementName) getDestroyMethodName
(String elementName) getFactoryMethodName
(String elementName) getFlatCollectionProperty
(String elementName, String property) getInitMethodName
(String elementName) getMapDefaultKey
(String elementName, String property) getMapDupsMode
(String elementName, String property) getMapEntryName
(String elementName, String property) getMapKeyName
(String elementName, String property) getNestedListProperty
(String elementName, String childElementName) Returns a valid property name if the childElementName maps to a nested list propertygetNestedProperty
(String elementName, String childElementName) Returns a valid property name if the childElementName maps to a nested bean propertyString[]
getParameterNames
(Class beanClass, Method factoryMethod) String[]
getParameterNames
(Constructor constructor) getPropertyEditor
(String elementName, String property) getPropertyName
(String elementName, String attributeName) Returns the property name for the given element and attribute nameboolean
isDefaultConstructor
(Constructor constructor) boolean
isDefaultFactoryMethod
(Class beanClass, Method factoryMethod) boolean
boolean
isFlatProperty
(String elementName, String property) static String
methodToPropertyName
(Class beanClass, Method method)
-
Constructor Details
-
MappingMetaData
Creates an empty MappingMetaData for the specified Java package.- Parameters:
packageName
- the Java package to map
-
MappingMetaData
Creates MappingMetaData using the specified properties which contan the package name.- Parameters:
properties
-
-
-
Method Details
-
getClassName
Returns the Java class name for the given XML element name -
getPropertyName
Returns the property name for the given element and attribute name- Parameters:
elementName
- the XML local name of the elementattributeName
- the XML local name of the attribute- Returns:
- the property name to use or null if the attribute is not a valid property
-
getNestedListProperty
Returns a valid property name if the childElementName maps to a nested list property- Parameters:
elementName
- the owner elementchildElementName
- is the child element name which maps to the nested list property- Returns:
- the property name if available or null if it is not applicable
-
getNestedProperty
Returns a valid property name if the childElementName maps to a nested bean property- Parameters:
elementName
- the owner elementchildElementName
- is the child element name which maps to the nested bean property- Returns:
- the property name if available or null if it is not applicable
-
isDefaultConstructor
-
isDefaultFactoryMethod
-
getParameterNames
-
getParameterNames
-
constructorToPropertyName
-
methodToPropertyName
-
getInitMethodName
-
getDestroyMethodName
-
getFactoryMethodName
-
getContentProperty
-
getMapEntryName
-
getMapKeyName
-
isFlatMap
-
getMapDupsMode
-
getMapDefaultKey
-
getFlatCollectionProperty
-
isFlatProperty
-
getPropertyEditor
-