Class JvmCfaNode

    • Constructor Detail

      • JvmCfaNode

        public JvmCfaNode​(MethodSignature signature,
                          int offset,
                          Clazz clazz)
        Create a JVM CFA node without edges. Since in most cases we expect to have just one element in the lists of leaving and entering edges the lists are initialized with size 1.
        Parameters:
        signature - the signature of the method the node belongs to
        offset - a number indicating the program location offset of the node
        clazz - the class of the method the node belongs to
      • JvmCfaNode

        public JvmCfaNode​(java.util.List<JvmCfaEdge> leavingEdges,
                          java.util.List<JvmCfaEdge> enteringEdges,
                          MethodSignature signature,
                          int offset,
                          Clazz clazz)
        Create JVM CFA node with the specified entering and exiting edges.
        Parameters:
        leavingEdges - a list of edges leaving the node
        enteringEdges - a list of edges entering the node
        signature - the signature of the method the node belongs to
        offset - a number indicating the program location offset of the node
        clazz - the class of the method the node belongs to
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getClazz

        public Clazz getClazz()
        Returns the class the node belongs to.
      • addLeavingEdge

        public void addLeavingEdge​(JvmCfaEdge edge)
        Adds an edge leaving the node.
      • addEnteringEdge

        public void addEnteringEdge​(JvmCfaEdge edge)
        Adds an edge entering the node.
      • getEnteringInvokeEdge

        public java.util.Optional<JvmCfaEdge> getEnteringInvokeEdge()
        If the node is the location after a method invocation, returns the entering JvmInstructionCfaEdge for the method invocation, empty otherwise.
      • getLeavingInvokeEdge

        public java.util.Optional<JvmCfaEdge> getLeavingInvokeEdge()
        If the node is the location before a method invocation, returns the leaving JvmInstructionCfaEdge for the method invocation, empty otherwise.
      • getEnteringIntraproceduralEdges

        public java.util.Collection<JvmCfaEdge> getEnteringIntraproceduralEdges()
        Returns the edges entering the node that do not come from another method.
      • getLeavingIntraproceduralEdges

        public java.util.Collection<JvmCfaEdge> getLeavingIntraproceduralEdges()
        Returns the edges leaving the node that do not come from another method.
      • getLeavingInterproceduralEdges

        public java.util.Collection<JvmCallCfaEdge> getLeavingInterproceduralEdges()
        Returns the edges entering the node that come from another method.
      • getKnownMethodCallEdges

        public java.util.Collection<JvmCallCfaEdge> getKnownMethodCallEdges()
        Returns all the interprocedural call edges leaving the node with target method the code of which is known.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object