To map a named ModelElement on to a Java object, the name of
the element is mapped to a java name and prefixed with the string
"add". The resulting string is then used to look up a
method with a single parameter.
For example, for the attribute "geometry" would result
in a lookup of a method named "addGeometry" with a single
parameter. If multiple methods were matched during the lookup then an
exception is thrown indicating ambiguity. If no methods were found that
match name then skip down to configuring "typed" elements.
The type of the methods single parameter is then examined to determine
what happens next. There are two valid situations, if neither of these are
satisfied, then an exception is thrown.
- The parameters type is
org.apache.myrmidon.api.metadata.ModelElement
- The parameters type is a concrete class
1. If the parameter has a type of org.apache.myrmidon.api.metadata.ModelElement
then the un-modified model representation of element is passed to object by invoking
the adder method.
2. If the parameters type is concrete then an instance of the parameter is
instantiated using the default constructor. This created object is then configured
in the same manner as task using the elements representation as the model. After
the object is configured it is passed into object by invoking the adder method.