@Nonnull public static AnnotationsDirectory newOrEmpty(@Nonnull DexBackedDexFile dexFile, int directoryAnnotationsOffset) { if (directoryAnnotationsOffset == 0) { return EMPTY; } return new AnnotationsDirectoryImpl(dexFile, directoryAnnotationsOffset); }
@Nonnull public Set<? extends DexBackedAnnotation> getClassAnnotations() { return getAnnotations(dexFile, dexFile.readSmallUint(directoryOffset)); }
@Nonnull public AnnotationIterator getParameterAnnotationIterator() { int parameterAnnotationCount = getParameterAnnotationCount(); if (parameterAnnotationCount == 0) { return AnnotationIterator.EMPTY; } int fieldCount = getFieldAnnotationCount(); int methodCount = getMethodAnnotationCount(); int parameterAnnotationsOffset = directoryOffset + ANNOTATIONS_START_OFFSET + fieldCount * FIELD_ANNOTATION_SIZE + methodCount * METHOD_ANNOTATION_SIZE; return new AnnotationIteratorImpl(parameterAnnotationsOffset, parameterAnnotationCount); }
@Nonnull public Set<? extends DexBackedAnnotation> getClassAnnotations() { return getAnnotations(dexFile, dexFile.readSmallUint(directoryOffset)); }
@Nonnull public AnnotationIterator getParameterAnnotationIterator() { int parameterAnnotationCount = getParameterAnnotationCount(); if (parameterAnnotationCount == 0) { return AnnotationIterator.EMPTY; } int fieldCount = getFieldAnnotationCount(); int methodCount = getMethodAnnotationCount(); int parameterAnnotationsOffset = directoryOffset + ANNOTATIONS_START_OFFSET + fieldCount * FIELD_ANNOTATION_SIZE + methodCount * METHOD_ANNOTATION_SIZE; return new AnnotationIteratorImpl(parameterAnnotationsOffset, parameterAnnotationCount); }
@Nonnull public AnnotationIterator getParameterAnnotationIterator() { int parameterAnnotationCount = getParameterAnnotationCount(); if (parameterAnnotationCount == 0) { return AnnotationIterator.EMPTY; } int fieldCount = getFieldAnnotationCount(); int methodCount = getMethodAnnotationCount(); int parameterAnnotationsOffset = directoryOffset + ANNOTATIONS_START_OFFSET + fieldCount * FIELD_ANNOTATION_SIZE + methodCount * METHOD_ANNOTATION_SIZE; return new AnnotationIteratorImpl(parameterAnnotationsOffset, parameterAnnotationCount); }
@Nonnull public AnnotationIterator getFieldAnnotationIterator() { int fieldAnnotationCount = getFieldAnnotationCount(); if (fieldAnnotationCount == 0) { return AnnotationIterator.EMPTY; } return new AnnotationIteratorImpl(directoryOffset + ANNOTATIONS_START_OFFSET, fieldAnnotationCount); }
@Nonnull public static AnnotationsDirectory newOrEmpty(@Nonnull DexBackedDexFile dexFile, int directoryAnnotationsOffset) { if (directoryAnnotationsOffset == 0) { return EMPTY; } return new AnnotationsDirectoryImpl(dexFile, directoryAnnotationsOffset); }
@Nonnull public AnnotationIterator getMethodAnnotationIterator() { int methodCount = getMethodAnnotationCount(); if (methodCount == 0) { return AnnotationIterator.EMPTY; } int fieldCount = getFieldAnnotationCount(); int methodAnnotationsOffset = directoryOffset + ANNOTATIONS_START_OFFSET + fieldCount * FIELD_ANNOTATION_SIZE; return new AnnotationIteratorImpl(methodAnnotationsOffset, methodCount); }
@Nonnull public Set<? extends DexBackedAnnotation> getClassAnnotations() { return getAnnotations(dexFile, dexFile.readSmallUint(directoryOffset)); }
@Nonnull public AnnotationIterator getMethodAnnotationIterator() { int methodCount = getMethodAnnotationCount(); if (methodCount == 0) { return AnnotationIterator.EMPTY; } int fieldCount = getFieldAnnotationCount(); int methodAnnotationsOffset = directoryOffset + ANNOTATIONS_START_OFFSET + fieldCount * FIELD_ANNOTATION_SIZE; return new AnnotationIteratorImpl(methodAnnotationsOffset, methodCount); }
@Nonnull public AnnotationIterator getFieldAnnotationIterator() { int fieldAnnotationCount = getFieldAnnotationCount(); if (fieldAnnotationCount == 0) { return AnnotationIterator.EMPTY; } return new AnnotationIteratorImpl(directoryOffset + ANNOTATIONS_START_OFFSET, fieldAnnotationCount); }
@Nonnull public static AnnotationsDirectory newOrEmpty(@Nonnull DexBackedDexFile dexFile, int directoryAnnotationsOffset) { if (directoryAnnotationsOffset == 0) { return EMPTY; } return new AnnotationsDirectoryImpl(dexFile, directoryAnnotationsOffset); }
@Nonnull public AnnotationIterator getFieldAnnotationIterator() { int fieldAnnotationCount = getFieldAnnotationCount(); if (fieldAnnotationCount == 0) { return AnnotationIterator.EMPTY; } return new AnnotationIteratorImpl(directoryOffset + ANNOTATIONS_START_OFFSET, fieldAnnotationCount); }
@Nonnull public AnnotationIterator getMethodAnnotationIterator() { int methodCount = getMethodAnnotationCount(); if (methodCount == 0) { return AnnotationIterator.EMPTY; } int fieldCount = getFieldAnnotationCount(); int methodAnnotationsOffset = directoryOffset + ANNOTATIONS_START_OFFSET + fieldCount * FIELD_ANNOTATION_SIZE; return new AnnotationIteratorImpl(methodAnnotationsOffset, methodCount); }