docs: public Object readAttributeValue(String enclosingElement, String nesting, AttributeDefinition attributeDefinition, Object attrValue, B builderInfo) {
        if (attrValue == null) return null;
        Class type = attributeDefinition.getType();
        AttributeSerializer serializerConfig = attributeDefinition.getSerializerConfig();
        SerializationMode serializationMode = serializerConfig.getSerializationMode();
  
        boolean isElementSerialization = serializationMode == SerializationMode.AS_ELEMENT;
        if (isElementSerialization) return null;
  
        if (attrValue instanceof Map && type == TypedProperties.class) {
           TypedProperties typedProperties = new TypedProperties();
           typedProperties.putAll((Map) attrValue);
           return typedProperties;
        } else if (type.isEnum() && !attrValue.getClass().isEnum()) {
           return Enum.valueOf(type, attrValue.toString());
        } else if (type == Set.class) {
           if (attrValue instanceof Collection) {
              return new HashSet<>(((Collection) attrValue));
           }
        } else if (type == Integer.class && attrValue instanceof Number) {
           return ((Number) attrValue).intValue();
        } else if (type == Class.class) {
           return Util.loadClass(attrValue.toString(), builderInfo.getClass().getClassLoader());
        }
        return attrValue;
     }