Package org.jf.dexlib2.dexbacked.util
Class AnnotationsDirectory.AnnotationsDirectoryImpl.AnnotationIteratorImpl
java.lang.Object
org.jf.dexlib2.dexbacked.util.AnnotationsDirectory.AnnotationsDirectoryImpl.AnnotationIteratorImpl
- All Implemented Interfaces:
AnnotationsDirectory.AnnotationIterator
- Enclosing class:
AnnotationsDirectory.AnnotationsDirectoryImpl
private class AnnotationsDirectory.AnnotationsDirectoryImpl.AnnotationIteratorImpl
extends Object
implements AnnotationsDirectory.AnnotationIterator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate intprivate final intprivate final intFields inherited from interface org.jf.dexlib2.dexbacked.util.AnnotationsDirectory.AnnotationIterator
EMPTY -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
startOffset
private final int startOffset -
size
private final int size -
currentIndex
private int currentIndex -
currentItemIndex
private int currentItemIndex
-
-
Constructor Details
-
AnnotationIteratorImpl
public AnnotationIteratorImpl(int startOffset, int size)
-
-
Method Details
-
seekTo
public int seekTo(int itemIndex) Description copied from interface:AnnotationsDirectory.AnnotationIteratorSeeks the iterator forward, to the first item whose key is >= the requested key. If the requested key value is less than that of the item that the iterator currently points to, it will not be moved forward. If an item with the requested key is found, the associated annotation offset is returned. Otherwise, 0 is returned.- Specified by:
seekToin interfaceAnnotationsDirectory.AnnotationIterator- Parameters:
itemIndex- The method/field index to search for- Returns:
- The annotation offset associated with the requested key, or 0 if not found.
-
reset
public void reset()Description copied from interface:AnnotationsDirectory.AnnotationIteratorResets the iterator to the beginning of its list.- Specified by:
resetin interfaceAnnotationsDirectory.AnnotationIterator
-