Interface ResultHolder

All Known Subinterfaces:
IR, PointerAnalysisResult
All Known Implementing Classes:
AbstractResultHolder, DefaultIR, JClass, PointerAnalysisResultImpl, World

public interface ResultHolder
The holder object of analysis results. Each result is associated with a key (of String).
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Clears all cached results.
    void
    Clears result of the analysis specified by given key.
     
    <R> R
    Given a key, returns the corresponding results.
    <R> R
    getResult(String key, Supplier<R> supplier)
    If this holder contains the result for given key, then returns the result; otherwise, supplier is used to create a result, which is stored in the holder, and returned as the result of the call.
    <R> R
    getResult(String key, R defaultResult)
    If this holder contains the result for given key, then returns the result; otherwise, return the given default result.
    boolean
     
    <R> void
    storeResult(String key, R result)
    Stores the analysis result with the key.
  • Method Details

    • storeResult

      <R> void storeResult(String key, R result)
      Stores the analysis result with the key.
    • hasResult

      boolean hasResult(String id)
      Returns:
      true if the holder contains the result for given id.
    • getResult

      <R> R getResult(String key)
      Given a key, returns the corresponding results.
    • getResult

      <R> R getResult(String key, R defaultResult)
      If this holder contains the result for given key, then returns the result; otherwise, return the given default result.
    • getResult

      <R> R getResult(String key, Supplier<R> supplier)
      If this holder contains the result for given key, then returns the result; otherwise, supplier is used to create a result, which is stored in the holder, and returned as the result of the call.
    • getKeys

      Collection<String> getKeys()
      Returns:
      all keys in the holder.
    • clearResult

      void clearResult(String key)
      Clears result of the analysis specified by given key.
    • clearAll

      void clearAll()
      Clears all cached results.