public static String md5Hex(byte[] bytes) {
        try {
            MessageDigest md = MessageDigest.getInstance("MD5");
            md.update(bytes);
            return DatatypeConverter.printHexBinary(md.digest());
        }
        catch (NoSuchAlgorithmException e) {
            throw new FacesException(e);
        }
    }
Determines the type of the generic collection via the getter.

ATTENTION: This method is not designed to cover all possible (edge-)cases. For all full implementation look into something like
<a href="https://github.com/spring-projects/spring-framework/blob/master/spring-core/src/main/java/org/springframework/core/GenericTypeResolver.java.">
https://github.com/spring-projects/spring-framework/blob/master/spring-core/src/main/java/org/springframework/core/GenericTypeResolver.java</a>

@param base Object which contains the collection-property as getter.
@param property Name of the collection-property.
@return Type of the objects within the collection-property. (eg List&lt;String&gt; -&gt; String)
primefaces/src/main/java/org/primefaces/util/LangUtils.java