org.apache.felix.dm.annotation.plugin.bnd
Class DescriptorGenerator

java.lang.Object
  extended by aQute.lib.osgi.Processor
      extended by org.apache.felix.dm.annotation.plugin.bnd.DescriptorGenerator
All Implemented Interfaces:
aQute.lib.osgi.Constants, aQute.libg.reporter.Reporter, Closeable

public class DescriptorGenerator
extends aQute.lib.osgi.Processor

This helper parses all classes which contain DM annotations, and generates the corresponding component descriptors.


Field Summary
 
Fields inherited from class aQute.lib.osgi.Processor
DEFAULT_PLUGINS, LIST_SPLITTER
 
Fields inherited from interface aQute.lib.osgi.Constants
BLUEPRINT_TIMEOUT_ATTRIBUTE, BLUEPRINT_WAIT_FOR_DEPENDENCIES_ATTRIBUTE, BND_ADDXMLTOTEST, BND_LASTMODIFIED, BSN_FROM_WORKSPACE, BUILDFILES, BUILDPATH, BUMPPOLICY, BUNDLE_ACTIVATIONPOLICY, BUNDLE_ACTIVATOR, BUNDLE_BLUEPRINT, BUNDLE_CATEGORY, BUNDLE_CLASSPATH, BUNDLE_CONTACTADDRESS, BUNDLE_COPYRIGHT, BUNDLE_DESCRIPTION, BUNDLE_DOCURL, BUNDLE_ICON, BUNDLE_LICENSE, BUNDLE_LOCALIZATION, BUNDLE_MANIFESTVERSION, BUNDLE_NAME, BUNDLE_NATIVECODE, BUNDLE_REQUIREDEXECUTIONENVIRONMENT, BUNDLE_SPECIFIC_HEADERS, BUNDLE_SYMBOLIC_NAME_ATTRIBUTE, BUNDLE_SYMBOLICNAME, BUNDLE_UPDATELOCATION, BUNDLE_VENDOR, BUNDLE_VERSION, BUNDLE_VERSION_ATTRIBUTE, CLASSPATH, COMMAND_DIRECTIVE, CONDITIONAL_PACKAGE, CONDUIT, CONSUMER_POLICY, CREATED_BY, CURRENT_PACKAGE, CURRENT_USES, CURRENT_VERSION, DEBUG, DEFAULT_BAR_EXTENSION, DEFAULT_BND_EXTENSION, DEFAULT_JAR_EXTENSION, DEFAULT_LAUNCHER_BSN, DEFAULT_TESTER_BSN, DEPENDSON, DEPLOY, DEPLOYREPO, DESCRIPTION_ATTRIBUTE, directives, DONOTCOPY, DUPLICATE_MARKER, DYNAMICIMPORT_PACKAGE, EMBEDDED_REPO, EMPTY_HEADER, EXCLUDE_DIRECTIVE, EXPORT_CONTENTS, EXPORT_PACKAGE, EXPORT_SERVICE, EXTENSION_DIRECTIVE, FAIL_OK, FRAGMENT_ATTACHMENT_DIRECTIVE, FRAGMENT_HOST, headers, IGNORE_PACKAGE, IMPORT_DIRECTIVE, IMPORT_PACKAGE, IMPORT_PRIVATE, IMPORT_REFERENCE, IMPORT_SERVICE, importDirectives, INCLUDE, INCLUDE_DIRECTIVE, INCLUDE_RESOURCE, INCLUDERESOURCE, KEYSTORE_LOCATION_DIRECTIVE, KEYSTORE_PASSWORD_DIRECTIVE, KEYSTORE_PROVIDER_DIRECTIVE, LANGUAGE_ATTRIBUTE, LAUNCHER_PLUGIN, LIB, LIB_DIRECTIVE, LINK_ATTRIBUTE, MAKE, MANDATORY_DIRECTIVE, MANIFEST, METAPACKAGES, NAME_ATTRIBUTE, NO_IMPORT_DIRECTIVE, NOANNOTATIONS, NOBUNDLES, NOEXTRAHEADERS, NOMANIFEST, NONE, NOPE, NOUSES, options, OSNAME_ATTRIBUTE, OSVERSION_ATTRIBUTE, PATH_DIRECTIVE, PEDANTIC, PLUGIN, POM, PRESENCE_DIRECTIVE, PRIVATE_PACKAGE, PROCESSOR_ATTRIBUTE, PROVIDE_DIRECTIVE, PROVIDER_POLICY, RELEASEREPO, REMOVE_ATTRIBUTE_DIRECTIVE, REMOVEHEADERS, REPORTNEWER, REQUIRE_BUNDLE, RESOLUTION_DIRECTIVE, RESOURCEONLY, RUNBUNDLES, RUNFRAMEWORK, RUNFRAMEWORK_NONE, RUNFRAMEWORK_SERVICES, RUNPATH, RUNPATH_LAUNCHER_DIRECTIVE, RUNPATH_MAIN_DIRECTIVE, RUNPROPERTIES, RUNSYSTEMPACKAGES, RUNTRACE, RUNVM, SAVEMANIFEST, SELECTION_FILTER_ATTRIBUTE, SERVICE_COMPONENT, SIGN, SIGN_PASSWORD_DIRECTIVE, SIGNATURE_TEST, SINGLETON_DIRECTIVE, SIZE_ATTRIBUTE, SOURCEPATH, SOURCES, SPECIFICATION_VERSION, SPLIT_PACKAGE_DIRECTIVE, STRATEGY_EXACT, STRATEGY_HIGHEST, STRATEGY_LOWEST, SUB, TESTCASES, TESTER_PLUGIN, TESTPACKAGES, TESTPATH, TESTREPORT, TOOL, UNDERTEST, USES_DIRECTIVE, USES_USES, VALID_PROPERTY_TYPES, VERBOSE, VERSION_ATTRIBUTE, VERSIONPOLICY, VERSIONPOLICY_IMPL, VERSIONPOLICY_USES, VISIBILITY_DIRECTIVE, WAB, WABLIB
 
