Small API changes (hence version bump to 4.3.x) that should not affect most users; a bugfix for annotation default parameter values.
API changes:
List<AnnotationParameterValue>
(returned byAnnotationInfo#getParameterValues()
andAnnotationInfo#getDefaultParameterValues()
) has been replaced with a new classAnnotationParameterValueList
(extendsList<AnnotationParameterValue>
with some convenience methods, similar to the other*List
classes). In particular the following methods will cut down on boilerplate code when dealing with annotation parameter values:.get(String parameterName)
returns the parameter value with the given name..asMap()
returns all the annotation parameters as a map from name to value.
- Removed deprecated methods
.getDefiningClassName()
and.getDefiningClassInfo()
fromMethodInfo
andFieldInfo
classes. (Instead use.getClassInfo().getName()
and.getClassInfo()
respectively.) Resource#toString()
now returns theURL
of theResource
, rather than a custom-formatted string.
Bugfix:
- If an annotation definition contained multiple parameters, and more than one of them had a default value, all but the last default value was being dropped. This is now fixed so all default values are read.