/** * * @param annotation * @return the qualifier instance for the given annotation, uses cache if possible */ public QualifierInstance getQualifierInstance(final Annotation annotation) { return isCacheAllowed(annotation) ? qualifierInstanceCache.getValue(annotation) : QualifierInstance.of(annotation, this); }
/** * * @param annotation * @return the qualifier instance for the given annotation, uses cache if possible */ public QualifierInstance getQualifierInstance(final Annotation annotation) { return isCacheAllowed(annotation) ? qualifierInstanceCache.getValue(annotation) : QualifierInstance.of(annotation, this); }
/** * * @param annotation * @return the qualifier instance for the given annotation, uses cache if possible */ public QualifierInstance getQualifierInstance(final Annotation annotation) { return isCacheAllowed(annotation) ? qualifierInstanceCache.getValue(annotation) : QualifierInstance.of(annotation, this); }
/** * * @param annotation * @return the qualifier instance for the given annotation, uses cache if possible */ public QualifierInstance getQualifierInstance(final Annotation annotation) { return isCacheAllowed(annotation) ? qualifierInstanceCache.getValue(annotation) : QualifierInstance.of(annotation, this); }
/** * * @param annotation * @return the qualifier instance for the given annotation, uses cache if possible */ public QualifierInstance getQualifierInstance(final Annotation annotation) { return isCacheAllowed(annotation) ? qualifierInstanceCache.getValue(annotation) : QualifierInstance.of(annotation, this); }
/** * * @param annotation * @return the qualifier instance for the given annotation, uses cache if possible */ public QualifierInstance getQualifierInstance(final Annotation annotation) { return isCacheAllowed(annotation) ? qualifierInstanceCache.getValue(annotation) : QualifierInstance.of(annotation, this); }
/** * * @param annotations * @return the set of qualifier instances, uses caches if possible */ public Set<QualifierInstance> getQualifierInstances(final Set<Annotation> annotations) { if (annotations == null || annotations.isEmpty()) { return Collections.emptySet(); } ImmutableSet.Builder<QualifierInstance> builder = ImmutableSet.builder(); boolean useSharedCache = true; for (Annotation annotation : annotations) { if (isCacheAllowed(annotation)) { builder.add(qualifierInstanceCache.getValue(annotation)); } else { builder.add(QualifierInstance.of(annotation, this)); // Don't use shared object cache if there's some qualifier instance which should not be cached useSharedCache = false; } } return useSharedCache ? sharedObjectCache.getSharedSet(builder.build()) : builder.build(); }
/** * * @param annotations * @return the set of qualifier instances, uses caches if possible */ public Set<QualifierInstance> getQualifierInstances(final Set<Annotation> annotations) { if (annotations == null || annotations.isEmpty()) { return Collections.emptySet(); } ImmutableSet.Builder<QualifierInstance> builder = ImmutableSet.builder(); boolean useSharedCache = true; for (Annotation annotation : annotations) { if (isCacheAllowed(annotation)) { builder.add(qualifierInstanceCache.getValue(annotation)); } else { builder.add(QualifierInstance.of(annotation, this)); // Don't use shared object cache if there's some qualifier instance which should not be cached useSharedCache = false; } } return useSharedCache ? sharedObjectCache.getSharedSet(builder.build()) : builder.build(); }
/** * * @param annotations * @return the set of qualifier instances, uses caches if possible */ public Set<QualifierInstance> getQualifierInstances(final Set<Annotation> annotations) { if (annotations == null || annotations.isEmpty()) { return Collections.emptySet(); } ImmutableSet.Builder<QualifierInstance> builder = ImmutableSet.builder(); boolean useSharedCache = true; for (Annotation annotation : annotations) { if (isCacheAllowed(annotation)) { builder.add(qualifierInstanceCache.getValue(annotation)); } else { builder.add(QualifierInstance.of(annotation, this)); // Don't use shared object cache if there's some qualifier instance which should not be cached useSharedCache = false; } } return useSharedCache ? sharedObjectCache.getSharedSet(builder.build()) : builder.build(); }
/** * * @param annotations * @return the set of qualifier instances, uses caches if possible */ public Set<QualifierInstance> getQualifierInstances(final Set<Annotation> annotations) { if (annotations == null || annotations.isEmpty()) { return Collections.emptySet(); } ImmutableSet.Builder<QualifierInstance> builder = ImmutableSet.builder(); boolean useSharedCache = true; for (Annotation annotation : annotations) { if (isCacheAllowed(annotation)) { builder.add(qualifierInstanceCache.getValue(annotation)); } else { builder.add(QualifierInstance.of(annotation, this)); // Don't use shared object cache if there's some qualifier instance which should not be cached useSharedCache = false; } } return useSharedCache ? sharedObjectCache.getSharedSet(builder.build()) : builder.build(); }
/** * * @param annotations * @return the set of qualifier instances, uses caches if possible */ public Set<QualifierInstance> getQualifierInstances(final Set<Annotation> annotations) { if (annotations == null || annotations.isEmpty()) { return Collections.emptySet(); } ImmutableSet.Builder<QualifierInstance> builder = ImmutableSet.builder(); boolean useSharedCache = true; for (Annotation annotation : annotations) { if (isCacheAllowed(annotation)) { builder.add(qualifierInstanceCache.getValue(annotation)); } else { builder.add(QualifierInstance.of(annotation, this)); // Don't use shared object cache if there's some qualifier instance which should not be cached useSharedCache = false; } } return useSharedCache ? sharedObjectCache.getSharedSet(builder.build()) : builder.build(); }
/** * * @param annotations * @return the set of qualifier instances, uses caches if possible */ public Set<QualifierInstance> getQualifierInstances(final Set<Annotation> annotations) { if (annotations == null || annotations.isEmpty()) { return Collections.emptySet(); } ImmutableSet.Builder<QualifierInstance> builder = ImmutableSet.builder(); boolean useSharedCache = true; for (Annotation annotation : annotations) { if (isCacheAllowed(annotation)) { builder.add(qualifierInstanceCache.getValue(annotation)); } else { builder.add(QualifierInstance.of(annotation, this)); // Don't use shared object cache if there's some qualifier instance which should not be cached useSharedCache = false; } } return useSharedCache ? sharedObjectCache.getSharedSet(builder.build()) : builder.build(); }