Package org.robovm.compiler
Class DependencyGraph
java.lang.Object
org.robovm.compiler.DependencyGraph
public class DependencyGraph extends Object
Used to build a graph of dependencies between classes and methods. By
traversing this graph the compiler can determine the minimum set of classes
that need to be compiled in to the final binary given a specific
Config.TreeShakerMode.-
Constructor Summary
Constructors Constructor Description DependencyGraph(Config.TreeShakerMode treeShakerMode) -
Method Summary
Modifier and Type Method Description voidadd(Clazz clazz, boolean root, Collection<MethodInfo> forcedLinkedMethods)Adds the specifiedClazzto the graph after it has been compiled.Set<String>findReachableClasses()Finds reachable classes given theConfig.TreeShakerModeset when creating thisDependencyGraph.Set<org.apache.commons.lang3.tuple.Triple<String,String,String>>findReachableMethods()Finds reachable methods givenConfig.TreeShakerModeset when creating thisDependencyGraph.TreeSet<String>getAllClasses()
-
Constructor Details
-
DependencyGraph
-
-
Method Details
-
add
Adds the specifiedClazzto the graph after it has been compiled. Ifroot == truethe class will be added to the root set and it as well as its methods will always be reachable.- Parameters:
forcedLinkedMethods- specifies list of methods that has to be forced linked to survive aggressive tree shaker
-
findReachableClasses
Finds reachable classes given theConfig.TreeShakerModeset when creating thisDependencyGraph. -
findReachableMethods
Finds reachable methods givenConfig.TreeShakerModeset when creating thisDependencyGraph. The returnedTriples contain the method owner, method name and method descriptor. -
getAllClasses
-