Class DescriptorGenerator

java.lang.Object
org.apache.felix.dm.annotation.plugin.bnd.DescriptorGenerator

public class DescriptorGenerator extends Object
This helper parses all classes which contain DM annotations, and generates the corresponding component descriptors.
Author:
Felix Project Team
  • Constructor Details

    • DescriptorGenerator

      public DescriptorGenerator(aQute.bnd.osgi.Analyzer analyzer, Logger logger)
      Creates a new descriptor generator.
      Parameters:
      analyzer - The bnd analyzer used to lookup classes containing DM annotations.
      debug -
  • Method Details

    • execute

      public boolean execute() throws Exception
      Starts the scanning.
      Returns:
      true if some annotations were successfully parsed, false if not. corresponding generated descriptors can then be retrieved by invoking the getDescriptors/getDescriptorPaths methods.
      Throws:
      Exception
    • getDescriptorPaths

      public String getDescriptorPaths()
      Returns the path of the descriptor.
      Returns:
      the path of the generated descriptors.
    • getDescriptors

      public Map<String,aQute.bnd.osgi.Resource> getDescriptors()
      Returns the list of the generated descriptors.
      Returns:
      the list of the generated descriptors.
    • getMetaTypeResource

      public aQute.bnd.osgi.Resource getMetaTypeResource()
      Returns the MetaType resource.
    • getImportService

      public Set<String> getImportService()
      Returns set of all imported services. Imported services are deduced from every
      Returns:
      the list of imported services
    • getExportService

      public Set<String> getExportService()
      Returns set of all exported services. Imported services are deduced from every annotations which provides a service (@Component, etc ...)
      Returns:
      the list of exported services