Class FileNamePlugin
- java.lang.Object
-
- biz.aQute.bnd.reporter.plugins.entries.processor.FileNamePlugin
-
- All Implemented Interfaces:
Plugin,ReportEntryPlugin<Processor>
public class FileNamePlugin extends java.lang.Object implements ReportEntryPlugin<Processor>, Plugin
This plugin extracts the file name of the base of a Processor.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,java.lang.String>_properties-
Fields inherited from interface aQute.bnd.service.reporter.ReportEntryPlugin
ENTRY_NAME_PROPERTY, SOURCE_CLASS_PROPERTY
-
-
Constructor Summary
Constructors Constructor Description FileNamePlugin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectextract(Processor processor, java.util.Locale locale)Extracts a piece of information from the source in arguments.java.util.Map<java.lang.String,java.lang.String>getProperties()voidsetProperties(java.util.Map<java.lang.String,java.lang.String> map)Give the plugin the remaining properties.voidsetReporter(Reporter processor)Set the current reporter.
-
-
-
Method Detail
-
extract
public java.lang.Object extract(Processor processor, java.util.Locale locale) throws java.lang.Exception
Description copied from interface:ReportEntryPluginExtracts a piece of information from the source in arguments.If the source contains localized data, it will be extracted for the specified locale or a less specific if not found.
- Specified by:
extractin interfaceReportEntryPlugin<Processor>- Parameters:
processor- the source to inspect, must not benulllocale- theStringrepresentation of aLocale, must not benull- Returns:
- a DTO representation or
nullif no data is available - Throws:
java.lang.Exception
-
getProperties
public java.util.Map<java.lang.String,java.lang.String> getProperties()
- Specified by:
getPropertiesin interfaceReportEntryPlugin<Processor>- Returns:
- a map of properties, never
null
-
setProperties
public void setProperties(java.util.Map<java.lang.String,java.lang.String> map) throws java.lang.ExceptionDescription copied from interface:PluginGive the plugin the remaining properties. When a plugin is declared, the clause can contain extra properties. All the properties and directives are given to the plugin to use.- Specified by:
setPropertiesin interfacePlugin- Parameters:
map- attributes and directives for this plugin's clause- Throws:
java.lang.Exception
-
setReporter
public void setReporter(Reporter processor)
Description copied from interface:PluginSet the current reporter. This is called at init time. This plugin should report all errors and warnings to this reporter.- Specified by:
setReporterin interfacePlugin
-
-