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 Details

  • Method Details

    • add

      public void add​(Clazz clazz, boolean root, Collection<MethodInfo> forcedLinkedMethods)
      Adds the specified Clazz to the graph after it has been compiled. If root == true the 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

      public Set<String> findReachableClasses()
      Finds reachable classes given the Config.TreeShakerMode set when creating this DependencyGraph.
    • findReachableMethods

      public Set<org.apache.commons.lang3.tuple.Triple<String,​String,​String>> findReachableMethods()
      Finds reachable methods given Config.TreeShakerMode set when creating this DependencyGraph. The returned Triples contain the method owner, method name and method descriptor.
    • getAllClasses

      public TreeSet<String> getAllClasses()