JSF Test Framework: Maven Mock-Generator Plugin 1.1.2

org.jboss.mockgenerator
Class AbstractMockMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.jboss.mockgenerator.AbstractMockMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
GenerateMockMojo, GenerateTestMockMojo

public abstract class AbstractMockMojo
extends org.apache.maven.plugin.AbstractMojo


Field Summary
protected  int errorsCount
           
protected  MockConfig mockConfig
          

Parsed generator configuration.

protected  File outputDirectory
          Location of the compiled java classes.
protected  org.apache.maven.project.MavenProject project
          Top maven project.
protected  ClassLoader projectClassLoader
          

Project classloader that able to load classes from project dependencies.

 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractMockMojo()
           
 
Method Summary
protected abstract  void addGeneratedSourcesToProject()
           
protected  ClassLoader createProjectClassLoader()
           
 void execute()
           
protected  void generateClass(Mock mock)
          

Generate single Mock class

protected abstract  Collection<String> getClasspathElements()
          

protected abstract  File getConfig()
          

protected abstract  File getOutputJavaDirectory()
          

protected  List<Method> getPublicMethods(Class<?> baseClass)
           
protected  MockConfig readConfig()
           
protected  boolean skipMethod(Mock mock, String name)
           
 
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
 

Field Detail

project

protected org.apache.maven.project.MavenProject project
Top maven project.


outputDirectory

protected File outputDirectory
Location of the compiled java classes.


projectClassLoader

protected ClassLoader projectClassLoader

Project classloader that able to load classes from project dependencies.


mockConfig

protected MockConfig mockConfig

Parsed generator configuration.


errorsCount

protected int errorsCount
Constructor Detail

AbstractMockMojo

public AbstractMockMojo()
Method Detail

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

addGeneratedSourcesToProject

protected abstract void addGeneratedSourcesToProject()

getOutputJavaDirectory

protected abstract File getOutputJavaDirectory()

Returns:
the outputJavaDirectory

getConfig

protected abstract File getConfig()

Returns:
the config

getClasspathElements

protected abstract Collection<String> getClasspathElements()

Returns:
the classpathElements

generateClass

protected void generateClass(Mock mock)
                      throws org.apache.maven.plugin.MojoExecutionException

Generate single Mock class

Parameters:
mockConfig -
mock -
Throws:
org.apache.maven.plugin.MojoExecutionException

getPublicMethods

protected List<Method> getPublicMethods(Class<?> baseClass)

skipMethod

protected boolean skipMethod(Mock mock,
                             String name)

createProjectClassLoader

protected ClassLoader createProjectClassLoader()

readConfig

protected MockConfig readConfig()
                         throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

JSF Test Framework: Maven Mock-Generator Plugin 1.1.2

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.