public static Set<Class<?>> getRawTypes(Set<Type> types) { return types.stream().map(Reflections::getRawType).collect(ImmutableSet.collector()); }
@Override @SuppressWarnings("unchecked") public <T extends Annotation> Set<T> getInterceptorBindingsByType(Class<T> annotationType) { Preconditions.checkArgumentNotNull(annotationType, "annotationType"); return interceptorBindings.stream() .filter((annotation) -> annotation.annotationType().equals(annotationType)) .map(annotation -> (T) annotation) .collect(ImmutableSet.collector()); }
private static Set<Class<?>> transformToClasses(Collection<BusinessInterfaceDescriptor<?>> interfaceDescriptors) { if (interfaceDescriptors == null) { return Collections.emptySet(); } return interfaceDescriptors.stream().map(d -> d.getInterface()).collect(ImmutableSet.collector()); }
@Override @SuppressWarnings("unchecked") public <T extends Annotation> Set<T> getInterceptorBindingsByType(Class<T> annotationType) { Preconditions.checkArgumentNotNull(annotationType, "annotationType"); return interceptorBindings.stream() .filter((annotation) -> annotation.annotationType().equals(annotationType)) .map(annotation -> (T) annotation) .collect(ImmutableSet.collector()); }
@Override @SuppressWarnings("unchecked") public <T extends Annotation> Set<T> getInterceptorBindingsByType(Class<T> annotationType) { Preconditions.checkArgumentNotNull(annotationType, "annotationType"); return interceptorBindings.stream() .filter((annotation) -> annotation.annotationType().equals(annotationType)) .map(annotation -> (T) annotation) .collect(ImmutableSet.collector()); }
@Override @SuppressWarnings("unchecked") public <T extends Annotation> Set<T> getInterceptorBindingsByType(Class<T> annotationType) { Preconditions.checkArgumentNotNull(annotationType, "annotationType"); return interceptorBindings.stream() .filter((annotation) -> annotation.annotationType().equals(annotationType)) .map(annotation -> (T) annotation) .collect(ImmutableSet.collector()); }
@Override @SuppressWarnings("unchecked") public <T extends Annotation> Set<T> getInterceptorBindingsByType(Class<T> annotationType) { Preconditions.checkArgumentNotNull(annotationType, "annotationType"); return interceptorBindings.stream() .filter((annotation) -> annotation.annotationType().equals(annotationType)) .map(annotation -> (T) annotation) .collect(ImmutableSet.collector()); }
static Set<Annotation> getQualifiers(Annotated annotated) { return annotated.getAnnotations().stream().filter((a) -> a.annotationType().isAnnotationPresent(Qualifier.class)).collect(ImmutableSet.collector()); }
static Set<Annotation> getQualifiers(Annotated annotated) { return annotated.getAnnotations().stream().filter((a) -> a.annotationType().isAnnotationPresent(Qualifier.class)).collect(ImmutableSet.collector()); }
static Set<Annotation> getQualifiers(Annotated annotated) { return annotated.getAnnotations().stream().filter((a) -> a.annotationType().isAnnotationPresent(Qualifier.class)).collect(ImmutableSet.collector()); }
public AnnotatedTypeConfiguratorImpl(AnnotatedType<T> annotatedType) { super(annotatedType); this.constructors = annotatedType.getConstructors().stream().map(c -> AnnotatedConstructorConfiguratorImpl.from(c)).collect(ImmutableSet.collector()); this.methods = annotatedType.getMethods().stream().map(m -> AnnotatedMethodConfiguratorImpl.from(m)).collect(ImmutableSet.collector()); this.fields = annotatedType.getFields().stream().map(f -> AnnotatedFieldConfiguratorImpl.from(f)).collect(ImmutableSet.collector()); }
public AnnotatedTypeConfiguratorImpl(AnnotatedType<T> annotatedType) { super(annotatedType); this.constructors = annotatedType.getConstructors().stream().map(c -> AnnotatedConstructorConfiguratorImpl.from(c)).collect(ImmutableSet.collector()); this.methods = annotatedType.getMethods().stream().map(m -> AnnotatedMethodConfiguratorImpl.from(m)).collect(ImmutableSet.collector()); this.fields = annotatedType.getFields().stream().map(f -> AnnotatedFieldConfiguratorImpl.from(f)).collect(ImmutableSet.collector()); }
public AnnotatedTypeConfiguratorImpl(AnnotatedType<T> annotatedType) { super(annotatedType); this.constructors = annotatedType.getConstructors().stream().map(c -> AnnotatedConstructorConfiguratorImpl.from(c)).collect(ImmutableSet.collector()); this.methods = annotatedType.getMethods().stream().map(m -> AnnotatedMethodConfiguratorImpl.from(m)).collect(ImmutableSet.collector()); this.fields = annotatedType.getFields().stream().map(f -> AnnotatedFieldConfiguratorImpl.from(f)).collect(ImmutableSet.collector()); }
public AnnotatedTypeConfiguratorImpl(AnnotatedType<T> annotatedType) { super(annotatedType); this.constructors = annotatedType.getConstructors().stream().map(c -> AnnotatedConstructorConfiguratorImpl.from(c)).collect(ImmutableSet.collector()); this.methods = annotatedType.getMethods().stream().map(m -> AnnotatedMethodConfiguratorImpl.from(m)).collect(ImmutableSet.collector()); this.fields = annotatedType.getFields().stream().map(f -> AnnotatedFieldConfiguratorImpl.from(f)).collect(ImmutableSet.collector()); }
public AnnotatedTypeConfiguratorImpl(AnnotatedType<T> annotatedType) { super(annotatedType); this.constructors = annotatedType.getConstructors().stream().map(c -> AnnotatedConstructorConfiguratorImpl.from(c)).collect(ImmutableSet.collector()); this.methods = annotatedType.getMethods().stream().map(m -> AnnotatedMethodConfiguratorImpl.from(m)).collect(ImmutableSet.collector()); this.fields = annotatedType.getFields().stream().map(f -> AnnotatedFieldConfiguratorImpl.from(f)).collect(ImmutableSet.collector()); }
public AnnotatedTypeImpl(AnnotatedTypeConfiguratorImpl<X> configurator) { this.delegate = configurator.getAnnotated(); this.annotations = new Annotations(configurator); this.methods = configurator.getMethods().stream().map(m -> new AnnotatedMethodImpl<>(m)).collect(ImmutableSet.collector()); this.fields = configurator.getFields().stream().map(f -> new AnnotatedFieldImpl<>(f)).collect(ImmutableSet.collector()); this.constructors = configurator.getConstructors().stream().map(c -> new AnnotatedConstructorImpl<>(c)).collect(ImmutableSet.collector()); }
public AnnotatedTypeImpl(AnnotatedTypeConfiguratorImpl<X> configurator) { this.delegate = configurator.getAnnotated(); this.annotations = new Annotations(configurator); this.methods = configurator.getMethods().stream().map(m -> new AnnotatedMethodImpl<>(m)).collect(ImmutableSet.collector()); this.fields = configurator.getFields().stream().map(f -> new AnnotatedFieldImpl<>(f)).collect(ImmutableSet.collector()); this.constructors = configurator.getConstructors().stream().map(c -> new AnnotatedConstructorImpl<>(c)).collect(ImmutableSet.collector()); }
public AnnotatedTypeImpl(AnnotatedTypeConfiguratorImpl<X> configurator) { this.delegate = configurator.getAnnotated(); this.annotations = new Annotations(configurator); this.methods = configurator.getMethods().stream().map(m -> new AnnotatedMethodImpl<>(m)).collect(ImmutableSet.collector()); this.fields = configurator.getFields().stream().map(f -> new AnnotatedFieldImpl<>(f)).collect(ImmutableSet.collector()); this.constructors = configurator.getConstructors().stream().map(c -> new AnnotatedConstructorImpl<>(c)).collect(ImmutableSet.collector()); }
public AnnotatedTypeImpl(AnnotatedTypeConfiguratorImpl<X> configurator) { this.delegate = configurator.getAnnotated(); this.annotations = new Annotations(configurator); this.methods = configurator.getMethods().stream().map(m -> new AnnotatedMethodImpl<>(m)).collect(ImmutableSet.collector()); this.fields = configurator.getFields().stream().map(f -> new AnnotatedFieldImpl<>(f)).collect(ImmutableSet.collector()); this.constructors = configurator.getConstructors().stream().map(c -> new AnnotatedConstructorImpl<>(c)).collect(ImmutableSet.collector()); }
public AnnotatedTypeImpl(AnnotatedTypeConfiguratorImpl<X> configurator) { this.delegate = configurator.getAnnotated(); this.annotations = new Annotations(configurator); this.methods = configurator.getMethods().stream().map(m -> new AnnotatedMethodImpl<>(m)).collect(ImmutableSet.collector()); this.fields = configurator.getFields().stream().map(f -> new AnnotatedFieldImpl<>(f)).collect(ImmutableSet.collector()); this.constructors = configurator.getConstructors().stream().map(c -> new AnnotatedConstructorImpl<>(c)).collect(ImmutableSet.collector()); }