Package pascal.taie.util
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 TypeMethodDescriptionvoid
clearAll()
Clears all cached results.void
clearResult
(String key) Clears result of the analysis specified by given key.getKeys()
<R> R
Given a key, returns the corresponding results.<R> R
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
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
Stores the analysis result with the key. -
hasResult
- Returns:
true
if the holder contains the result for given id.
-
getResult
Given a key, returns the corresponding results. -
getResult
If this holder contains the result for given key, then returns the result; otherwise, return the given default result. -
getResult
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
Clears result of the analysis specified by given key. -
clearAll
void clearAll()Clears all cached results.
-