|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.scrplugin.JavaClassDescriptorManager
public abstract class JavaClassDescriptorManager
The JavaClassDescriptorManager
must be implemented to provide
access to the java sources to be scanned for descriptor annotations and
JavaDoc tags, the descriptors of components from the class path and the
location of the generated class files to be able to add the bind and unbind
methods.
Field Summary | |
---|---|
protected Log |
log
The maven log. |
Constructor Summary | |
---|---|
JavaClassDescriptorManager(Log log,
ClassLoader classLoader,
String[] annotationTagProviders,
boolean parseJavadocs,
boolean processAnnotations)
Construct a new manager. |
Method Summary | |
---|---|
AnnotationTagProviderManager |
getAnnotationTagProviderManager()
|
ClassLoader |
getClassLoader()
Return the class laoder. |
protected Map<String,Component> |
getComponentDescriptors()
Returns a map of component descriptors which may be extended by the java sources returned by the getSources() method. |
protected List<File> |
getDependencies()
Returns a list of files denoting dependencies of the module for which descriptors are to be generated. |
JavaClassDescription |
getJavaClassDescription(String className)
Get a java class description for the class. |
Log |
getLog()
Return the log. |
abstract String |
getOutputDirectory()
Returns the absolute filesystem path to the directory where the classes compiled from the java source files (see getSources() ) have been
placed. |
JavaClassDescription[] |
getSourceDescriptions()
Return all source descriptions of this project. |
protected Iterator<File> |
getSourceFiles()
Returns an iterator of paths to directories providing Java source files to be parsed. |
protected com.thoughtworks.qdox.model.JavaSource[] |
getSources()
Returns the QDox JavaSource instances representing the source files for which the Declarative Services and Metatype descriptors have to be generated. |
boolean |
isParseJavadocs()
Returns true if this class descriptor manager is parsing
JavaDoc tags. |
boolean |
isProcessAnnotations()
Returns true if this class descriptor manager is parsing
Java 5 annotations. |
protected Components |
parseServiceComponentDescriptor(InputStream file)
Parses the descriptors read from the given input stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final Log log
Constructor Detail |
---|
public JavaClassDescriptorManager(Log log, ClassLoader classLoader, String[] annotationTagProviders, boolean parseJavadocs, boolean processAnnotations) throws SCRDescriptorFailureException
SCRDescriptorFailureException
Method Detail |
---|
protected com.thoughtworks.qdox.model.JavaSource[] getSources() throws SCRDescriptorException
SCRDescriptorException
- May be thrown if an error occurrs
gathering the java sources.protected Iterator<File> getSourceFiles()
This method is called by the default getSources()
implementation
to return the root directories for the Java files to be parsed. This
default implementation returns an empty iterator. Implementations of this
class not overwriting the getSources()
method should overwrite
this method by providing the concrete source locations.
protected Map<String,Component> getComponentDescriptors() throws SCRDescriptorException
getSources()
method.
This method calls the getDependencies()
method and checks for
any Service-Component descriptors in the returned files.
This method may be overwritten by extensions of this class.
SCRDescriptorException
- May be thrown if an error occurrs
gethering the component descriptors.protected List<File> getDependencies()
This method is called by the getComponentDescriptors()
method in
this class to get the list of bundles from where base component
descriptors are to be extracted.
Extensions of this class not overwriting the
getComponentDescriptors()
method should overwrite this method if
they wish to provide such base component descriptors.
public abstract String getOutputDirectory()
getSources()
) have been
placed.
This method is called to find the class files to which bind and unbind methods are to be added.
public Log getLog()
public ClassLoader getClassLoader()
public AnnotationTagProviderManager getAnnotationTagProviderManager()
public boolean isParseJavadocs()
true
if this class descriptor manager is parsing
JavaDoc tags.
public boolean isProcessAnnotations()
true
if this class descriptor manager is parsing
Java 5 annotations.
protected Components parseServiceComponentDescriptor(InputStream file) throws SCRDescriptorException
getComponentDescriptors()
method to parse the
descriptors gathered in an implementation dependent way.
SCRDescriptorException
- If an error occurrs reading the
descriptors from the stream.public JavaClassDescription[] getSourceDescriptions() throws SCRDescriptorException
SCRDescriptorException
public JavaClassDescription getJavaClassDescription(String className) throws SCRDescriptorException
className
-
SCRDescriptorException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |