Java Code Examples for org.jf.dexlib2.dexbacked.util.AnnotationsDirectory#AnnotationIterator

The following examples show how to use org.jf.dexlib2.dexbacked.util.AnnotationsDirectory#AnnotationIterator . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DexBackedField.java    From ZjDroid with Apache License 2.0 6 votes vote down vote up
public DexBackedField(@Nonnull DexReader reader,
                      @Nonnull DexBackedClassDef classDef,
                      int previousFieldIndex,
                      @Nonnull StaticInitialValueIterator staticInitialValueIterator,
                      @Nonnull AnnotationsDirectory.AnnotationIterator annotationIterator) {
    this.dexFile = reader.dexBuf;
    this.classDef = classDef;

    // large values may be used for the index delta, which cause the cumulative index to overflow upon
    // addition, effectively allowing out of order entries.
    int fieldIndexDiff = reader.readLargeUleb128();
    this.fieldIndex = fieldIndexDiff + previousFieldIndex;
    this.accessFlags = reader.readSmallUleb128();

    this.annotationSetOffset = annotationIterator.seekTo(fieldIndex);
    this.initialValue = staticInitialValueIterator.getNextOrNull();
}
 
Example 2
Source File: DexBackedField.java    From ZjDroid with Apache License 2.0 6 votes vote down vote up
public DexBackedField(@Nonnull DexReader reader,
                      @Nonnull DexBackedClassDef classDef,
                      int previousFieldIndex,
                      @Nonnull AnnotationsDirectory.AnnotationIterator annotationIterator) {
    this.dexFile = reader.dexBuf;
    this.classDef = classDef;

    // large values may be used for the index delta, which cause the cumulative index to overflow upon
    // addition, effectively allowing out of order entries.
    int fieldIndexDiff = reader.readLargeUleb128();
    this.fieldIndex = fieldIndexDiff + previousFieldIndex;
    this.accessFlags = reader.readSmallUleb128();

    this.annotationSetOffset = annotationIterator.seekTo(fieldIndex);
    this.initialValue = null;
}
 
Example 3
Source File: DexBackedMethod.java    From ZjDroid with Apache License 2.0 6 votes vote down vote up
public DexBackedMethod(@Nonnull DexReader reader,
                       @Nonnull DexBackedClassDef classDef,
                       int previousMethodIndex,
                       @Nonnull AnnotationsDirectory.AnnotationIterator methodAnnotationIterator,
                       @Nonnull AnnotationsDirectory.AnnotationIterator paramaterAnnotationIterator) {
    this.dexFile = reader.dexBuf;
    this.classDef = classDef;

    // large values may be used for the index delta, which cause the cumulative index to overflow upon
    // addition, effectively allowing out of order entries.
    int methodIndexDiff = reader.readLargeUleb128();
    this.methodIndex = methodIndexDiff + previousMethodIndex;
    this.accessFlags = reader.readSmallUleb128();
    
    //undo this data is error, the code 
    this.codeOffset = reader.readSmallUleb128();
    //end
    this.methodAnnotationSetOffset = methodAnnotationIterator.seekTo(methodIndex);
    this.parameterAnnotationSetListOffset = paramaterAnnotationIterator.seekTo(methodIndex);
}
 
Example 4
Source File: DexBackedField.java    From zjdroid with Apache License 2.0 6 votes vote down vote up
public DexBackedField(@Nonnull DexReader reader,
                      @Nonnull DexBackedClassDef classDef,
                      int previousFieldIndex,
                      @Nonnull StaticInitialValueIterator staticInitialValueIterator,
                      @Nonnull AnnotationsDirectory.AnnotationIterator annotationIterator) {
    this.dexFile = reader.dexBuf;
    this.classDef = classDef;

    // large values may be used for the index delta, which cause the cumulative index to overflow upon
    // addition, effectively allowing out of order entries.
    int fieldIndexDiff = reader.readLargeUleb128();
    this.fieldIndex = fieldIndexDiff + previousFieldIndex;
    this.accessFlags = reader.readSmallUleb128();

    this.annotationSetOffset = annotationIterator.seekTo(fieldIndex);
    this.initialValue = staticInitialValueIterator.getNextOrNull();
}
 
