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
Constructors -
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:MacroTypeReturns the value for a specific macro invocation.- Specified by:
getValuein 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
Optionalwrapping a string value. If the macro returnsOptional.empty(), the field value will be the empty string
-