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 Details

  • 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 interface MacroType
      Parameters:
      macroDefinition - The macro definition
      valueProvider - A value provider that either provides a property backed value or the initial (default) value
      context - The Field context
      Returns:
      An Optional wrapping a string value. If the macro returns Optional.empty(), the field value will be the empty string