org.apache.felix.scrplugin
Class SCRDescriptorMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.felix.scrplugin.SCRDescriptorMojo
- All Implemented Interfaces:
- org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
public class SCRDescriptorMojo
- extends org.apache.maven.plugin.AbstractMojo
The SCRDescriptorMojo
generates a service descriptor file based on annotations found in the sources.
Fields inherited from interface org.apache.maven.plugin.Mojo |
ROLE |
Method Summary |
protected void |
addInterfaces(Service service,
JavaTag serviceTag,
JavaClassDescription description)
Recursively add interfaces to the service. |
protected Component |
createComponent(JavaClassDescription description,
JavaTag componentTag,
MetaData metaData)
Create a component for the java class description. |
protected OCD |
doComponent(JavaTag tag,
Component component,
MetaData metaData)
Fill the component object with the information from the tag. |
protected void |
doReference(JavaTag reference,
java.lang.String name,
Component component)
|
protected void |
doServices(JavaTag[] services,
Component component,
JavaClassDescription description)
Process the service annotations |
void |
execute()
|
static boolean |
getBoolean(JavaTag tag,
java.lang.String name,
boolean defaultValue)
|
protected java.lang.String |
getReferenceName(JavaTag reference,
java.lang.String defaultName)
|
protected void |
testReference(java.util.Map references,
JavaTag reference,
java.lang.String defaultName,
boolean isInspectedClass)
|
Methods inherited from class org.apache.maven.plugin.AbstractMojo |
getLog, getPluginContext, setLog, setPluginContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SCRDescriptorMojo
public SCRDescriptorMojo()
execute
public void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
- See Also:
Mojo.execute()
createComponent
protected Component createComponent(JavaClassDescription description,
JavaTag componentTag,
MetaData metaData)
throws org.apache.maven.plugin.MojoExecutionException
- Create a component for the java class description.
- Parameters:
description
-
- Returns:
- The generated component descriptor or null if any error occurs.
- Throws:
org.apache.maven.plugin.MojoExecutionException
doComponent
protected OCD doComponent(JavaTag tag,
Component component,
MetaData metaData)
- Fill the component object with the information from the tag.
- Parameters:
tag
- component
-
doServices
protected void doServices(JavaTag[] services,
Component component,
JavaClassDescription description)
throws org.apache.maven.plugin.MojoExecutionException
- Process the service annotations
- Parameters:
services
- component
- description
-
- Throws:
org.apache.maven.plugin.MojoExecutionException
addInterfaces
protected void addInterfaces(Service service,
JavaTag serviceTag,
JavaClassDescription description)
throws org.apache.maven.plugin.MojoExecutionException
- Recursively add interfaces to the service.
- Throws:
org.apache.maven.plugin.MojoExecutionException
testReference
protected void testReference(java.util.Map references,
JavaTag reference,
java.lang.String defaultName,
boolean isInspectedClass)
throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
getReferenceName
protected java.lang.String getReferenceName(JavaTag reference,
java.lang.String defaultName)
doReference
protected void doReference(JavaTag reference,
java.lang.String name,
Component component)
throws org.apache.maven.plugin.MojoExecutionException
- Parameters:
reference
- defaultName
- component
-
- Throws:
org.apache.maven.plugin.MojoExecutionException
getBoolean
public static boolean getBoolean(JavaTag tag,
java.lang.String name,
boolean defaultValue)