Class GetMethodContext
java.lang.Object
com.ibm.wala.analysis.reflection.GetMethodContext
- All Implemented Interfaces:
Context
,ContextItem
A context which may be used if
- the method to be interpreted is either
Class.getMethod(String, Class...)
orClass.getDeclaredMethod(String, Class...)
, - the type of the "this" argument is known and
- the value of the first argument (the method name) is a constant.
GetMethodContextInterpreter
and GetMethodContextSelector
should be preferred over JavaLangClassContextInterpreter
and
JavaLangClassContextSelector
, as GetMethodContextInterpreter
and GetMethodContextSelector
drastically reduce the number of methods returned increasing the
precision of the analysis. Thus, GetMethodContextInterpreter
and GetMethodContextSelector
should be placed in be placed in front of JavaLangClassContextInterpreter
and JavaLangClassContextSelector
.
TODO Do the same for Class.getField(String)
and Class.getDeclaredField(String)
.
- Author:
- Michael Heilmann
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.ibm.wala.ipa.callgraph.ContextItem
ContextItem.Value<T>
-
Constructor Summary
ConstructorDescriptionGetMethodContext
(TypeAbstraction type, ConstantKey<String> name) Construct this GetMethodContext. -
Method Summary