org.apache.felix.scrplugin

## Class SCRDescriptorGenerator

- java.lang.Object
- - org.apache.felix.scrplugin.SCRDescriptorGenerator

    public class SCRDescriptorGenerator
    extends Object

The `SCRDescriptorGenerator` class does the hard work of generating the SCR descriptors. This class is being instantiated and configured by clients and the `execute()` method called to generate the descriptor files.

When using this class carefully consider calling all setter methods to properly configure the generator. All setter method document, which default value is assumed for the respective property if the setter is not called.

Instances of this class are not thread save and should not be reused.

### Constructor Summary

Constructors
Constructor and Description
`SCRDescriptorGenerator(Log logger)` Create an instance of this generator using the given `Log` instance of logging.

### Method Summary

All Methods Instance Methods Concrete Methods
`Result` `execute()` Actually generates the Declarative Services and Metatype descriptors scanning the java sources provided by the `setProject(Project)`
`void` `setOptions(Options p)` Set the options.
`void` `setProject(Project p)` Set the project.

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

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

### Constructor Detail

#### SCRDescriptorGenerator

    public SCRDescriptorGenerator(Log logger)

Create an instance of this generator using the given `Log` instance of logging.

### Method Detail

#### setProject

    public void setProject(Project p)

Set the project. This is required.

#### setOptions

    public void setOptions(Options p)

Set the options.

#### execute

    public Result execute()
                   throws SCRDescriptorException,
                          SCRDescriptorFailureException

Actually generates the Declarative Services and Metatype descriptors scanning the java sources provided by the `setProject(Project)`

Returns:
  A list of generated file names, relative to the output directory
Throws:
  `SCRDescriptorException`
  `SCRDescriptorFailureException`