Class MappingMetaData

java.lang.Object
org.apache.xbean.spring.context.impl.MappingMetaData

public class MappingMetaData extends Object
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 Details

    • MappingMetaData

      public MappingMetaData(String packageName)
      Creates an empty MappingMetaData for the specified Java package.
      Parameters:
      packageName - the Java package to map
    • MappingMetaData

      public MappingMetaData(Properties properties)
      Creates MappingMetaData using the specified properties which contan the package name.
      Parameters:
      properties -
  • Method Details

    • getClassName

      public String getClassName(String localName)
      Returns the Java class name for the given XML element name
    • getPropertyName

      public String getPropertyName(String elementName, String attributeName)
      Returns the property name for the given element and attribute name
      Parameters:
      elementName - the XML local name of the element
      attributeName - the XML local name of the attribute
      Returns:
      the property name to use or null if the attribute is not a valid property
    • getNestedListProperty

      public String getNestedListProperty(String elementName, String childElementName)
      Returns a valid property name if the childElementName maps to a nested list property
      Parameters:
      elementName - the owner element
      childElementName - 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

      public String getNestedProperty(String elementName, String childElementName)
      Returns a valid property name if the childElementName maps to a nested bean property
      Parameters:
      elementName - the owner element
      childElementName - 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

      public boolean isDefaultConstructor(Constructor constructor)
    • isDefaultFactoryMethod

      public boolean isDefaultFactoryMethod(Class beanClass, Method factoryMethod)
    • getParameterNames

      public String[] getParameterNames(Constructor constructor)
    • getParameterNames

      public String[] getParameterNames(Class beanClass, Method factoryMethod)
    • constructorToPropertyName

      public static String constructorToPropertyName(Constructor constructor)
    • methodToPropertyName

      public static String methodToPropertyName(Class beanClass, Method method)
    • getInitMethodName

      public String getInitMethodName(String elementName)
    • getDestroyMethodName

      public String getDestroyMethodName(String elementName)
    • getFactoryMethodName

      public String getFactoryMethodName(String elementName)
    • getContentProperty

      public String getContentProperty(String elementName)
    • getMapEntryName

      public String getMapEntryName(String elementName, String property)
    • getMapKeyName

      public String getMapKeyName(String elementName, String property)
    • isFlatMap

      public boolean isFlatMap(String elementName, String property)
    • getMapDupsMode

      public String getMapDupsMode(String elementName, String property)
    • getMapDefaultKey

      public String getMapDefaultKey(String elementName, String property)
    • getFlatCollectionProperty

      public String getFlatCollectionProperty(String elementName, String property)
    • isFlatProperty

      public boolean isFlatProperty(String elementName, String property)
    • getPropertyEditor

      public String getPropertyEditor(String elementName, String property)