public class BooleanParameterDeclarationEnricher extends Object implements WalkingDeclarationEnricher
DeclarationEnricher implementation that walks through all the BooleanType parameters and sets them as optional.
It also enriches those parameters with a default value of "false" if they don't have one.
Parameters acting as a config override or with ExpressionSupport.REQUIRED expression support
are skipped.
WalkingDeclarationEnricher.DeclarationEnricherWalkDelegate| Modifier and Type | Field and Description |
|---|---|
static String |
DONT_SET_DEFAULT_VALUE_TO_BOOLEAN_PARAMS
Avoids setting a default value of
false to parameters of boolean type. |
| Constructor and Description |
|---|
BooleanParameterDeclarationEnricher() |
| Modifier and Type | Method and Description |
|---|---|
DeclarationEnricherPhase |
getExecutionPhase()
Specifies a
phase for the DeclarationEnricher to be executed. |
Optional<WalkingDeclarationEnricher.DeclarationEnricherWalkDelegate> |
getWalkDelegate(ExtensionLoadingContext extensionLoadingContext)
Optionally returns a
WalkingDeclarationEnricher.DeclarationEnricherWalkDelegate that contains the enrichment logic. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitenrichpublic static final String DONT_SET_DEFAULT_VALUE_TO_BOOLEAN_PARAMS
false to parameters of boolean type.
This is used to avoid W-12003688.
public DeclarationEnricherPhase getExecutionPhase()
DeclarationEnricherphase for the DeclarationEnricher to be executed.getExecutionPhase in interface DeclarationEnricherphase in which the DeclarationEnricher is going to be executedpublic Optional<WalkingDeclarationEnricher.DeclarationEnricherWalkDelegate> getWalkDelegate(ExtensionLoadingContext extensionLoadingContext)
WalkingDeclarationEnricherWalkingDeclarationEnricher.DeclarationEnricherWalkDelegate that contains the enrichment logic.
If Optional.empty() is returned, it means that this enricher does not apply to the given declaration and it should be
skipped
getWalkDelegate in interface WalkingDeclarationEnricherextensionLoadingContext - a ExtensionLoadingContextCopyright © 2022 MuleSoft, Inc.. All rights reserved.