< prev index next >

src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/InsnList.java

Print this page




 188     public void accept(final MethodVisitor mv) {
 189         AbstractInsnNode insn = first;
 190         while (insn != null) {
 191             insn.accept(mv);
 192             insn = insn.next;
 193         }
 194     }
 195 
 196     /**
 197      * Returns an iterator over the instructions in this list.
 198      *
 199      * @return an iterator over the instructions in this list.
 200      */
 201     public ListIterator<AbstractInsnNode> iterator() {
 202         return iterator(0);
 203     }
 204 
 205     /**
 206      * Returns an iterator over the instructions in this list.
 207      *



 208      * @return an iterator over the instructions in this list.
 209      */
 210     @SuppressWarnings("unchecked")
 211     public ListIterator<AbstractInsnNode> iterator(int index) {
 212         return new InsnListIterator(index);
 213     }
 214 
 215     /**
 216      * Returns an array containing all of the instructions in this list.
 217      *
 218      * @return an array containing all of the instructions in this list.
 219      */
 220     public AbstractInsnNode[] toArray() {
 221         int i = 0;
 222         AbstractInsnNode elem = first;
 223         AbstractInsnNode[] insns = new AbstractInsnNode[size];
 224         while (elem != null) {
 225             insns[i] = elem;
 226             elem.index = i++;
 227             elem = elem.next;




 188     public void accept(final MethodVisitor mv) {
 189         AbstractInsnNode insn = first;
 190         while (insn != null) {
 191             insn.accept(mv);
 192             insn = insn.next;
 193         }
 194     }
 195 
 196     /**
 197      * Returns an iterator over the instructions in this list.
 198      *
 199      * @return an iterator over the instructions in this list.
 200      */
 201     public ListIterator<AbstractInsnNode> iterator() {
 202         return iterator(0);
 203     }
 204 
 205     /**
 206      * Returns an iterator over the instructions in this list.
 207      *
 208      * @param index
 209      *            index of instruction for the iterator to start at
 210      *
 211      * @return an iterator over the instructions in this list.
 212      */
 213     @SuppressWarnings("unchecked")
 214     public ListIterator<AbstractInsnNode> iterator(int index) {
 215         return new InsnListIterator(index);
 216     }
 217 
 218     /**
 219      * Returns an array containing all of the instructions in this list.
 220      *
 221      * @return an array containing all of the instructions in this list.
 222      */
 223     public AbstractInsnNode[] toArray() {
 224         int i = 0;
 225         AbstractInsnNode elem = first;
 226         AbstractInsnNode[] insns = new AbstractInsnNode[size];
 227         while (elem != null) {
 228             insns[i] = elem;
 229             elem.index = i++;
 230             elem = elem.next;


< prev index next >