code: static Object adaptValue(Object value, boolean classValuesAsString, boolean nestedAnnotationsAsMap) {
  		if (classValuesAsString) {
  			if (value instanceof Class) {
  				value = ((Class<?>) value).getName();
  			}
  			else if (value instanceof Class[]) {
  				Class<?>[] clazzArray = (Class[]) value;
  				String[] newValue = new String[clazzArray.length];
  				for (int i = 0; i < clazzArray.length; i++) {
  					newValue[i] = clazzArray[i].getName();
  				}
  				value = newValue;
  			}
  		}
  		if (nestedAnnotationsAsMap && value instanceof Annotation) {
  			return getAnnotationAttributes((Annotation) value, classValuesAsString, true);
  		}
  		else if (nestedAnnotationsAsMap && value instanceof Annotation[]) {
  			Annotation[] realAnnotations = (Annotation[]) value;
  			AnnotationAttributes[] mappedAnnotations = new AnnotationAttributes[realAnnotations.length];
  			for (int i = 0; i < realAnnotations.length; i++) {
  				mappedAnnotations[i] = getAnnotationAttributes(realAnnotations[i], classValuesAsString, true);
  			}
  			return mappedAnnotations;
  		}
  		else {
  			return value;
  		}
  	}
docs: Adapt the given value according to the given class and nested annotation settings.
  @param value the annotation attribute value
  @param classValuesAsString whether to turn Class references into Strings (for
  compatibility with {@link com.freetmp.common.type.AnnotatedTypeMetadata}
  or to preserve them as Class references
  @param nestedAnnotationsAsMap whether to turn nested Annotation instances into
  {@link AnnotationAttributes} maps (for compatibility with
  {@link com.freetmp.common.type.AnnotatedTypeMetadata} or to preserve them as
  Annotation instances
  @return the adapted value, or the original value if no adaptation is needed