accrue.analysis.pointer

## Class PointsToLibrarySigs.AllocatorOrReceiver

- java.lang.Object
- - accrue.analysis.pointer.LibraryPointsToSignature
  - - accrue.analysis.pointer.PointsToLibrarySigs.AllocatorOrReceiver

- Enclosing class:
    PointsToLibrarySigs

      public static class PointsToLibrarySigs.AllocatorOrReceiver
      extends LibraryPointsToSignature

  Returns a new node, and maybe also the receiver. The canonical example of this is java.lang.String.substring(), which may return this, or it may allocate a new String.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.lang.String` | `allocatedType`
    `protected java.util.concurrent.atomic.AtomicReference<AllocSiteNode>` | `allocSite`
    `protected boolean` | `isPreciseType`
    `protected boolean` | `mayReturnReceiver`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PointsToLibrarySigs.AllocatorOrReceiver(java.lang.String allocatedType, boolean mayReturnReceiver)`
    `PointsToLibrarySigs.AllocatorOrReceiver(java.lang.String allocatedType, boolean mayReturnReceiver, boolean isPreciseType)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected AllocSiteNode` | `allocSiteNode(polyglot.types.TypeSystem ts, polyglot.types.ClassType container, polyglot.util.Position pos)`
    `boolean` | `process(polyglot.types.CodeInstance caller, CContext callerContext, CallSiteNode callSiteNode, polyglot.types.ProcedureInstance mi, java.util.List<ReferenceVariableReplica> args, HContext receiver, ReferenceVariableReplica result, java.util.List<StmtProcedureCall.ExceptionHandlerPointsToGraphNode> handlers, java.util.Map<polyglot.types.Type,ReferenceVariableReplica> procThrows, StmtRegistrar stmtRegistrar, PointsToGraph g, polyglot.util.Position origin, HeapAbstractionFactory af, PointsToEngine.StmtAndContext sac)`
    `protected static polyglot.types.Type` | `typeForName(polyglot.types.TypeSystem ts, java.lang.String s)`

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

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

- - ### Field Detail

    - #### allocatedType

          protected final java.lang.String allocatedType

    - #### mayReturnReceiver

          protected final boolean mayReturnReceiver

    - #### isPreciseType

          protected final boolean isPreciseType

    - #### allocSite

          protected java.util.concurrent.atomic.AtomicReference<AllocSiteNode> allocSite

  - ### Constructor Detail

    - #### PointsToLibrarySigs.AllocatorOrReceiver

          public PointsToLibrarySigs.AllocatorOrReceiver(java.lang.String allocatedType,
                                                 boolean mayReturnReceiver)

    - #### PointsToLibrarySigs.AllocatorOrReceiver

          public PointsToLibrarySigs.AllocatorOrReceiver(java.lang.String allocatedType,
                                                 boolean mayReturnReceiver,
                                                 boolean isPreciseType)

  - ### Method Detail

    - #### typeForName

          protected static polyglot.types.Type typeForName(polyglot.types.TypeSystem ts,
                                        java.lang.String s)
                                                    throws polyglot.types.SemanticException

      Throws:
        `polyglot.types.SemanticException`

    - #### allocSiteNode

          protected AllocSiteNode allocSiteNode(polyglot.types.TypeSystem ts,
                                    polyglot.types.ClassType container,
                                    polyglot.util.Position pos)

    - #### process

          public boolean process(polyglot.types.CodeInstance caller,
                        CContext callerContext,
                        CallSiteNode callSiteNode,
                        polyglot.types.ProcedureInstance mi,
                        java.util.List<ReferenceVariableReplica> args,
                        HContext receiver,
                        ReferenceVariableReplica result,
                        java.util.List<StmtProcedureCall.ExceptionHandlerPointsToGraphNode> handlers,
                        java.util.Map<polyglot.types.Type,ReferenceVariableReplica> procThrows,
                        StmtRegistrar stmtRegistrar,
                        PointsToGraph g,
                        polyglot.util.Position origin,
                        HeapAbstractionFactory af,
                        PointsToEngine.StmtAndContext sac)
                          throws polyglot.types.SemanticException

      Specified by:
        `process` in class `LibraryPointsToSignature`
      Throws:
        `polyglot.types.SemanticException`