Param Directive

Attributes

Attribute Required Description
class no The parameter classname. The default value is java.lang.String.

Nested Elements

Element Cardinality Description
param 0..n A constructor argument. If the value of the parameter is not null, 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 of the specified class.

Description

A param directive within a context or enclosing param represents a constructor argument value.

Sample XML

   <component name="basic" class="MyComponent">
     <context class="org.apache.avalon.playground.basic.BasicContextImp">
       <entry key="gws">
         <constructor class="ReallySpecialClass">
           <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>