Class DependencyGraphRecorder

java.lang.Object
com.google.gwt.core.ext.soyc.impl.DependencyRecorder
com.google.gwt.core.ext.soyc.coderef.DependencyGraphRecorder
All Implemented Interfaces:
com.google.gwt.dev.jjs.impl.codesplitter.MultipleDependencyGraphRecorder, com.google.gwt.dev.jjs.impl.ControlFlowAnalyzer.DependencyRecorder

public class DependencyGraphRecorder extends com.google.gwt.core.ext.soyc.impl.DependencyRecorder
Builds the model for the (new) soyc through reading method dependencies. The code model is in a mapping from fully qualified class names (eg. com.google.gwt.MyClass, see JType.getName()) to class descriptors. Where each class descriptor has methods and their dependents.
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.google.gwt.core.ext.soyc.impl.DependencyRecorder

    com.google.gwt.core.ext.soyc.impl.DependencyRecorder.NestedIOException
  • Field Summary

    Fields inherited from interface com.google.gwt.dev.jjs.impl.codesplitter.MultipleDependencyGraphRecorder

    NULL_RECORDER
  • Constructor Summary

    Constructors
    Constructor
    Description
    DependencyGraphRecorder(OutputStream out, com.google.gwt.dev.jjs.ast.JProgram jProgram)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    classDescriptorFrom(com.google.gwt.dev.jjs.ast.JDeclaredType classType)
    Returns a class descriptor from a JDeclaredType.
    Returns the code model that maps fully qualified class names (eg.
    protected boolean
    isValid(int n)
     
    methodDescriptorFrom(com.google.gwt.dev.jjs.ast.JMethod method)
     
    protected int
     
    protected void
    printMethodDependencyBetween(com.google.gwt.dev.jjs.ast.JMethod curMethod, com.google.gwt.dev.jjs.ast.JMethod depMethod)
     
    protected String
    signatureFor(com.google.gwt.dev.jjs.ast.JMethod method)
     
    void
    Start a new dependency graph.

    Methods inherited from class com.google.gwt.core.ext.soyc.impl.DependencyRecorder

    close, endDependencyGraph, methodIsLiveBecause, open, recordDependenciesImpl

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DependencyGraphRecorder

      public DependencyGraphRecorder(OutputStream out, com.google.gwt.dev.jjs.ast.JProgram jProgram)
  • Method Details

    • nextPointerId

      protected int nextPointerId()
    • getCodeModel

      public Map<String,ClassDescriptor> getCodeModel()
      Returns the code model that maps fully qualified class names (eg. com.google.gwt.MyClass, see JType.getName()) to class descriptors.
    • startDependencyGraph

      public void startDependencyGraph(String name, String extendz)
      Description copied from interface: com.google.gwt.dev.jjs.impl.codesplitter.MultipleDependencyGraphRecorder
      Start a new dependency graph. It can be an extension of a previously recorded dependency graph, in which case the dependencies in the previous graph will not be repeated.
      Specified by:
      startDependencyGraph in interface com.google.gwt.dev.jjs.impl.codesplitter.MultipleDependencyGraphRecorder
      Overrides:
      startDependencyGraph in class com.google.gwt.core.ext.soyc.impl.DependencyRecorder
    • printMethodDependencyBetween

      protected void printMethodDependencyBetween(com.google.gwt.dev.jjs.ast.JMethod curMethod, com.google.gwt.dev.jjs.ast.JMethod depMethod)
      Overrides:
      printMethodDependencyBetween in class com.google.gwt.core.ext.soyc.impl.DependencyRecorder
    • signatureFor

      protected String signatureFor(com.google.gwt.dev.jjs.ast.JMethod method)
    • methodDescriptorFrom

      public MethodDescriptor methodDescriptorFrom(com.google.gwt.dev.jjs.ast.JMethod method)
    • isValid

      protected boolean isValid(int n)
    • classDescriptorFrom

      public ClassDescriptor classDescriptorFrom(com.google.gwt.dev.jjs.ast.JDeclaredType classType)
      Returns a class descriptor from a JDeclaredType. If the class descriptor is not in the code model, it will be added.