public abstract class Extension<E>
extends java.lang.Object
Constructor and Description |
---|
Extension() |
Modifier and Type | Method and Description |
---|---|
protected E |
add(java.lang.Class<? extends TransformationTemplate> templateClass)
Adds a new transformation template class to the set
|
java.lang.Class<? extends TransformationTemplate> |
automaticResolution(java.io.File applicationFolder)
Butterfly might be able to automatically identify, based on the application
content, the most applicable transformation template to transform it.
|
abstract java.lang.String |
getDescription()
Returns the extension description
|
protected org.apache.maven.model.Model |
getRootPomFile(java.io.File folder)
This is a convenience method in case the Extension subclass wants to implement its
automaticResolution(File) method based on one or more Maven pom files |
java.util.List<java.lang.Class<? extends TransformationTemplate>> |
getTemplateClasses()
Returns a read-only set containing all transformation template classes
|
abstract java.lang.String |
getVersion()
Returns the extension version
|
java.lang.String |
toString() |
protected final E add(java.lang.Class<? extends TransformationTemplate> templateClass)
templateClass
- the transformation template class to be added to the extensionpublic abstract java.lang.String getDescription()
public abstract java.lang.String getVersion()
public final java.util.List<java.lang.Class<? extends TransformationTemplate>> getTemplateClasses()
public java.lang.Class<? extends TransformationTemplate> automaticResolution(java.io.File applicationFolder) throws TemplateResolutionException
TemplateResolutionException
is thrown explaining the reason why no template could be chosen.applicationFolder
- the folder where the code of the application to be transformed isTemplateResolutionException
- if no template appliesprotected org.apache.maven.model.Model getRootPomFile(java.io.File folder) throws java.io.IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException
automaticResolution(File)
method based on one or more Maven pom filesfolder
- the folder where the pom.xml file would befolder
java.io.IOException
- if pom file does not exist, or any error happens when trying to read itorg.codehaus.plexus.util.xml.pull.XmlPullParserException
- if any error happens when trying to parse the pom filepublic final java.lang.String toString()
toString
in class java.lang.Object