src/main/java/org/apache/bval/bench/Util.java
public static void addAnnotParam(JAnnotationUse annot, String key, Object value) {
        if (value == null) {
            // Null values not accepted
            throw new RuntimeException("Null values not supported as annotation parameters");
        } else if (value instanceof Boolean) {
            annot.param(key, (Boolean) value);
        } else if (value instanceof Integer) {
            annot.param(key, (Integer) value);
        } else if (value instanceof String) {
            annot.param(key, (String) value);
        } else if (value instanceof Class<?>) {
            annot.param(key, (Class<?>) value);
        } else if (value instanceof JType) {
            annot.param(key, (JType) value);
        } else if (value.getClass().isArray()) {
            Object[] valueArr = (Object[]) value;
            JAnnotationArrayMember aux = annot.paramArray(key);
            for (int i = 0; i < valueArr.length; ++i) {
                addAnnotArrayParam(aux, valueArr[i]);
            }
        } else {
            throw new RuntimeException("Impossible to construct annotation param for: " + value);
        }
    }
/**
     * Calls the correct {@link JAnnotationUse} <code>param</code> method.
     * 
     * @param annot
     *            The annotation in which the parameter will be added.
     * @param key
     *            The parameter's key.
     * @param value
     *            The parameter's value.
     */
Calls the correct  JAnnotationUse param method.

@param annot
The annotation in which the parameter will be added.
@param key
The parameter's key.
@param value
The parameter's value.
Calls the correct JAnnotationUse param method . @param annot The annotation in which the parameter will be added . @param key The parameter ' s key . @param value The parameter ' s value .
public static void addAnnotParam(JAnnotationUse annot, String key, Object value) {
        if (value == null) {
            throw new RuntimeException("Null values not supported as annotation parameters");
        } else if (value instanceof Boolean) {
            annot.param(key, (Boolean) value);
        } else if (value instanceof Integer) {
            annot.param(key, (Integer) value);
        } else if (value instanceof String) {
            annot.param(key, (String) value);
        } else if (value instanceof Class<?>) {
            annot.param(key, (Class<?>) value);
        } else if (value instanceof JType) {
            annot.param(key, (JType) value);
        } else if (value.getClass().isArray()) {
            Object[] valueArr = (Object[]) value;
            JAnnotationArrayMember aux = annot.paramArray(key);
            for (int i = 0; i < valueArr.length; ++i) {
                addAnnotArrayParam(aux, valueArr[i]);
            }
        } else {
            throw new RuntimeException("Impossible to construct annotation param for: " + value);
        }
    }
public static void addAnnotParam ( JAnnotationUse annot , String key , Object value ) { if ( value == null ) { throw new RuntimeException ( "Null values not supported as annotation parameters" ) ; } else if ( value instanceof Boolean ) { annot . param ( key , ( Boolean ) value ) ; } else if ( value instanceof Integer ) { annot . param ( key , ( Integer ) value ) ; } else if ( value instanceof String ) { annot . param ( key , ( String ) value ) ; } else if ( value instanceof Class < ? > ) { annot . param ( key , ( Class < ? > ) value ) ; } else if ( value instanceof JType ) { annot . param ( key , ( JType ) value ) ; } else if ( value . getClass ( ) . isArray ( ) ) { Object [ ] valueArr = ( Object [ ] ) value ; JAnnotationArrayMember aux = annot . paramArray ( key ) ; for ( int i = 0 ; i < valueArr . length ; ++ i ) { addAnnotArrayParam ( aux , valueArr [ i ] ) ; } } else { throw new RuntimeException ( "Impossible to construct annotation param for: " + value ) ; } }
Calls the correct {@link JAnnotationUse} <code>param</code> method.
Calls the correct { @link JAnnotationUse } <code > param< / code > method .
// Null values not accepted