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, seeJType.getName()
) to class descriptors. Where each class descriptor has methods and their dependents.
-
-
Constructor Summary
Constructors Constructor Description DependencyGraphRecorder(java.io.OutputStream out, com.google.gwt.dev.jjs.ast.JProgram jProgram)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)
Start a new dependency graph.
-
-
-
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, seeJType.getName()
) to class descriptors.
-
startDependencyGraph
public void startDependencyGraph(java.lang.String name, java.lang.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 interfacecom.google.gwt.dev.jjs.impl.codesplitter.MultipleDependencyGraphRecorder
- Overrides:
startDependencyGraph
in classcom.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 classcom.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.
-
-