chronos/src/main/java/com/redmadrobot/chronos/ChronosService.java
@NonNull
    @Contract(pure = true)
    private <Output> ChronosOperationResult<Output> createEmptyResult(
            @NonNull final ChronosOperation<Output> operation, final boolean broadcastResult) {
        final ChronosOperationResult<Output> operationResult;
        final Class<? extends ChronosOperationResult<Output>> resultClass = operation
                .getResultClass();
        try {
            operationResult = resultClass.newInstance();
        } catch (InstantiationException e) {
            throw new RuntimeException("Can't create a new instance of " + resultClass.getName());
        } catch (IllegalAccessException e) {
            throw new RuntimeException(resultClass.getName() + " constructor is not accessible");
        }
        operationResult.setId(mLastOperationId.incrementAndGet());
        operationResult.setOperation(operation);
        operationResult.setBroadcast(broadcastResult);

        return operationResult;
    }
@NonNull
    @Contract(pure = true)
    private <Output> ChronosOperationResult<Output> createEmptyResult(
            @NonNull final ChronosOperation<Output> operation, final boolean broadcastResult) {
        final ChronosOperationResult<Output> operationResult;
        final Class<? extends ChronosOperationResult<Output>> resultClass = operation
                .getResultClass();
        try {
            operationResult = resultClass.newInstance();
        } catch (InstantiationException e) {
            throw new RuntimeException("Can't create a new instance of " + resultClass.getName());
        } catch (IllegalAccessException e) {
            throw new RuntimeException(resultClass.getName() + " constructor is not accessible");
        }
        operationResult.setId(mLastOperationId.incrementAndGet());
        operationResult.setOperation(operation);
        operationResult.setBroadcast(broadcastResult);

        return operationResult;
    }
@ NonNull @ Contract ( pure = true ) private < Output > ChronosOperationResult < Output > createEmptyResult ( @ NonNull final ChronosOperation < Output > operation , final boolean broadcastResult ) { final ChronosOperationResult < Output > operationResult ; final Class < ? extends ChronosOperationResult < Output > > resultClass = operation . getResultClass ( ) ; try { operationResult = resultClass . newInstance ( ) ; } catch ( InstantiationException e ) { throw new RuntimeException ( "Can't create a new instance of " + resultClass . getName ( ) ) ; } catch ( IllegalAccessException e ) { throw new RuntimeException ( resultClass . getName ( ) + " constructor is not accessible" ) ; } operationResult . setId ( mLastOperationId . incrementAndGet ( ) ) ; operationResult . setOperation ( operation ) ; operationResult . setBroadcast ( broadcastResult ) ; return operationResult ; }
Creates a template object for storing operations' run result.

@param operation       an operation to create a result for
@param broadcastResult {@code true} if the result should be broadcasted, {@code false}
otherwise
@param <Output>        class of the result, returned by the Operations' {@code run} method
@return an empty OperationResult without business-logic content
Creates a template object for storing operations run result .