Example 5
Source File: DexBackedField.java    From zjdroid with Apache License 2.0 6 votes vote down vote up
public DexBackedField(@Nonnull DexReader reader,
                      @Nonnull DexBackedClassDef classDef,
                      int previousFieldIndex,
                      @Nonnull AnnotationsDirectory.AnnotationIterator annotationIterator) {
    this.dexFile = reader.dexBuf;
    this.classDef = classDef;

    // large values may be used for the index delta, which cause the cumulative index to overflow upon
    // addition, effectively allowing out of order entries.
    int fieldIndexDiff = reader.readLargeUleb128();
    this.fieldIndex = fieldIndexDiff + previousFieldIndex;
    this.accessFlags = reader.readSmallUleb128();

    this.annotationSetOffset = annotationIterator.seekTo(fieldIndex);
    this.initialValue = null;
}
 
Example 6
Source File: DexBackedMethod.java    From zjdroid with Apache License 2.0 6 votes vote down vote up
public DexBackedMethod(@Nonnull DexReader reader,
                       @Nonnull DexBackedClassDef classDef,
                       int previousMethodIndex,
                       @Nonnull AnnotationsDirectory.AnnotationIterator methodAnnotationIterator,
                       @Nonnull AnnotationsDirectory.AnnotationIterator paramaterAnnotationIterator) {
    this.dexFile = reader.dexBuf;
    this.classDef = classDef;

    // large values may be used for the index delta, which cause the cumulative index to overflow upon
    // addition, effectively allowing out of order entries.
    int methodIndexDiff = reader.readLargeUleb128();
    this.methodIndex = methodIndexDiff + previousMethodIndex;
    this.accessFlags = reader.readSmallUleb128();
    
    //undo this data is error, the code 
    this.codeOffset = reader.readSmallUleb128();
    //end
    this.methodAnnotationSetOffset = methodAnnotationIterator.seekTo(methodIndex);
    this.parameterAnnotationSetListOffset = paramaterAnnotationIterator.seekTo(methodIndex);
}
 
Example 7
Source File: DexBackedField.java    From HeyGirl with Apache License 2.0 6 votes vote down vote up
public DexBackedField(@Nonnull DexReader reader,
                      @Nonnull DexBackedClassDef classDef,
                      int previousFieldIndex,
                      @Nonnull StaticInitialValueIterator staticInitialValueIterator,
                      @Nonnull AnnotationsDirectory.AnnotationIterator annotationIterator) {
    this.dexFile = reader.dexBuf;
    this.classDef = classDef;

    // large values may be used for the index delta, which cause the cumulative index to overflow upon
    // addition, effectively allowing out of order entries.
    int fieldIndexDiff = reader.readLargeUleb128();
    this.fieldIndex = fieldIndexDiff + previousFieldIndex;
    this.accessFlags = reader.readSmallUleb128();

    this.annotationSetOffset = annotationIterator.seekTo(fieldIndex);
    this.initialValue = staticInitialValueIterator.getNextOrNull();
}
 
Example 8
Source File: DexBackedField.java    From HeyGirl with Apache License 2.0 6 votes vote down vote up
public DexBackedField(@Nonnull DexReader reader,
                      @Nonnull DexBackedClassDef classDef,
                      int previousFieldIndex,
                      @Nonnull AnnotationsDirectory.AnnotationIterator annotationIterator) {
    this.dexFile = reader.dexBuf;
    this.classDef = classDef;

    // large values may be used for the index delta, which cause the cumulative index to overflow upon
    // addition, effectively allowing out of order entries.
    int fieldIndexDiff = reader.readLargeUleb128();
    this.fieldIndex = fieldIndexDiff + previousFieldIndex;
    this.accessFlags = reader.readSmallUleb128();

    this.annotationSetOffset = annotationIterator.seekTo(fieldIndex);
    this.initialValue = null;
}
 
