Skip to content

Package io.github.qishr.cascara.common.util

Interface IParseResultHandler2

java.lang.Object
        io.github.qishr.cascara.common.util.CommandLine.IParseResultHandler2

Enclosing Class:
    io.github.qishr.cascara.common.util.CommandLine

All Known Implementing Classes:
    AbstractParseResultHandler


public static interface IParseResultHandler2

Represents a function that can process the ParseResult object resulting from successfully parsing the command line arguments.This is a functional interface whose functional method is handleParseResult.

Implementations of this function can be passed to the #parseWithHandlers(IParseResultHandler2, IExceptionHandler2, String...) methods to take some next step after the command line was successfully parsed.

This interface replaces the IParseResultHandler interface; it takes the parse result as a ParseResult object instead of a List of CommandLine objects, and it has the freedom to select the Help.Ansi style to use and what PrintStreams to print to.

Method Summary

Modifier and Type Method Description
public abstract R handleParseResult(ParseResult parseResult) Processes the ParseResult object resulting from successfully parsing the command line arguments and returns a return value.

Method Details

handleParseResult

public abstract R handleParseResult(ParseResult parseResult)

Processes the ParseResult object resulting from successfully parsing the command line arguments and returns a return value.

Parameters:

parseResult - the ParseResult that resulted from successfully parsing the command line arguments

Throws:

ExecutionException