Constructor Directive

Attributes

Attribute Required Description
key yes The context entry key.

Nested Elements

Element Cardinality Description
param * A constructor argument.If the value of the element is not empty, the value will be used as a default constructor argument. Otherwise, Merlin will attempt to locate nested parameter elements in order to build a new instance.

Description

A context entry directive defines the creation of a tagged object.

Sample XML

   <component name="basic" class="MyComponent">
     <context class="org.apache.avalon.playground.basic.BasicContextImp">
       <entry key="gws">
         <constructor class="VerySpecialClass">
           <param class="java.io.File">temp</param>
           <param>George C. Scott</param>
           <param class="SpecialClass">
             <param>100</param>
             <param>200</param>
           </param>
         </constructor>
       </entry>
     </context>
   </component>