org.jomc.mojo
Class AbstractClassesCommitMojo

Package class diagram package AbstractClassesCommitMojo
java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.jomc.mojo.AbstractJomcMojo
          extended by org.jomc.mojo.AbstractClassesCommitMojo
All Implemented Interfaces:
ContextEnabled, Mojo
Direct Known Subclasses:
MainClassesCommitMojo, TestClassesCommitMojo

public abstract class AbstractClassesCommitMojo
extends AbstractJomcMojo

Base class for committing model objects to class files.

Version:
$JOMC: AbstractClassesCommitMojo.java 3880 2011-10-24 01:00:25Z schulte2005 $
Author:
Christian Schulte

Field Summary
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractClassesCommitMojo()
          Creates a new AbstractClassesCommitMojo instance.
 
Method Summary
protected  void assertValidParameters()
          Validates the parameters of the goal.
protected  void executeTool()
          Executes this tool.
protected abstract  ClassLoader getClassesClassLoader()
          Gets the class loader to use for committing class file model objects.
protected abstract  File getClassesDirectory()
          Gets the directory holding the class files to commit model objects to.
protected abstract  String getClassesModuleName()
          Gets the name of the module to commit class file model objects of.
protected  List<Transformer> getTransformers()
          Gets transformers to use for transforming model objects.
protected  List<Transformer> getTransformers(ClassLoader classLoader)
          Deprecated. As of JOMC 1.2, the dependencies of the project are no longer searched for XSLT documents. Please use method getTransformers(). This method will be removed in version 2.0.
 
Methods inherited from class org.jomc.mojo.AbstractJomcMojo
assertValidResources, createClassFileProcessor, createJomcTool, createModelContext, createObject, createResourceFileProcessor, createSourceFileProcessor, execute, getAbsoluteFile, getDirectory, getExecutionStrategy, getGoal, getMainClassLoader, getMainClasspathElements, getMavenProject, getMavenSession, getModel, getModel, getModuleName, getOutputDirectory, getProperties, getReportOutputDirectory, getResource, getSessionDirectory, getSourceDirectory, getTestClassLoader, getTestClasspathElements, getTestModuleName, getTestOutputDirectory, getTestSourceDirectory, getTransformer, isClassProcessingEnabled, isExecutionPermitted, isLoggable, isModelObjectClasspathResolutionEnabled, isModelProcessingEnabled, isResourceProcessingEnabled, isSourceProcessingEnabled, isVerbose, log, log, logMissingModule, logProcessingModel, logProcessingModule, logSeparator, logSeparator, logToolSuccess, setClassProcessingEnabled, setModelObjectClasspathResolutionEnabled, setModelProcessingEnabled, setResourceProcessingEnabled, setSourceProcessingEnabled, setupJomcTool, setupModelContext, setVerbose
 
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
 

Constructor Detail

AbstractClassesCommitMojo

public AbstractClassesCommitMojo()
Creates a new AbstractClassesCommitMojo instance.

Method Detail

getTransformers

@Deprecated
protected List<Transformer> getTransformers(ClassLoader classLoader)
                                     throws MojoExecutionException
Deprecated. As of JOMC 1.2, the dependencies of the project are no longer searched for XSLT documents. Please use method getTransformers(). This method will be removed in version 2.0.

Gets transformers to use for transforming model objects.

Parameters:
classLoader - The class loader to use for loading a transformer class path resource.
Returns:
A list of transformers to use for transforming model objects.
Throws:
NullPointerException - if classLoader is null.
MojoExecutionException - if getting the transformers fails.

getTransformers

protected List<Transformer> getTransformers()
                                     throws MojoExecutionException
Gets transformers to use for transforming model objects.

Returns:
A list of transformers to use for transforming model objects.
Throws:
MojoExecutionException - if getting the transformers fails.
Since:
1.2

assertValidParameters

protected void assertValidParameters()
                              throws MojoFailureException
Description copied from class: AbstractJomcMojo
Validates the parameters of the goal.

Overrides:
assertValidParameters in class AbstractJomcMojo
Throws:
MojoFailureException - if illegal parameter values are detected.
See Also:
AbstractJomcMojo.assertValidResources(java.util.Collection)

executeTool

protected final void executeTool()
                          throws Exception
Description copied from class: AbstractJomcMojo
Executes this tool.

Specified by:
executeTool in class AbstractJomcMojo
Throws:
Exception - if execution of this tool fails.

getClassesModuleName

protected abstract String getClassesModuleName()
                                        throws MojoExecutionException
Gets the name of the module to commit class file model objects of.

Returns:
The name of the module to commit class file model objects of.
Throws:
MojoExecutionException - if getting the name fails.

getClassesClassLoader

protected abstract ClassLoader getClassesClassLoader()
                                              throws MojoExecutionException
Gets the class loader to use for committing class file model objects.

Returns:
The class loader to use for committing class file model objects.
Throws:
MojoExecutionException - if getting the class loader fails.

getClassesDirectory

protected abstract File getClassesDirectory()
                                     throws MojoExecutionException
Gets the directory holding the class files to commit model objects to.

Returns:
The directory holding the class files to commit model objects to.
Throws:
MojoExecutionException - if getting the directory fails.


Copyright © 2005-2012 The JOMC Project. All Rights Reserved.Get JOMC at SourceForge.net. Fast, secure and Free Open Source software downloads
Please note that this documentation is maintained by non-native english speaking authors. As such, you may encounter phrases or wordings which seem imprecise or may even have a totally different meaning to native english speaking readers than what the individual author was trying to express. If you are a native english speaking reader and find any such phrases or wordings we kindly ask you to send an email to the corresponding author and help us improve this documentation in order to avoid misunderstandings. You will find the authors' email addresses at the top of each class. Please accept our apologies for any inconvenience caused.