public class CodeSnippetPlugin extends Object implements ReportEntryPlugin<Project>, Plugin
PATH_PROPERTY to specify the folder from which
snippets are looked up. By default, snippets are read from
{testClasspath}/examples directory.| Modifier and Type | Field and Description |
|---|---|
static String |
PATH_PROPERTY |
ENTRY_NAME_PROPERTY, SOURCE_CLASS_PROPERTY| Constructor and Description |
|---|
CodeSnippetPlugin() |
| Modifier and Type | Method and Description |
|---|---|
List<CodeSnippetDTO> |
extract(Project project,
Locale locale)
Extracts a piece of information from the source in arguments.
|
Map<String,String> |
getProperties() |
void |
setProperties(Map<String,String> map)
Give the plugin the remaining properties.
|
void |
setReporter(Reporter processor)
Set the current reporter.
|
public static final String PATH_PROPERTY
public void setReporter(Reporter processor)
PluginsetReporter in interface Pluginpublic void setProperties(Map<String,String> map) throws Exception
PluginsetProperties in interface Pluginmap - attributes and directives for this plugin's clauseExceptionpublic Map<String,String> getProperties()
getProperties in interface ReportEntryPlugin<Project>nullpublic List<CodeSnippetDTO> extract(Project project, Locale locale) throws Exception
ReportEntryPluginIf the source contains localized data, it will be extracted for the specified locale or a less specific if not found.
extract in interface ReportEntryPlugin<Project>project - the source to inspect, must not be nulllocale - the String representation of a Locale, must
not be nullnull if no data is availableExceptionCopyright © 2021. All rights reserved.