public AbstractInsnNode get ( final int index ) { if ( index < 0 || index >= size ) { throw new IndexOutOfBoundsException ( ) ; } if ( cache == null ) { cache = toArray ( ) ; } return cache [ index ] ; }
Returns the instruction whose index is given . This method builds a cache of the instructions in this list to avoid scanning the whole list each time it is called . Once the cache is built this method run in constant time . This cache is invalidated by all the methods that modify the list .