org.oddjob.arooa.life
Class BaseElementMappings

java.lang.Object
  extended by org.oddjob.arooa.life.BaseElementMappings
All Implemented Interfaces:
ElementMappings

public class BaseElementMappings
extends Object
implements ElementMappings

The most basic ElementMappings that handles <class> and <is>.

Author:
rob

Constructor Summary
BaseElementMappings()
           
 
Method Summary
 DesignFactory designFor(ArooaElement element, InstantiationContext parentContext)
          Provide a mapping from an element to the name of a java class that is a DesignFactory for the element.
 ArooaElement[] elementsFor(InstantiationContext propertyContext)
          Provide a list of all elements in this mapping that support the given context.
 MappingsContents getBeanDoc(ArooaType arooaType)
          Get the BeanDoc for this mapping.
 ArooaClass mappingFor(ArooaElement element, InstantiationContext propertyContext)
          Provide a mapping from an element to the name of a java class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseElementMappings

public BaseElementMappings()
Method Detail

mappingFor

public ArooaClass mappingFor(ArooaElement element,
                             InstantiationContext propertyContext)
Description copied from interface: ElementMappings
Provide a mapping from an element to the name of a java class.

Specified by:
mappingFor in interface ElementMappings
Parameters:
element - The element.
propertyContext - The InstantiationContext.
Returns:
The ArooaClass. Null if no mappings exists.

designFor

public DesignFactory designFor(ArooaElement element,
                               InstantiationContext parentContext)
Description copied from interface: ElementMappings
Provide a mapping from an element to the name of a java class that is a DesignFactory for the element.

Specified by:
designFor in interface ElementMappings
Parameters:
element - The element.
parentContext - The InstantiationContext.
Returns:
The DesignFactory. May be null.

elementsFor

public ArooaElement[] elementsFor(InstantiationContext propertyContext)
Description copied from interface: ElementMappings
Provide a list of all elements in this mapping that support the given context.

Specified by:
elementsFor in interface ElementMappings
Returns:
The elements. May be null.

getBeanDoc

public MappingsContents getBeanDoc(ArooaType arooaType)
Description copied from interface: ElementMappings
Get the BeanDoc for this mapping.

Specified by:
getBeanDoc in interface ElementMappings
Parameters:
arooaType - The type of Mapping.
Returns:
The BeanDoc. May be null.