org.apache.felix.ipojo.api.composite
Class Instance

java.lang.Object
  extended by org.apache.felix.ipojo.api.composite.Instance
All Implemented Interfaces:
HandlerConfiguration

public class Instance
extends 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
Instance(String type)
          Creates a Instance.
 
Method Summary
 Instance addProperty(String name, Dictionary values)
          Adds a dictionary property.
 Instance addProperty(String name, List values)
          Adds a list property.
 Instance addProperty(String name, Map values)
          Adds a map property.
 Instance addProperty(String name, String value)
          Adds the string property.
 Instance addProperty(String name, String[] values)
          Adds an array property.
 Instance addProperty(String name, Vector values)
          Adds a vector property.
 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(String type)
Creates a Instance.

Parameters:
type - the targeted type.
Method Detail

addProperty

public Instance addProperty(String name,
                            String value)
Adds the string property.

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

addProperty

public Instance addProperty(String name,
                            List values)
Adds a list property.

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

addProperty

public Instance addProperty(String name,
                            String[] values)
Adds an array property.

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

addProperty

public Instance addProperty(String name,
                            Vector values)
Adds a vector property.

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

addProperty

public Instance addProperty(String name,
                            Map values)
Adds a map property.

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

addProperty

public Instance addProperty(String name,
                            Dictionary values)
Adds a dictionary property.

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

getElement

public 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()


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.