Class VariableSizeIterator<T>

java.lang.Object
org.jf.dexlib2.dexbacked.util.VariableSizeIterator<T>
All Implemented Interfaces:
Iterator<T>

public abstract class VariableSizeIterator<T> extends Object implements Iterator<T>
  • Field Details

    • reader

      @Nonnull private final DexReader reader
    • size

      protected final int size
    • index

      private int index
  • Constructor Details

    • VariableSizeIterator

      protected VariableSizeIterator(@Nonnull DexBuffer buffer, int offset, int size)
    • VariableSizeIterator

      protected VariableSizeIterator(@Nonnull DexReader reader, int size)
  • Method Details

    • readNextItem

      protected abstract T readNextItem(@Nonnull DexReader reader, int index)
      Reads the next item from reader.
      Parameters:
      reader - The DexReader to read the next item from
      index - The index of the item being read. This is guaranteed to be less than size
      Returns:
      The item that was read
    • getReaderOffset

      public int getReaderOffset()
    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<T>
    • next

      public T next()
      Specified by:
      next in interface Iterator<T>
    • remove

      public void remove()
      Specified by:
      remove in interface Iterator<T>