org.jf.dexlib2.dexbacked.DexBackedAnnotation Java Examples

The following examples show how to use org.jf.dexlib2.dexbacked.DexBackedAnnotation. 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: AnnotationsDirectory.java    From ZjDroid with Apache License 2.0 6 votes vote down vote up
@Nonnull
public static Set<? extends DexBackedAnnotation> getAnnotations(@Nonnull final DexBackedDexFile dexFile,
                                                                 final int annotationSetOffset) {
    if (annotationSetOffset != 0) {
        final int size = dexFile.readSmallUint(annotationSetOffset);
        return new FixedSizeSet<DexBackedAnnotation>() {
            @Nonnull
            @Override
            public DexBackedAnnotation readItem(int index) {
                int annotationOffset = dexFile.readSmallUint(annotationSetOffset + 4 + (4*index));
                return new DexBackedAnnotation(dexFile, annotationOffset);
            }

            @Override public int size() { return size; }
        };
    }

    return ImmutableSet.of();
}
 
Example #2
Source File: AnnotationsDirectory.java    From ZjDroid with Apache License 2.0 6 votes vote down vote up
@Nonnull
public static List<Set<? extends DexBackedAnnotation>> getParameterAnnotations(
        @Nonnull final DexBackedDexFile dexFile, final int annotationSetListOffset) {
    if (annotationSetListOffset > 0) {
        final int size = dexFile.readSmallUint(annotationSetListOffset);

        return new FixedSizeList<Set<? extends DexBackedAnnotation>>() {
            @Nonnull
            @Override
            public Set<? extends DexBackedAnnotation> readItem(int index) {
                int annotationSetOffset = dexFile.readSmallUint(annotationSetListOffset + 4 + index * 4);
                return getAnnotations(dexFile, annotationSetOffset);
            }

            @Override public int size() { return size; }
        };
    }
    return ImmutableList.of();
}
 
Example #3
Source File: AnnotationsDirectory.java    From ZjDroid with Apache License 2.0 6 votes vote down vote up
@Nonnull
public static List<Set<? extends DexBackedAnnotation>> getParameterAnnotations(
        @Nonnull final DexBackedDexFile dexFile, final int annotationSetListOffset) {
    if (annotationSetListOffset > 0) {
        final int size = dexFile.readSmallUint(annotationSetListOffset);

        return new FixedSizeList<Set<? extends DexBackedAnnotation>>() {
            @Nonnull
            @Override
            public Set<? extends DexBackedAnnotation> readItem(int index) {
                int annotationSetOffset = dexFile.readSmallUint(annotationSetListOffset + 4 + index * 4);
                return getAnnotations(dexFile, annotationSetOffset);
            }

            @Override public int size() { return size; }
        };
    }
    return ImmutableList.of();
}
 
Example #4
Source File: AnnotationsDirectory.java    From ZjDroid with Apache License 2.0 6 votes vote down vote up
@Nonnull
public static Set<? extends DexBackedAnnotation> getAnnotations(@Nonnull final DexBackedDexFile dexFile,
                                                                 final int annotationSetOffset) {
    if (annotationSetOffset != 0) {
        final int size = dexFile.readSmallUint(annotationSetOffset);
        return new FixedSizeSet<DexBackedAnnotation>() {
            @Nonnull
            @Override
            public DexBackedAnnotation readItem(int index) {
                int annotationOffset = dexFile.readSmallUint(annotationSetOffset + 4 + (4*index));
                return new DexBackedAnnotation(dexFile, annotationOffset);
            }

            @Override public int size() { return size; }
        };
    }

    return ImmutableSet.of();
}
 
Example #5
Source File: AnnotationsDirectory.java    From zjdroid with Apache License 2.0 6 votes vote down vote up
@Nonnull
public static Set<? extends DexBackedAnnotation> getAnnotations(@Nonnull final DexBackedDexFile dexFile,
                                                                 final int annotationSetOffset) {
    if (annotationSetOffset != 0) {
        final int size = dexFile.readSmallUint(annotationSetOffset);
        return new FixedSizeSet<DexBackedAnnotation>() {
            @Nonnull
            @Override
            public DexBackedAnnotation readItem(int index) {
                int annotationOffset = dexFile.readSmallUint(annotationSetOffset + 4 + (4*index));
                return new DexBackedAnnotation(dexFile, annotationOffset);
            }

            @Override public int size() { return size; }
        };
    }

    return ImmutableSet.of();
}
 
Example #6
Source File: AnnotationsDirectory.java    From zjdroid with Apache License 2.0 6 votes vote down vote up
@Nonnull
public static List<Set<? extends DexBackedAnnotation>> getParameterAnnotations(
        @Nonnull final DexBackedDexFile dexFile, final int annotationSetListOffset) {
    if (annotationSetListOffset > 0) {
        final int size = dexFile.readSmallUint(annotationSetListOffset);

        return new FixedSizeList<Set<? extends DexBackedAnnotation>>() {
            @Nonnull
            @Override
            public Set<? extends DexBackedAnnotation> readItem(int index) {
                int annotationSetOffset = dexFile.readSmallUint(annotationSetListOffset + 4 + index * 4);
                return getAnnotations(dexFile, annotationSetOffset);
            }

            @Override public int size() { return size; }
        };
    }
    return ImmutableList.of();
}
 
