org.robolectric.internal.bytecode.Interceptors Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sandbox Show documentation
Show all versions of sandbox Show documentation
An alternative Android testing framework.
package org.robolectric.internal.bytecode;
import static java.util.Arrays.asList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import org.robolectric.util.Function;
public class Interceptors {
private final Map interceptors = new HashMap<>();
public Interceptors(Interceptor... interceptors) {
this(asList(interceptors));
}
public Interceptors(Collection interceptorList) {
for (Interceptor interceptor : interceptorList) {
for (MethodRef methodRef : interceptor.getMethodRefs()) {
this.interceptors.put(methodRef, interceptor);
}
}
}
public Collection getAllMethodRefs() {
return interceptors.keySet();
}
public Function