Class DemoMacro
java.lang.Object
org.basepom.mojo.propertyhelper.macros.DemoMacro
- All Implemented Interfaces:
MacroType
@Component(role=MacroType.class,
hint="demo")
public class DemoMacro
extends Object
implements MacroType
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetValue
(MacroDefinition macroDefinition, ValueProvider valueProvider, FieldContext context) Returns the value for a specific macro invocation.
-
Constructor Details
-
DemoMacro
public DemoMacro()
-
-
Method Details
-
getValue
public Optional<String> getValue(MacroDefinition macroDefinition, ValueProvider valueProvider, FieldContext context) Description copied from interface:MacroType
Returns the value for a specific macro invocation.- Specified by:
getValue
in interfaceMacroType
- Parameters:
macroDefinition
- The macro definitionvalueProvider
- A value provider that either provides a property backed value or the initial (default) valuecontext
- The Field context- Returns:
- An
Optional
wrapping a string value. If the macro returnsOptional.empty()
, the field value will be the empty string
-