Constructor Summary
DescriptorGenerator(aQute.lib.osgi.Analyzer analyzer)
          Creates a new descriptor generator.
 
Method Summary
 boolean execute()
          Starts the scanning.
 String getDescriptorPaths()
          Returns the path of the descriptor.
 Map<String,aQute.lib.osgi.Resource> getDescriptors()
          Returns the list of the generated descriptors.
 aQute.lib.osgi.Resource getMetaTypeResource()
          Returns the MetaType resource.
 
Methods inherited from class aQute.lib.osgi.Processor
_basedir, addBasicPlugin, addClose, addIncluded, addProperties, append, appendPath, begin, clear, close, delete, doAttrbutes, error, error, exists, getBase, getClass, getErrors, getFile, getFile, getFlattenedProperties, getInfo, getInfo, getMacroDomains, getManifestAsProperties, getParent, getPlugins, getPlugins, getProperties, getPropertiesFile, getProperty, getProperty, getReplacer, getTop, getWarnings, isDuplicate, isExceptions, isFailOk, isMissingPlugin, isOk, isPedantic, isPerfect, isTrace, isTrue, join, join, join, join, join, lastModified, loadProperties, merge, merge, mergeProperties, mergeProperties, newHashMap, newList, newList, newMap, newMap, newSet, newSet, normalize, normalize, parseHeader, parseHeader, printClause, printClauses, printClauses, progress, propertiesChanged, read, refresh, removeBasicPlugin, removeDuplicateMarker, replaceAll, setBase, setExceptions, setFileMustExist, setForceLocal, setParent, setPedantic, setProperties, setProperties, setProperties, setProperty, setTrace, split, split, split, trace, unsetProperty, updateModified, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DescriptorGenerator

public DescriptorGenerator(aQute.lib.osgi.Analyzer analyzer)
Creates a new descriptor generator.

Parameters:
analyzer - The bnd analyzer used to lookup classes containing DM annotations.
Method Detail

execute

public boolean execute()
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.

getDescriptorPaths

public String getDescriptorPaths()
Returns the path of the descriptor.

Returns:
the path of the generated descriptors.

getDescriptors

public Map<String,aQute.lib.osgi.Resource> getDescriptors()
Returns the list of the generated descriptors.

Returns:
the list of the generated descriptors.

getMetaTypeResource

public aQute.lib.osgi.Resource getMetaTypeResource()
Returns the MetaType resource.



Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.