ContentT - The content of the jvm states. For example, this can be a SetAbstractState of taints for taint analysis or a ValueAbstractState for value analysis.public class BamCacheImpl<ContentT extends AbstractState<ContentT>> extends java.lang.Object implements BamCache<ContentT>
BamCache where the cache is implemented as a HashMap.| Constructor and Description |
|---|
BamCacheImpl() |
| Modifier and Type | Method and Description |
|---|---|
BlockAbstraction<ContentT> |
get(JvmAbstractState<ContentT> stateKey,
Precision precisionKey,
MethodSignature blockKey)
Gets the block abstraction identified by the provided keys from the cache.
|
java.util.Collection<BlockAbstraction<ContentT>> |
get(MethodSignature blockKey)
Returns a collection of all the cache entries for a specified method, empty in case there are
not such entries.
|
java.util.Collection<BlockAbstraction<ContentT>> |
get(Precision precision,
MethodSignature blockKey)
Returns a collection of all the cache entries for a specified method with a certain precision,
empty in case there are not such entries.
|
java.util.Set<MethodSignature> |
getAllMethods()
Returns a set of all the methods that have an entry in the cache.
|
void |
put(JvmAbstractState<ContentT> stateKey,
Precision precisionKey,
MethodSignature blockKey,
BlockAbstraction<ContentT> blockAbstraction)
Adds the block abstraction identified by the provided keys to the cache.
|
int |
size()
Returns the size of the cache.
|
java.util.Collection<BlockAbstraction<ContentT>> |
values()
Returns block abstractions stored in the cache.
|
public void put(JvmAbstractState<ContentT> stateKey, Precision precisionKey, MethodSignature blockKey, BlockAbstraction<ContentT> blockAbstraction)
BamCacheput in interface BamCache<ContentT extends AbstractState<ContentT>>public BlockAbstraction<ContentT> get(JvmAbstractState<ContentT> stateKey, Precision precisionKey, MethodSignature blockKey)
BamCacheget in interface BamCache<ContentT extends AbstractState<ContentT>>public java.util.Collection<BlockAbstraction<ContentT>> get(MethodSignature blockKey)
BamCacheget in interface BamCache<ContentT extends AbstractState<ContentT>>public java.util.Collection<BlockAbstraction<ContentT>> get(Precision precision, MethodSignature blockKey)
BamCacheget in interface BamCache<ContentT extends AbstractState<ContentT>>public java.util.Collection<BlockAbstraction<ContentT>> values()
BamCachevalues in interface BamCache<ContentT extends AbstractState<ContentT>>public int size()
BamCachesize in interface BamCache<ContentT extends AbstractState<ContentT>>public java.util.Set<MethodSignature> getAllMethods()
BamCachegetAllMethods in interface BamCache<ContentT extends AbstractState<ContentT>>