Class EnhancedFlowAction<P extends EnhancedFlowAction.EnhancedFlowParameters<?>>
java.lang.Object
net.minecraftforge.gradleutils.shared.EnhancedFlowAction<P>
- Type Parameters:
P- The type of enhanced flow parameters to use
- All Implemented Interfaces:
FlowAction<P>
public abstract class EnhancedFlowAction<P extends EnhancedFlowAction.EnhancedFlowParameters<?>>
extends Object
implements FlowAction<P>
The enhanced flow action adds convenience methods to the standard flow action provided by Gradle.
- Implementation Note:
- Consumers must set the
EnhancedFlowAction.EnhancedFlowParameters.getFailure()property in order for it to work properly. The build failure is provided byFlowProviders.getBuildWorkResult()mapped byBuildWorkResult.getFailure().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe parameters, including theEnhancedFlowAction.EnhancedFlowParameters.getFailure()property andEnhancedProblemsthroughEnhancedFlowAction.EnhancedFlowParameters.problems(). -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedThe base constructor for the flow action. -
Method Summary
-
Constructor Details
-
EnhancedFlowAction
protected EnhancedFlowAction()The base constructor for the flow action.- Implementation Requirements:
- Must override with
publicand@Inject
-
-
Method Details
-
contains
Checks if a given throwable's message contains the given string (ignoring case). This check includes checking all the throwable's causes.- Parameters:
e- The throwable to checks- The string to match for (ignoring case)- Returns:
- If the throwable's message contains the string
-
execute
Executes this flow action.- Specified by:
executein interfaceFlowAction<P extends EnhancedFlowAction.EnhancedFlowParameters<?>>- Parameters:
parameters- The parameters for this action- Implementation Note:
- This method is final to avoid Gradle eating any exceptions thrown by it. Consumers should instead
implement
run(EnhancedFlowParameters).
-
run
Runs this flow action. Used byexecute(EnhancedFlowParameters).- Parameters:
parameters- The parameters for this action- Throws:
Exception- If any error occurs
-