org.apache.felix.ipojo.extender.internal.declaration.service

## Class DefaultDeclarationBuilderService

- java.lang.Object
- - org.apache.felix.ipojo.extender.internal.declaration.service.DefaultDeclarationBuilderService

All Implemented Interfaces:
  DeclarationBuilderService

    public class DefaultDeclarationBuilderService
    extends java.lang.Object
    implements DeclarationBuilderService

### Constructor Summary

Constructors
Constructor and Description
`DefaultDeclarationBuilderService(org.osgi.framework.BundleContext context)`

### Method Summary

All Methods Instance Methods Concrete Methods
`DeclarationHandle` `newExtension(java.lang.String name, FactoryBuilder builder)` Declares a new extension (supports new types like component, composite, handler).
`InstanceBuilder` `newInstance(java.lang.String type)` Declares a new anonymous instance of a given type.
`InstanceBuilder` `newInstance(java.lang.String type, java.lang.String name)` Declares a new instance of a given type.
`InstanceBuilder` `newInstance(java.lang.String type, java.lang.String name, java.lang.String version)` Declares a new instance of a given type.
`DeclarationHandle` `newType(org.apache.felix.ipojo.metadata.Element description)` Declares a new type using the given element description.

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

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

### Constructor Detail

#### DefaultDeclarationBuilderService

    public DefaultDeclarationBuilderService(org.osgi.framework.BundleContext context)

### Method Detail

#### newInstance

    public InstanceBuilder newInstance(java.lang.String type)

Description copied from interface: `DeclarationBuilderService`
Declares a new anonymous instance of a given type. Invoking this method is equivalent to invoking `newInstance(type, null)`.

Specified by:
  `newInstance` in interface `DeclarationBuilderService`
Parameters:
  `type` - name of the component to be instantiated (cannot be null).
Returns:
  a handle usable to publish / retract the declaration.
See Also:
  `InstanceDeclaration`

#### newInstance

    public InstanceBuilder newInstance(java.lang.String type,
                                       java.lang.String name)

Description copied from interface: `DeclarationBuilderService`
Declares a new instance of a given type. Invoking this method is equivalent to invoking `newInstance(type, name, null)`.

Specified by:
  `newInstance` in interface `DeclarationBuilderService`
Parameters:
  `type` - name of the component to be instantiated.
  `name` - name of the new instance (can be null)
Returns:
  a handle usable to publish / retract the declaration.
See Also:
  `InstanceDeclaration`

#### newInstance

    public InstanceBuilder newInstance(java.lang.String type,
                                       java.lang.String name,
                                       java.lang.String version)

Description copied from interface: `DeclarationBuilderService`
Declares a new instance of a given type.

Specified by:
  `newInstance` in interface `DeclarationBuilderService`
Parameters:
  `type` - name of the component to be instantiated.
  `name` - name of the new instance (can be null)
  `version` - version of the expected type (can be null)
Returns:
  a handle usable to publish / retract the declaration.
See Also:
  `InstanceDeclaration`

#### newExtension

    public DeclarationHandle newExtension(java.lang.String name,
                                          FactoryBuilder builder)

Description copied from interface: `DeclarationBuilderService`
Declares a new extension (supports new types like component, composite, handler).

Specified by:
  `newExtension` in interface `DeclarationBuilderService`
Parameters:
  `name` - name of the type to support (no namespace to be provided)
  `builder` - associated factory builder
Returns:
  a handle usable to publish / retract the declaration.
See Also:
  `IPojoFactory`, `ExtensionDeclaration`

#### newType

    public DeclarationHandle newType(org.apache.felix.ipojo.metadata.Element description)

Description copied from interface: `DeclarationBuilderService`
Declares a new type using the given element description.

Specified by:
  `newType` in interface `DeclarationBuilderService`
Parameters:
  `description` - description of the component type
Returns:
  a handle usable to publish / retract the declaration.
See Also:
  `TypeDeclaration`