soot.jimple.infoflow.android.manifest.containers.EagerComponentContainer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of soot-infoflow-android Show documentation
Show all versions of soot-infoflow-android Show documentation
Android-specific components of FlowDroid
package soot.jimple.infoflow.android.manifest.containers;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import soot.jimple.infoflow.android.manifest.IAndroidComponent;
import soot.jimple.infoflow.android.manifest.IComponentContainer;
/**
* Component container for eager loading
*
* @author Steven Arzt
*
*/
public class EagerComponentContainer implements IComponentContainer {
private final Map innerCollection;
public EagerComponentContainer(Collection innerCollection) {
this.innerCollection = new HashMap<>(innerCollection.size());
for (E e : innerCollection)
this.innerCollection.put(e.getNameString(), e);
}
@Override
public List asList() {
return new ArrayList<>(innerCollection.values());
}
@Override
public Iterator iterator() {
return innerCollection.values().iterator();
}
@Override
public E getComponentByName(String name) {
return innerCollection.get(name);
}
@Override
public boolean isEmpty() {
return innerCollection.isEmpty();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy