You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

How to declare a component type

XML
<component
    classname="my.Implementation"
    name="my-type"
>
</component>
Annotations
@Component(name="my-type")
public class Implementation {
  // ...
}

How to declare instances

<instance component="my-type"/>
<instance component="my.Implementation"/>
<instance component="my-type" name="my-instance"/>
<instance component="my-type" name="my-instance">
    <property name="property1" value="value1"/>
</instance>
</component>

Attribute name

Required

Default value

 

component

yes

 

specifies the component type (either by using the name or the class name)

name

no

generated

specifies the instance name.

Instances can contains a configuration given under the key-value form. PRoperties can also by complex type (refer to How-to use iPOJO factories)

  • No labels