soot.jimple.infoflow.android.manifest.containers.EmptyComponentContainer Maven / Gradle / Ivy
package soot.jimple.infoflow.android.manifest.containers;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import soot.jimple.infoflow.android.manifest.IAndroidComponent;
import soot.jimple.infoflow.android.manifest.IComponentContainer;
/**
* Empty component container
*
* @author Steven Arzt
*
*/
public class EmptyComponentContainer implements IComponentContainer {
private final static EmptyComponentContainer> INSTANCE = new EmptyComponentContainer<>();
private EmptyComponentContainer() {
}
@SuppressWarnings("unchecked")
public static EmptyComponentContainer get() {
return (EmptyComponentContainer) INSTANCE;
}
@Override
public List asList() {
return Collections.emptyList();
}
@Override
public Iterator iterator() {
return Collections.emptyIterator();
}
@Override
public E getComponentByName(String name) {
return null;
}
@Override
public boolean isEmpty() {
return true;
}
}