@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 context.annotationPool.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; }