accrue.analysis.interprocanalysis

## Class Registrar

- java.lang.Object
- - accrue.analysis.interprocanalysis.Registrar

-     public class Registrar
      extends java.lang.Object

  The Registrar maintains useful information about the whole program's code. It has a map from ProcedureInstances to CodeDecls, and a collection of start procedures (i.e., main methods that will be the starting point for interprocedural analyses). It also maintains for each class type a list of the instance initializers (including field initializers) and static initializers (including field initializers).

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Registrar(polyglot.frontend.ExtensionInfo extInfo)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Collection<polyglot.ast.CodeNode>` | `allCode()`
    `java.util.List<polyglot.ast.CodeNode>` | `getAllOrderedStaticInitializers()`
    `java.util.Set<polyglot.types.ClassType>` | `getClassesWithStaticInitializers()`
    `polyglot.ast.CodeDecl` | `getCode(polyglot.types.ProcedureInstance pi)`
    `java.util.List<polyglot.ast.CodeNode>` | `getInstanceInitializers(polyglot.types.ClassType container)`
    `java.util.List<polyglot.ast.CodeNode>` | `getStaticInitializers(polyglot.types.ClassType container)`
    `boolean` | `hasCode(polyglot.types.ProcedureInstance pi)`
    `static boolean` | `isStartProc(polyglot.types.ProcedureInstance pi)` Is pi a starting point for the analysis?
    `int` | `numRegisteredClasses()`
    `int` | `numRegisteredProcedures()`
    `void` | `registerConstructor(polyglot.ast.ConstructorDecl n)`
    `void` | `registerFieldDecl(polyglot.ast.FieldDecl n)`
    `protected void` | `registerInitializer(polyglot.ast.CodeNode n, polyglot.types.InitializerInstance ii)`
    `void` | `registerInitializer(polyglot.ast.Initializer n)`
    `void` | `registerMethod(polyglot.ast.MethodDecl n)`
    `void` | `setAllOrderedStaticInitializers(java.util.List<polyglot.ast.CodeNode> staticInits)`
    `java.util.Set<polyglot.types.ProcedureInstance>` | `startProcs()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Registrar

          public Registrar(polyglot.frontend.ExtensionInfo extInfo)

  - ### Method Detail

    - #### registerMethod

          public void registerMethod(polyglot.ast.MethodDecl n)
                              throws polyglot.types.SemanticException

      Throws:
        `polyglot.types.SemanticException`

    - #### registerConstructor

          public void registerConstructor(polyglot.ast.ConstructorDecl n)

    - #### registerInitializer

          public void registerInitializer(polyglot.ast.Initializer n)

    - #### registerFieldDecl

          public void registerFieldDecl(polyglot.ast.FieldDecl n)

    - #### registerInitializer

          protected void registerInitializer(polyglot.ast.CodeNode n,
                                 polyglot.types.InitializerInstance ii)

    - #### getCode

          public polyglot.ast.CodeDecl getCode(polyglot.types.ProcedureInstance pi)

    - #### hasCode

          public boolean hasCode(polyglot.types.ProcedureInstance pi)

    - #### getInstanceInitializers

          public java.util.List<polyglot.ast.CodeNode> getInstanceInitializers(polyglot.types.ClassType container)

    - #### getClassesWithStaticInitializers

          public java.util.Set<polyglot.types.ClassType> getClassesWithStaticInitializers()

    - #### getStaticInitializers

          public java.util.List<polyglot.ast.CodeNode> getStaticInitializers(polyglot.types.ClassType container)

    - #### setAllOrderedStaticInitializers

          public void setAllOrderedStaticInitializers(java.util.List<polyglot.ast.CodeNode> staticInits)

    - #### getAllOrderedStaticInitializers

          public java.util.List<polyglot.ast.CodeNode> getAllOrderedStaticInitializers()

    - #### isStartProc

          public static boolean isStartProc(polyglot.types.ProcedureInstance pi)

      Is pi a starting point for the analysis?
      Returns:

    - #### startProcs

          public java.util.Set<polyglot.types.ProcedureInstance> startProcs()

    - #### allCode

          public java.util.Collection<polyglot.ast.CodeNode> allCode()

    - #### numRegisteredClasses

          public int numRegisteredClasses()

    - #### numRegisteredProcedures

          public int numRegisteredProcedures()