Interface Context

All Superinterfaces:
ContextItem
All Known Implementing Classes:
AllocationStringContext, AndroidContext, ArgumentInstanceContext, ArgumentSpecialization.ArgumentCountContext, CallerContext, CallerContextPair, CallerSiteContext, CallerSiteContextPair, CallStringContext, CallStringContextSelector.CallStringContextPair, CPAContextSelector.CPAContext, DelegatingContext, Everywhere, GetMethodContext, IllegalArgumentExceptionContext, IntentContext, JavaScriptFunctionApplyContextSelector.ApplyContext, JavaTypeContext, MethodHandles.FindContext, PropertyNameContextSelector.PropNameContext, ReceiverInstanceContext, SelectiveCPAContext

public interface Context extends ContextItem
A Context is a mapping from a name (ContextKey) to a value (ContextItem)

For example, for CFA-1, there is only one name ("caller"); and the context maps "caller" to an IMethod

As another example, for CPA, there would be name for each parameter slot ("zero","one","two"), and the Context provides a mapping from this name to a set of types. eg. "one" -> {java.lang.String, java.lang.Date}

  • Method Details

    • get

      Returns:
      the objects corresponding to a given name
    • isA

      default boolean isA(Class<? extends Context> type)
      Returns:
      whether this context has a specific type