@Nullable @Override public BuilderAnnotationSet getFieldAnnotations(@Nonnull BuilderField builderField) { if (builderField.annotations.isEmpty()) { return null; } return builderField.annotations; }
@Nonnull public BuilderAnnotationSet internAnnotationSet(@Nullable Set<? extends Annotation> annotations) { if (annotations == null) { return BuilderAnnotationSet.EMPTY; } BuilderAnnotationSet ret = internedItems.get(annotations); if (ret != null) { return ret; } BuilderAnnotationSet annotationSet = new BuilderAnnotationSet( ImmutableSet.copyOf(Iterators.transform(annotations.iterator(), new Function<Annotation, BuilderAnnotation>() { @Nullable @Override public BuilderAnnotation apply(Annotation input) { return dexBuilder.annotationSection.internAnnotation(input); } }))); ret = internedItems.putIfAbsent(annotationSet, annotationSet); return ret==null?annotationSet:ret; }
@Nonnull public BuilderAnnotationSet internAnnotationSet(@Nullable Set<? extends Annotation> annotations) { if (annotations == null) { return BuilderAnnotationSet.EMPTY; } BuilderAnnotationSet ret = internedItems.get(annotations); if (ret != null) { return ret; } BuilderAnnotationSet annotationSet = new BuilderAnnotationSet( ImmutableSet.copyOf(Iterators.transform(annotations.iterator(), new Function<Annotation, BuilderAnnotation>() { @Nullable @Override public BuilderAnnotation apply(Annotation input) { return dexBuilder.annotationSection.internAnnotation(input); } }))); ret = internedItems.putIfAbsent(annotationSet, annotationSet); return ret==null?annotationSet:ret; }
@Nullable @Override public BuilderAnnotationSet getClassAnnotations(@Nonnull BuilderClassDef builderClassDef) { if (builderClassDef.annotations.isEmpty()) { return null; } return builderClassDef.annotations; }
@Nonnull public BuilderAnnotationSet internAnnotationSet(@Nullable Set<? extends Annotation> annotations) { if (annotations == null) { return BuilderAnnotationSet.EMPTY; } BuilderAnnotationSet ret = internedItems.get(annotations); if (ret != null) { return ret; } BuilderAnnotationSet annotationSet = new BuilderAnnotationSet( ImmutableSet.copyOf(Iterators.transform(annotations.iterator(), new Function<Annotation, BuilderAnnotation>() { @Nullable @Override public BuilderAnnotation apply(Annotation input) { return context.annotationPool.internAnnotation(input); } }))); ret = internedItems.putIfAbsent(annotationSet, annotationSet); return ret==null?annotationSet:ret; }
@Nullable @Override public BuilderAnnotationSet getClassAnnotations(@Nonnull BuilderClassDef builderClassDef) { if (builderClassDef.annotations.isEmpty()) { return null; } return builderClassDef.annotations; }
@Nullable @Override public BuilderAnnotationSet getMethodAnnotations(@Nonnull BuilderMethod builderMethod) { if (builderMethod.annotations.isEmpty()) { return null; } return builderMethod.annotations; }
@Nullable @Override public BuilderAnnotationSet getMethodAnnotations(@Nonnull BuilderMethod builderMethod) { if (builderMethod.annotations.isEmpty()) { return null; } return builderMethod.annotations; }
@Nullable @Override public BuilderAnnotationSet getFieldAnnotations(@Nonnull BuilderField builderField) { if (builderField.annotations.isEmpty()) { return null; } return builderField.annotations; }
@Nullable @Override public BuilderAnnotationSet getClassAnnotations(@Nonnull BuilderClassDef builderClassDef) { if (builderClassDef.annotations.isEmpty()) { return null; } return builderClassDef.annotations; }
@Nullable @Override public BuilderAnnotationSet getFieldAnnotations(@Nonnull BuilderField builderField) { if (builderField.annotations.isEmpty()) { return null; } return builderField.annotations; }
@Nullable @Override public BuilderAnnotationSet getMethodAnnotations(@Nonnull BuilderMethod builderMethod) { if (builderMethod.annotations.isEmpty()) { return null; } return builderMethod.annotations; }