org.apache.felix.ipojo.api.composite

## Class Instance

- java.lang.Object
- - org.apache.felix.ipojo.api.composite.Instance

All Implemented Interfaces:
  HandlerConfiguration

    public class Instance
    extends java.lang.Object
    implements HandlerConfiguration

Allows defining a contained instance. A contained instance is like an instance declaration but the instance is created in the composite.

Author:
  Felix Project Team

### Constructor Summary

Constructors
Constructor and Description
`Instance(java.lang.String type)` Creates a Instance.

### Method Summary

All Methods Instance Methods Concrete Methods
`Instance` `addProperty(java.lang.String name, java.util.Dictionary values)` Adds a dictionary property.
`Instance` `addProperty(java.lang.String name, java.util.List values)` Adds a list property.
`Instance` `addProperty(java.lang.String name, java.util.Map values)` Adds a map property.
`Instance` `addProperty(java.lang.String name, java.lang.String value)` Adds the string property.
`Instance` `addProperty(java.lang.String name, java.lang.String[] values)` Adds an array property.
`Instance` `addProperty(java.lang.String name, java.util.Vector values)` Adds a vector property.
`org.apache.felix.ipojo.metadata.Element` `getElement()` Gets the instance description in the Element-Attribute form.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### Instance

    public Instance(java.lang.String type)

Creates a Instance.

Parameters:
  `type` - the targeted type.

### Method Detail

#### addProperty

    public Instance addProperty(java.lang.String name,
                                java.lang.String value)

Adds the string property.

Parameters:
  `name` - property name
  `value` - property value
Returns:
  the current instance

#### addProperty

    public Instance addProperty(java.lang.String name,
                                java.util.List values)

Adds a list property.

Parameters:
  `name` - property name
  `values` - the list
Returns:
  the current instance

#### addProperty

    public Instance addProperty(java.lang.String name,
                                java.lang.String[] values)

Adds an array property.

Parameters:
  `name` - the property name
  `values` - the array
Returns:
  the current instance

#### addProperty

    public Instance addProperty(java.lang.String name,
                                java.util.Vector values)

Adds a vector property.

Parameters:
  `name` - the property name
  `values` - the vector
Returns:
  the current instance

#### addProperty

    public Instance addProperty(java.lang.String name,
                                java.util.Map values)

Adds a map property.

Parameters:
  `name` - the property name
  `values` - the map
Returns:
  the current instance

#### addProperty

    public Instance addProperty(java.lang.String name,
                                java.util.Dictionary values)

Adds a dictionary property.

Parameters:
  `name` - the property name
  `values` - the dictionary
Returns:
  the current instance

#### getElement

    public org.apache.felix.ipojo.metadata.Element getElement()

Gets the instance description in the Element-Attribute form.

Specified by:
  `getElement` in interface `HandlerConfiguration`
Returns:
  the root Element of the instance description
See Also:
  `HandlerConfiguration.getElement()`