Example #7
Source File: AnnotationsDirectory.java    From HeyGirl with Apache License 2.0 6 votes vote down vote up
@Nonnull
public static Set<? extends DexBackedAnnotation> getAnnotations(@Nonnull final DexBackedDexFile dexFile,
                                                                 final int annotationSetOffset) {
    if (annotationSetOffset != 0) {
        final int size = dexFile.readSmallUint(annotationSetOffset);
        return new FixedSizeSet<DexBackedAnnotation>() {
            @Nonnull
            @Override
            public DexBackedAnnotation readItem(int index) {
                int annotationOffset = dexFile.readSmallUint(annotationSetOffset + 4 + (4*index));
                return new DexBackedAnnotation(dexFile, annotationOffset);
            }

            @Override public int size() { return size; }
        };
    }

    return ImmutableSet.of();
}
 
Example #8
Source File: AnnotationsDirectory.java    From HeyGirl with Apache License 2.0 6 votes vote down vote up
@Nonnull
public static List<Set<? extends DexBackedAnnotation>> getParameterAnnotations(
        @Nonnull final DexBackedDexFile dexFile, final int annotationSetListOffset) {
    if (annotationSetListOffset > 0) {
        final int size = dexFile.readSmallUint(annotationSetListOffset);

        return new FixedSizeList<Set<? extends DexBackedAnnotation>>() {
            @Nonnull
            @Override
            public Set<? extends DexBackedAnnotation> readItem(int index) {
                int annotationSetOffset = dexFile.readSmallUint(annotationSetListOffset + 4 + index * 4);
                return getAnnotations(dexFile, annotationSetOffset);
            }

            @Override public int size() { return size; }
        };
    }
    return ImmutableList.of();
}
 
Example #9
Source File: AnnotationsDirectory.java    From ZjDroid with Apache License 2.0 4 votes vote down vote up
@Nonnull
public Set<? extends DexBackedAnnotation> getClassAnnotations() {
    return getAnnotations(dexFile, dexFile.readSmallUint(directoryOffset));
}
 
Example #10
Source File: AnnotationsDirectory.java    From ZjDroid with Apache License 2.0 4 votes vote down vote up
@Nonnull
public Set<? extends DexBackedAnnotation> getClassAnnotations() {
    return getAnnotations(dexFile, dexFile.readSmallUint(directoryOffset));
}
 
Example #11
Source File: AnnotationsDirectory.java    From zjdroid with Apache License 2.0 4 votes vote down vote up
@Nonnull
public Set<? extends DexBackedAnnotation> getClassAnnotations() {
    return getAnnotations(dexFile, dexFile.readSmallUint(directoryOffset));
}
 
Example #12
Source File: AnnotationsDirectory.java    From HeyGirl with Apache License 2.0 4 votes vote down vote up
@Nonnull
public Set<? extends DexBackedAnnotation> getClassAnnotations() {
    return getAnnotations(dexFile, dexFile.readSmallUint(directoryOffset));
}
 
Example #13
Source File: AnnotationsDirectory.java    From HeyGirl with Apache License 2.0 votes vote down vote up
@Nonnull @Override public Set<? extends DexBackedAnnotation> getClassAnnotations() { return ImmutableSet.of(); } 
Example #14
Source File: AnnotationsDirectory.java    From ZjDroid with Apache License 2.0 votes vote down vote up
@Nonnull public abstract Set<? extends DexBackedAnnotation> getClassAnnotations(); 
Example #15
Source File: AnnotationsDirectory.java    From ZjDroid with Apache License 2.0 votes vote down vote up
@Nonnull @Override public Set<? extends DexBackedAnnotation> getClassAnnotations() { return ImmutableSet.of(); } 
Example #16
Source File: AnnotationsDirectory.java    From HeyGirl with Apache License 2.0 votes vote down vote up
@Nonnull public abstract Set<? extends DexBackedAnnotation> getClassAnnotations(); 
Example #17
Source File: AnnotationsDirectory.java    From ZjDroid with Apache License 2.0 votes vote down vote up
@Nonnull @Override public Set<? extends DexBackedAnnotation> getClassAnnotations() { return ImmutableSet.of(); } 
Example #18
Source File: AnnotationsDirectory.java    From zjdroid with Apache License 2.0 votes vote down vote up
@Nonnull public abstract Set<? extends DexBackedAnnotation> getClassAnnotations(); 
Example #19
Source File: AnnotationsDirectory.java    From zjdroid with Apache License 2.0 votes vote down vote up
@Nonnull @Override public Set<? extends DexBackedAnnotation> getClassAnnotations() { return ImmutableSet.of(); } 
Example #20
Source File: AnnotationsDirectory.java    From ZjDroid with Apache License 2.0 votes vote down vote up
@Nonnull public abstract Set<? extends DexBackedAnnotation> getClassAnnotations();