Search in sources :

Example 1 with Inputs

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

the class ConsumerFunction method processInputAnnotation.

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

Aggregations

AnnotationFormatError (java.lang.annotation.AnnotationFormatError)1 Inputs (uk.gov.gchq.gaffer.function.annotation.Inputs)1