GWT 2.7.0

com.google.gwt.core.ext.soyc.coderef
Class DependencyGraphRecorder

java.lang.Object
  extended by com.google.gwt.core.ext.soyc.impl.DependencyRecorder
      extended by 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
DependencyGraphRecorder(java.io.OutputStream out, com.google.gwt.dev.jjs.ast.JProgram jProgram)
           
 
Method Summary
 ClassDescriptor classDescriptorFrom(com.google.gwt.dev.jjs.ast.JDeclaredType classType)
          Returns a class descriptor from a JDeclaredType.
 java.util.Map<java.lang.String,ClassDescriptor> getCodeModel()
          Returns the code model that maps fully qualified class names (eg.
protected  boolean isValid(int n)
           
 MethodDescriptor methodDescriptorFrom(com.google.gwt.dev.jjs.ast.JMethod method)
           
protected  int nextPointerId()
           
protected  void printMethodDependencyBetween(com.google.gwt.dev.jjs.ast.JMethod curMethod, com.google.gwt.dev.jjs.ast.JMethod depMethod)
           
protected  java.lang.String signatureFor(com.google.gwt.dev.jjs.ast.JMethod method)
           
 void startDependencyGraph(java.lang.String name, java.lang.String extendz)
           
 
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 Detail

DependencyGraphRecorder

public DependencyGraphRecorder(java.io.OutputStream out,
                               com.google.gwt.dev.jjs.ast.JProgram jProgram)
Method Detail

nextPointerId

protected int nextPointerId()

getCodeModel

public java.util.Map<java.lang.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(java.lang.String name,
                                 java.lang.String extendz)
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 java.lang.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.


GWT 2.7.0