Class JvmAbstractState<ContentT extends AbstractState<ContentT>>

    • Method Detail

      • peek

        public ContentT peek()
        Returns the top element of the operand stack.
      • peek

        public ContentT peek​(int index)
        Returns the indexth element from the top of the operand stack.
      • peekOrDefault

        public ContentT peekOrDefault​(ContentT defaultState)
        Returns the top element of the operand stack or returns defaultState if the stack is empty.
      • peekOrDefault

        public ContentT peekOrDefault​(int index,
                                      ContentT defaultState)
        Returns the indexth element from the top of the operand stack or returns defaultState if the stack does not have enough elements.
      • pop

        public ContentT pop()
        Removes the top element of the operand stack end returns it.
      • popOrDefault

        public ContentT popOrDefault​(ContentT defaultState)
        Removes the top element of the operand stack end returns it. Returns defaultState if the stack is empty.
      • push

        public ContentT push​(ContentT state)
        Inserts state to the top of the operand stack and returns it.
      • pushAll

        public java.util.List<ContentT> pushAll​(java.util.List<ContentT> states)
        Consequentially inserts elements of states to the top of the operand stack and returns states.
      • clearOperandStack

        public void clearOperandStack()
        Empties the operand stack.
      • getVariableOrDefault

        public ContentT getVariableOrDefault​(int index,
                                             ContentT defaultState)
        Returns an abstract state at the indexth position of the variable array or defaultState if there is no entry.
      • setVariable

        public ContentT setVariable​(int index,
                                    ContentT state,
                                    ContentT defaultState)
        Sets the indexth position of the variable array to state and returns state. If the array has to be extended, the added cells are padded with defaultState.
      • getStaticOrDefault

        public ContentT getStaticOrDefault​(java.lang.String fqn,
                                           ContentT defaultState)
        Returns an abstract state representing the static field fqn or defaultState if there is no entry.
      • setStatic

        public void setStatic​(java.lang.String fqn,
                              ContentT value,
                              ContentT defaultState)
        Sets the static field fqn to value, unless the value is defaultState.
      • getFieldOrDefault

        public <T> ContentT getFieldOrDefault​(T object,
                                              java.lang.String descriptor,
                                              ContentT defaultValue)
        Returns an abstract state representing the field descriptor of the object or defaultState if there is no entry.
      • getFieldOrDefault

        public <T> ContentT getFieldOrDefault​(T object,
                                              ContentT defaultValue)
        Returns an abstract state representing the default field of the object or defaultState if there is no entry.
      • setField

        public <T> void setField​(T object,
                                 java.lang.String descriptor,
                                 ContentT value)
        Sets the field descriptor of the object to value.
      • setField

        public <T> void setField​(T object,
                                 ContentT value)
        Sets the default field of the object to value.
      • getStaticFields

        public MapAbstractState<java.lang.String,​ContentT> getStaticFields()
        Returns the static field table abstract state.
      • newArray

        public ContentT newArray​(java.lang.String type,
                                 java.util.List<ContentT> dimensions)
        Returns an abstract state for a new array for the given type and dimentions.
      • newObject

        public ContentT newObject​(java.lang.String className)
        Returns an abstract state for a new object of the given className.
      • newObject

        public ContentT newObject​(Clazz clazz)
        Returns an abstract state for a new object of the given Clazz.
      • getArrayElementOrDefault

        public <T> ContentT getArrayElementOrDefault​(T array,
                                                     ContentT index,
                                                     ContentT abstractDefault)
        Returns an abstract state for the array element at the given index or the abstractDefault if there is no information available.
      • setArrayElement

        public <T> void setArrayElement​(T array,
                                        ContentT index,
                                        ContentT value)
        Sets the array element at the given index to the value.