The new RuntimeHints
API allows to describe hints for the reflection/proxies/resources needs at runtime.
The problem is, a single invocation at runtime can be covered by multiple, different hints.
For example, reflection introspection on the myMethod
method for the class MyClass
can be covered by any of:
MemberCategory.INTROSPECT_PUBLIC_METHODS
ifmyMethod
is publicMemberCategory.INVOKE_PUBLIC_METHODS
ifmyMethod
is publicMemberCategory.INTROSPECT_DECLARED_METHODS
in all casesMemberCategory.INVOKE_DECLARED_METHODS
in all cases- a specific introspection or invokation reflection entry for
MyClass::myMethod
Because of the knowledge required for checking if registered hints are enough for a particular use case, we should introduce Predicate<RuntimeHints>
static utilities to be used in tests and in #27981