soot.jimple.infoflow.collections.strategies.containers.DefaultConfigContainerStrategyFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of soot-infoflow Show documentation
Show all versions of soot-infoflow Show documentation
Soot extending data flow tracking components for Java
The newest version!
package soot.jimple.infoflow.collections.strategies.containers;
import soot.jimple.infoflow.InfoflowManager;
import soot.jimple.infoflow.config.PreciseCollectionStrategy;
/**
* Selects the container strategy based on the infoflow configuration
*/
public class DefaultConfigContainerStrategyFactory implements IContainerStrategyFactory {
@Override
public IContainerStrategy create(InfoflowManager manager) {
final PreciseCollectionStrategy strategy = manager.getConfig().getPreciseCollectionStrategy();
switch (strategy) {
case CONSTANT_MAP_SUPPORT:
return new ConstantMapStrategy(manager);
case NONE:
return null;
default:
throw new RuntimeException("Not implemented strategy " + strategy);
}
}
}