public abstract class Extension<E> extends Object
Constructor and Description |
---|
Extension() |
Modifier and Type | Method and Description |
---|---|
protected E |
add(Class<? extends TransformationTemplate> templateClass)
Adds a new transformation template class to the set
|
Class<? extends TransformationTemplate> |
automaticResolution(File applicationFolder)
Butterfly might be able to automatically identify, based on the application
content, the most applicable transformation template to transform it.
|
abstract String |
getDescription()
Returns the extension description
|
protected org.apache.maven.model.Model |
getRootPomFile(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 |
List<Class<? extends TransformationTemplate>> |
getTemplateClasses()
Returns a read-only set containing all transformation template classes
|
abstract String |
getVersion()
Returns the extension version
|
String |
toString() |
protected final E add(Class<? extends TransformationTemplate> templateClass)
templateClass
- the transformation template class to be added to the extensionpublic abstract String getDescription()
public abstract String getVersion()
public final List<Class<? extends TransformationTemplate>> getTemplateClasses()
public Class<? extends TransformationTemplate> automaticResolution(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(File folder)
automaticResolution(File)
method based on one or more Maven pom filesfolder
- the folder where the pom.xml file would befolder
, or null, if that file does
not exist, or any error happens when trying to read and parse itCopyright © 2018. All rights reserved.