Package proguard.analysis.cpa.defaults
Class StackAbstractState<AbstractSpaceT extends AbstractState<AbstractSpaceT>>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.Vector<E>
-
- java.util.Stack<AbstractSpaceT>
-
- proguard.analysis.cpa.defaults.StackAbstractState<AbstractSpaceT>
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.lang.Iterable<AbstractSpaceT>
,java.util.Collection<AbstractSpaceT>
,java.util.List<AbstractSpaceT>
,java.util.RandomAccess
,AbstractState<StackAbstractState<AbstractSpaceT>>
public class StackAbstractState<AbstractSpaceT extends AbstractState<AbstractSpaceT>> extends java.util.Stack<AbstractSpaceT> implements AbstractState<StackAbstractState<AbstractSpaceT>>
ThisStackAbstractState
represents a stack ofAbstractState
s with the semilattice operators lifted to the stack.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description StackAbstractState()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StackAbstractState<AbstractSpaceT>
copy()
Creates a copy of itself.boolean
isLessOrEqual(StackAbstractState<AbstractSpaceT> abstractState)
Compares itself to theabstractState
(i.e., compare the states on the partial order provided by the domain of the analysis).StackAbstractState<AbstractSpaceT>
join(StackAbstractState<AbstractSpaceT> abstractState)
Computes a join over itself and another abstract stateabstractState
(i.e., finds the least upper bound on the semilattice).AbstractSpaceT
peek(int index)
Returns theindex
th element from the top of the stack.AbstractSpaceT
peekOrDefault(int index, AbstractSpaceT defaultState)
Returns theindex
th element from the top of the stack.AbstractSpaceT
popOrDefault(AbstractSpaceT defaultState)
Removes the top of the stack and returns it.-
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, forEach, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeIf, removeRange, replaceAll, retainAll, set, setElementAt, setSize, size, sort, spliterator, subList, toArray, toArray, toString, trimToSize
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface proguard.analysis.cpa.interfaces.AbstractState
equals, getPrecision, hashCode, isLess
-
-
-
-
Method Detail
-
join
public StackAbstractState<AbstractSpaceT> join(StackAbstractState<AbstractSpaceT> abstractState)
Description copied from interface:AbstractState
Computes a join over itself and another abstract stateabstractState
(i.e., finds the least upper bound on the semilattice).- Specified by:
join
in interfaceAbstractState<AbstractSpaceT extends AbstractState<AbstractSpaceT>>
-
isLessOrEqual
public boolean isLessOrEqual(StackAbstractState<AbstractSpaceT> abstractState)
Description copied from interface:AbstractState
Compares itself to theabstractState
(i.e., compare the states on the partial order provided by the domain of the analysis).- Specified by:
isLessOrEqual
in interfaceAbstractState<AbstractSpaceT extends AbstractState<AbstractSpaceT>>
-
copy
public StackAbstractState<AbstractSpaceT> copy()
Description copied from interface:AbstractState
Creates a copy of itself.- Specified by:
copy
in interfaceAbstractState<AbstractSpaceT extends AbstractState<AbstractSpaceT>>
-
popOrDefault
public AbstractSpaceT popOrDefault(AbstractSpaceT defaultState)
Removes the top of the stack and returns it. If the stack is empty, it returns thedefaultState
.
-
peek
public AbstractSpaceT peek(int index)
Returns theindex
th element from the top of the stack. If the stack does not have enough elements, it throws an exception.
-
peekOrDefault
public AbstractSpaceT peekOrDefault(int index, AbstractSpaceT defaultState)
Returns theindex
th element from the top of the stack. If the stack does not have enough elements, it returns thedefaultState
.
-
-