Package nz.org.riskscape.pipeline
Interface StepNamingPolicy
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Slightly-over-engineered way of determining an implicit name, if possible, for a step definition.
Putting this logic in its own 'unit' makes it a little easier for us to reuse this logic across modules. I don't expect this API needs to last - once we've changed our pipeline APIs to go from AST->RealizedPipeline in one call, we can probably drop this interface
-
Method Summary
Modifier and TypeMethodDescriptionstatic Function<StepDeclaration,
String> broaden
(Function<StepDefinition, String> stepNameFunction)
-
Method Details
-
broaden
- Returns:
- a function that broadens the argument type of the given function so that it will return the name of any step declaration, not just a definition.
-
getStepNameFunction
- Returns:
- a function that gives the name for a step definition, returning a unique generated name if none was
assigned. Should return explicitly assigned names, too, to make name lookup logic simpler. The function will be
particular to the given
ast
- do not reuse it for different ones!
-