private Object getArrayValueClassOrName(final ClassInfo annotationClassInfo, final String paramName,
            final boolean getClass) {
        // Find the method in the annotation class with the same name as the annotation parameter.
        final MethodInfoList annotationMethodList = annotationClassInfo.methodInfo == null ? null
                : annotationClassInfo.methodInfo.get(paramName);
        if (annotationMethodList != null && annotationMethodList.size() > 1) {
            // There should only be one method with a given name in an annotation
            throw new IllegalArgumentException("Duplicated annotation parameter method " + paramName
                    + "() in annotation class " + annotationClassInfo.getName());
        } else if (annotationMethodList != null && annotationMethodList.size() == 1) {
            // Get the result type of the method with the same name as the annotation parameter 
            final TypeSignature annotationMethodResultTypeSig = annotationMethodList.get(0)
                    .getTypeSignatureOrTypeDescriptor().getResultType();
            // The result type has to be an array type 
            if (!(annotationMethodResultTypeSig instanceof ArrayTypeSignature)) {
                throw new IllegalArgumentException("Annotation parameter " + paramName + " in annotation class "
                        + annotationClassInfo.getName()
                        + " holds an array, but does not have an array type signature");
            }
            final ArrayTypeSignature arrayTypeSig = (ArrayTypeSignature) annotationMethodResultTypeSig;
            if (arrayTypeSig.getNumDimensions() != 1) {
                throw new IllegalArgumentException("Annotations only support 1-dimensional arrays");
            }
            final TypeSignature elementTypeSig = arrayTypeSig.getElementTypeSignature();
            if (elementTypeSig instanceof ClassRefTypeSignature) {
                // Look up the name of the element type, for non-primitive arrays 
                final ClassRefTypeSignature classRefTypeSignature = (ClassRefTypeSignature) elementTypeSig;
                return getClass ? classRefTypeSignature.loadClass()
                        : classRefTypeSignature.getFullyQualifiedClassName();
            } else if (elementTypeSig instanceof BaseTypeSignature) {
                // Look up the name of the primitive class, for primitive arrays
                final BaseTypeSignature baseTypeSignature = (BaseTypeSignature) elementTypeSig;
                return getClass ? baseTypeSignature.getType() : baseTypeSignature.getTypeStr();
            }
        } else {
            // Could not find a method with this name -- this is an external class.
            // Find first non-null object in array, and use its type as the type of the array.
            for (final ObjectTypedValueWrapper elt : objectArrayValue) {
                if (elt != null) {
                    return elt.integerValue != null ? (getClass ? Integer.class : "int")
                            : elt.longValue != null ? (getClass ? Long.class : "long")
                                    : elt.shortValue != null ? (getClass ? Short.class : "short")
                                            : elt.characterValue != null ? (getClass ? Character.class : "char")
                                                    : elt.byteValue != null ? (getClass ? Byte.class : "byte")
                                                            : elt.booleanValue != null
                                                                    ? (getClass ? Boolean.class : "boolean")
                                                                    : elt.doubleValue != null
                                                                            ? (getClass ? Double.class : "double")
                                                                            : elt.floatValue != null
                                                                                    ? (getClass ? Float.class
                                                                                            : "float")
                                                                                    : (getClass ? null : "");
                }
            }
        }
        return getClass ? null : "";
    }
private Object getArrayValueClassOrName ( final ClassInfo annotationClassInfo , final String paramName , final boolean getClass ) { final MethodInfoList annotationMethodList = annotationClassInfo . methodInfo == null ? null : annotationClassInfo . methodInfo . get ( paramName ) ; if ( annotationMethodList != null && annotationMethodList . size ( ) > 1 ) { throw new IllegalArgumentException ( "Duplicated annotation parameter method " + paramName + "() in annotation class " + annotationClassInfo . getName ( ) ) ; } else if ( annotationMethodList != null && annotationMethodList . size ( ) == 1 ) { final TypeSignature annotationMethodResultTypeSig = annotationMethodList . get ( 0 ) . getTypeSignatureOrTypeDescriptor ( ) . getResultType ( ) ; if ( ! ( annotationMethodResultTypeSig instanceof ArrayTypeSignature ) ) { throw new IllegalArgumentException ( "Annotation parameter " + paramName + " in annotation class " + annotationClassInfo . getName ( ) + " holds an array, but does not have an array type signature" ) ; } final ArrayTypeSignature arrayTypeSig = ( ArrayTypeSignature ) annotationMethodResultTypeSig ; if ( arrayTypeSig . getNumDimensions ( ) != 1 ) { throw new IllegalArgumentException ( "Annotations only support 1-dimensional arrays" ) ; } final TypeSignature elementTypeSig = arrayTypeSig . getElementTypeSignature ( ) ; if ( elementTypeSig instanceof ClassRefTypeSignature ) { final ClassRefTypeSignature classRefTypeSignature = ( ClassRefTypeSignature ) elementTypeSig ; return getClass ? classRefTypeSignature . loadClass ( ) : classRefTypeSignature . getFullyQualifiedClassName ( ) ; } else if ( elementTypeSig instanceof BaseTypeSignature ) { final BaseTypeSignature baseTypeSignature = ( BaseTypeSignature ) elementTypeSig ; return getClass ? baseTypeSignature . getType ( ) : baseTypeSignature . getTypeStr ( ) ; } } else { for ( final ObjectTypedValueWrapper elt : objectArrayValue ) { if ( elt != null ) { return elt . integerValue != null ? ( getClass ? Integer . class : "int" ) : elt . longValue != null ? ( getClass ? Long . class : "long" ) : elt . shortValue != null ? ( getClass ? Short . class : "short" ) : elt . characterValue != null ? ( getClass ? Character . class : "char" ) : elt . byteValue != null ? ( getClass ? Byte . class : "byte" ) : elt . booleanValue != null ? ( getClass ? Boolean . class : "boolean" ) : elt . doubleValue != null ? ( getClass ? Double . class : "double" ) : elt . floatValue != null ? ( getClass ? Float . class : "float" ) : ( getClass ? null : "" ) ; } } } return getClass ? null : "" ; }
Get the element type of an array element.

@param annotationClassInfo
annotation class
@param paramName
the parameter name
@param getClass
If true, return a {@code Class<?>} reference, otherwise return the class name.
@return the array value type as a {@code Class<?>} reference if getClass is true, otherwise the class name as
a String.