Example usage for java.lang.annotation AnnotationFormatError AnnotationFormatError

List of usage examples for java.lang.annotation AnnotationFormatError AnnotationFormatError

Introduction

In this page you can find the example usage for java.lang.annotation AnnotationFormatError AnnotationFormatError.

Prototype

public AnnotationFormatError(Throwable cause) 

Source Link

Document

Constructs a new AnnotationFormatError with the specified cause and a detail message of (cause == null ?

Usage

From source file:gaffer.function.ConsumerFunction.java

/**
 * Retrieves the input record structure from the {@link gaffer.function.annotation.Inputs} annotation.
 *//*from   ww  w.j av  a2s .  c  om*/
private void processInputAnnotation() {
    final Inputs annotation = getClass().getAnnotation(Inputs.class);
    if (null == annotation || null == annotation.value()) {
        throw new AnnotationFormatError(
                "All consumer function classes must have inputs defined using the 'Inputs' annotation on the class.");
    }

    inputs = annotation.value();
}

From source file:gaffer.function.ProducerFunction.java

/**
 * Retrieves the input record structure from the {@link gaffer.function.annotation.Inputs} annotation.
 *//*w w  w.jav a 2 s .c  o m*/
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();
}

From source file:gaffer.function.ConsumerProducerFunction.java

/**
 * Retrieves the input record structure from the {@link gaffer.function.annotation.Inputs} annotation.
 *//*from   ww w  . j  a v a  2  s  .com*/
private void processOutputAnnotation() {
    final Outputs annotation = getClass().getAnnotation(Outputs.class);
    if (null == annotation || null == annotation.value()) {
        throw new AnnotationFormatError(
                "All consumer producer function classes must have outputs defined using the 'Outputs' annotation on the class.");
    }

    outputs = annotation.value();
}

From source file:uk.gov.gchq.gaffer.function.ConsumerFunction.java

/**
 * Retrieves the input record structure from the {@link uk.gov.gchq.gaffer.function.annotation.Inputs} annotation.
 *///from  w  ww .  j a  va 2s  .  co  m
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();
}

From source file:uk.gov.gchq.gaffer.function.ConsumerProducerFunction.java

/**
 * Retrieves the input record structure from the {@link uk.gov.gchq.gaffer.function.annotation.Inputs} annotation.
 *///from   w w w. j a  v  a  2  s. c om
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();
}