Example 9
Source File: DexBackedMethod.java    From HeyGirl with Apache License 2.0 6 votes vote down vote up
public DexBackedMethod(@Nonnull DexReader reader,
                       @Nonnull DexBackedClassDef classDef,
                       int previousMethodIndex,
                       @Nonnull AnnotationsDirectory.AnnotationIterator methodAnnotationIterator,
                       @Nonnull AnnotationsDirectory.AnnotationIterator paramaterAnnotationIterator) {
    this.dexFile = reader.dexBuf;
    this.classDef = classDef;

    // large values may be used for the index delta, which cause the cumulative index to overflow upon
    // addition, effectively allowing out of order entries.
    int methodIndexDiff = reader.readLargeUleb128();
    this.methodIndex = methodIndexDiff + previousMethodIndex;
    this.accessFlags = reader.readSmallUleb128();
    
    //undo this data is error, the code 
    this.codeOffset = reader.readSmallUleb128();
    //end
    this.methodAnnotationSetOffset = methodAnnotationIterator.seekTo(methodIndex);
    this.parameterAnnotationSetListOffset = paramaterAnnotationIterator.seekTo(methodIndex);
}
 
Example 10
Source File: DexBackedField.java    From ZjDroid with Apache License 2.0 6 votes vote down vote up
public DexBackedField(@Nonnull DexReader reader,
                      @Nonnull DexBackedClassDef classDef,
                      int previousFieldIndex,
                      @Nonnull StaticInitialValueIterator staticInitialValueIterator,
                      @Nonnull AnnotationsDirectory.AnnotationIterator annotationIterator) {
    this.dexFile = reader.dexBuf;
    this.classDef = classDef;

    // large values may be used for the index delta, which cause the cumulative index to overflow upon
    // addition, effectively allowing out of order entries.
    int fieldIndexDiff = reader.readLargeUleb128();
    this.fieldIndex = fieldIndexDiff + previousFieldIndex;
    this.accessFlags = reader.readSmallUleb128();

    this.annotationSetOffset = annotationIterator.seekTo(fieldIndex);
    this.initialValue = staticInitialValueIterator.getNextOrNull();
}
 
Example 11
Source File: DexBackedField.java    From ZjDroid with Apache License 2.0 6 votes vote down vote up
public DexBackedField(@Nonnull DexReader reader,
                      @Nonnull DexBackedClassDef classDef,
                      int previousFieldIndex,
                      @Nonnull AnnotationsDirectory.AnnotationIterator annotationIterator) {
    this.dexFile = reader.dexBuf;
    this.classDef = classDef;

    // large values may be used for the index delta, which cause the cumulative index to overflow upon
    // addition, effectively allowing out of order entries.
    int fieldIndexDiff = reader.readLargeUleb128();
    this.fieldIndex = fieldIndexDiff + previousFieldIndex;
    this.accessFlags = reader.readSmallUleb128();

    this.annotationSetOffset = annotationIterator.seekTo(fieldIndex);
    this.initialValue = null;
}
 
Example 12
Source File: DexBackedMethod.java    From ZjDroid with Apache License 2.0 6 votes vote down vote up
public DexBackedMethod(@Nonnull DexReader reader,
                       @Nonnull DexBackedClassDef classDef,
                       int previousMethodIndex,
                       @Nonnull AnnotationsDirectory.AnnotationIterator methodAnnotationIterator,
                       @Nonnull AnnotationsDirectory.AnnotationIterator paramaterAnnotationIterator) {
    this.dexFile = reader.dexBuf;
    this.classDef = classDef;

    // large values may be used for the index delta, which cause the cumulative index to overflow upon
    // addition, effectively allowing out of order entries.
    int methodIndexDiff = reader.readLargeUleb128();
    this.methodIndex = methodIndexDiff + previousMethodIndex;
    this.accessFlags = reader.readSmallUleb128();
    
    //undo this data is error, the code 
    this.codeOffset = reader.readSmallUleb128();
    //end
    this.methodAnnotationSetOffset = methodAnnotationIterator.seekTo(methodIndex);
    this.parameterAnnotationSetListOffset = paramaterAnnotationIterator.seekTo(methodIndex);
}