Interface ReflectionResolver
- All Known Implementing Classes:
DefaultReflectionResolver
public interface ReflectionResolver
Interface for reflection resolvers that handle reflective method calls such as
Method.invoke(Object, Object...)
or Constructor.newInstance(Object...)
.- See the Checker Framework Manual:
- Reflection resolution
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if the given tree represents a reflective method or constructor call.resolveReflectiveCall
(AnnotatedTypeFactory factory, MethodInvocationTree tree, AnnotatedTypeFactory.ParameterizedExecutableType origResult) Resolve reflection and return the result offactory.methodFromUse
for the actual, resolved method or constructor call.
-
Field Details
-
INIT
The "method name" of constructors.- See Also:
-
INIT_LIST
A list containing just the "method name" of constructors. Clients must not modify this list.
-
-
Method Details
-
isReflectiveMethodInvocation
Returns true if the given tree represents a reflective method or constructor call.- Returns:
true
iff tree is a reflective method invocation,false
otherwise
-
resolveReflectiveCall
AnnotatedTypeFactory.ParameterizedExecutableType resolveReflectiveCall(AnnotatedTypeFactory factory, MethodInvocationTree tree, AnnotatedTypeFactory.ParameterizedExecutableType origResult) Resolve reflection and return the result offactory.methodFromUse
for the actual, resolved method or constructor call. If the reflective method cannot be resolved the original result (origResult
) is returned.- Parameters:
factory
- the currently used AnnotatedTypeFactorytree
- the reflective invocation tree (m.invoke or c.newInstance)origResult
- the original result for the unresolved, reflective method call
-