public class RuntimeAnnotatedClassCollector
extends java.lang.Object
Provides collectClasses(Collection) which given a collection of jars and directories
returns the set of classes that should be kept according to the predicate.
The predicate to determine whether to keep the class is injected in the constructor.
In legacy multidex, by default all classes annotated with a runtime-retention annotation are kept in the main dex, to avoid issues with reflection.
See Issue 78144.
| Constructor and Description |
|---|
RuntimeAnnotatedClassCollector(java.util.function.Predicate<byte[]> keepClassPredicate) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<java.lang.String> |
collectClasses(java.util.Collection<java.nio.file.Path> inputs)
Returns the set of paths to classes that are kept by the keepClassPredicate.
|
public RuntimeAnnotatedClassCollector(@NonNull
java.util.function.Predicate<byte[]> keepClassPredicate)
throws java.lang.InterruptedException
java.lang.InterruptedException@NonNull
public java.util.Set<java.lang.String> collectClasses(@NonNull
java.util.Collection<java.nio.file.Path> inputs)
throws java.lang.InterruptedException
inputs - jars and directories to scan for .class files.com/example/Foo.class) that match the keep
class predicatejava.lang.RuntimeException - if there is an error reading any of the inputs.java.lang.InterruptedException