Search in sources :

Example 1 with Outputs

use of uk.gov.gchq.gaffer.function.annotation.Outputs in project Gaffer by gchq.

the class ConsumerProducerFunction method processOutputAnnotation.

/**
     * Retrieves the input record structure from the {@link uk.gov.gchq.gaffer.function.annotation.Inputs} annotation.
     */
private void processOutputAnnotation() {
    final Outputs annotation = getClass().getAnnotation(Outputs.class);
    if (null == annotation) {
        throw new AnnotationFormatError("All consumer producer function classes must have outputs defined using the 'Outputs' annotation on the class." + " Class: " + getClass());
    }
    outputs = annotation.value();
}
Also used : Outputs(uk.gov.gchq.gaffer.function.annotation.Outputs) AnnotationFormatError(java.lang.annotation.AnnotationFormatError)

Example 2 with Outputs

use of uk.gov.gchq.gaffer.function.annotation.Outputs in project Gaffer by gchq.

the class ProducerFunction method processOutputAnnotation.

/**
     * Retrieves the input record structure from the {@link uk.gov.gchq.gaffer.function.annotation.Inputs} annotation.
     */
private void processOutputAnnotation() {
    final Outputs annotation = getClass().getAnnotation(Outputs.class);
    if (null == annotation || null == annotation.value()) {
        throw new AnnotationFormatError("All producer function classes must have outputs defined using the 'Outputs' annotation on the class.");
    }
    outputs = annotation.value();
}
Also used : Outputs(uk.gov.gchq.gaffer.function.annotation.Outputs) AnnotationFormatError(java.lang.annotation.AnnotationFormatError)

Aggregations

AnnotationFormatError (java.lang.annotation.AnnotationFormatError)2 Outputs (uk.gov.gchq.gaffer.function.annotation.Outputs)2