Class KeySetContext<C>

java.lang.Object
soot.jimple.infoflow.collections.context.KeySetContext<C>
Type Parameters:
C - key type
All Implemented Interfaces:
ValueBasedContext<KeySetContext<?>>, ContainerContext

public class KeySetContext<C> extends Object implements ValueBasedContext<KeySetContext<?>>
Representation of map keys using a set possible keys
  • Constructor Details

    • KeySetContext

      public KeySetContext(C key)
    • KeySetContext

      public KeySetContext(C key, boolean impreciseValue)
    • KeySetContext

      public KeySetContext(Set<C> keys)
    • KeySetContext

      public KeySetContext(Set<C> keys, boolean impreciseValue)
  • Method Details

    • intersect

      public Tristate intersect(KeySetContext<?> other)
      Description copied from interface: ValueBasedContext
      Check whether this and other intersects
      Specified by:
      intersect in interface ValueBasedContext<C>
      Parameters:
      other - value-based context
      Returns:
      true on perfect match, maybe on part match and otherwise false
    • entails

      public boolean entails(ContainerContext other)
      Description copied from interface: ContainerContext
      Returns whether this entails other.
      Specified by:
      entails in interface ContainerContext
      Parameters:
      other - other context definition
      Returns:
      true if this entails other
    • containsInformation

      public boolean containsInformation()
      Description copied from interface: ContainerContext
      Returns whether the context definition
      Specified by:
      containsInformation in interface ContainerContext
      Returns:
      true if it still restricts
    • isImprecise

      public boolean isImprecise()
      Description copied from interface: ContainerContext
      Gets whether the given context is imprecise, for example, because the context is built conditionally through multiple paths or the value itself contains some approximation. Users of this context should respect this flag and refrain from performing strong updates.
      Specified by:
      isImprecise in interface ContainerContext
      Returns:
      true if the context is imprecise
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object