github classgraph/classgraph classgraph-4.3.0

latest releases: classgraph-4.8.171, classgraph-4.8.170, classgraph-4.8.169...
5 years ago

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 by AnnotationInfo#getParameterValues() and AnnotationInfo#getDefaultParameterValues()) has been replaced with a new class AnnotationParameterValueList (extends List<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() from MethodInfo and FieldInfo classes. (Instead use .getClassInfo().getName() and .getClassInfo() respectively.)
  • Resource#toString() now returns the URL of the Resource, 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.

Don't miss a new classgraph release

NewReleases is sending notifications on new releases.