/** * * @param predicate Testing the original {@link AnnotatedConstructor} * @return a sequence of {@link AnnotatedConstructorConfigurator}s matching the given predicate * @see AnnotatedConstructorConfigurator#getAnnotated() */ default Stream<AnnotatedConstructorConfigurator<T>> filterConstructors(Predicate<AnnotatedConstructor<T>> predicate) { return constructors().stream().filter(c -> predicate.test(c.getAnnotated())); }
/** * * @param predicate Testing the original {@link AnnotatedConstructor} * @return a sequence of {@link AnnotatedConstructorConfigurator}s matching the given predicate * @see AnnotatedConstructorConfigurator#getAnnotated() */ default Stream<AnnotatedConstructorConfigurator<T>> filterConstructors(Predicate<AnnotatedConstructor<T>> predicate) { return constructors().stream().filter(c -> predicate.test(c.getAnnotated())); }
/** * * @param predicate Testing the original {@link AnnotatedConstructor} * @return a sequence of {@link AnnotatedConstructorConfigurator}s matching the given predicate * @see AnnotatedConstructorConfigurator#getAnnotated() */ default Stream<AnnotatedConstructorConfigurator<T>> filterConstructors(Predicate<AnnotatedConstructor<T>> predicate) { return constructors().stream().filter(c -> predicate.test(c.getAnnotated())); }
/** * * @param predicate Testing the original {@link AnnotatedConstructor} * @return a sequence of {@link AnnotatedConstructorConfigurator}s matching the given predicate * @see AnnotatedConstructorConfigurator#getAnnotated() */ default Stream<AnnotatedConstructorConfigurator<T>> filterConstructors(Predicate<AnnotatedConstructor<T>> predicate) { return constructors().stream().filter(c -> predicate.test(c.getAnnotated())); }
/** * * @param predicate Testing the original {@link AnnotatedConstructor} * @return a sequence of {@link AnnotatedConstructorConfigurator}s matching the given predicate * @see AnnotatedConstructorConfigurator#getAnnotated() */ default Stream<AnnotatedConstructorConfigurator<T>> filterConstructors(Predicate<AnnotatedConstructor<T>> predicate) { return constructors().stream().filter(c -> predicate.test(c.getAnnotated())); }
/** * * @param predicate Testing the original {@link AnnotatedConstructor} * @return a sequence of {@link AnnotatedConstructorConfigurator}s matching the given predicate * @see AnnotatedConstructorConfigurator#getAnnotated() */ default Stream<AnnotatedConstructorConfigurator<T>> filterConstructors(Predicate<AnnotatedConstructor<T>> predicate) { return constructors().stream().filter(c -> predicate.test(c.getAnnotated())); }
/** * * @param predicate Testing the original {@link AnnotatedConstructor} * @return a sequence of {@link AnnotatedConstructorConfigurator}s matching the given predicate * @see AnnotatedConstructorConfigurator#getAnnotated() */ default Stream<AnnotatedConstructorConfigurator<T>> filterConstructors(Predicate<AnnotatedConstructor<T>> predicate) { return constructors().stream().filter(c -> predicate.test(c.getAnnotated())); }
/** * * @param predicate Testing the original {@link AnnotatedConstructor} * @return a sequence of {@link AnnotatedConstructorConfigurator}s matching the given predicate * @see AnnotatedConstructorConfigurator#getAnnotated() */ default Stream<AnnotatedConstructorConfigurator<T>> filterConstructors(Predicate<AnnotatedConstructor<T>> predicate) { return constructors().stream().filter(c -> predicate.test(c.getAnnotated())); }
/** * * @param predicate Testing the original {@link AnnotatedConstructor} * @return a sequence of {@link AnnotatedConstructorConfigurator}s matching the given predicate * @see AnnotatedConstructorConfigurator#getAnnotated() */ default Stream<AnnotatedConstructorConfigurator<T>> filterConstructors(Predicate<AnnotatedConstructor<T>> predicate) { return constructors().stream().filter(c -> predicate.test(c.getAnnotated())); }
/** * * @param predicate Testing the original {@link AnnotatedConstructor} * @return a sequence of {@link AnnotatedConstructorConfigurator}s matching the given predicate * @see AnnotatedConstructorConfigurator#getAnnotated() */ default Stream<AnnotatedConstructorConfigurator<T>> filterConstructors(Predicate<AnnotatedConstructor<T>> predicate) { return constructors().stream().filter(c -> predicate.test(c.getAnnotated())); }
/** * * @param predicate Testing the original {@link AnnotatedConstructor} * @return a sequence of {@link AnnotatedConstructorConfigurator}s matching the given predicate * @see AnnotatedConstructorConfigurator#getAnnotated() */ default Stream<AnnotatedConstructorConfigurator<T>> filterConstructors(Predicate<AnnotatedConstructor<T>> predicate) { return constructors().stream().filter(c -> predicate.test(c.getAnnotated())); }
void observesDogPAT(@Observes ProcessAnnotatedType<Dog> event) { annotatedTypesEqual.set(AnnotatedTypes.compareAnnotatedTypes(event.configureAnnotatedType().getAnnotated(), event.getAnnotatedType())); AnnotatedTypeConfigurator<Dog> annotatedTypeConfigurator = event.configureAnnotatedType(); // add @RequestScoped to Dog and @Inject and @Dogs to its Feed field annotatedTypeConfigurator.add(RequestScoped.Literal.INSTANCE) .filterFields(af -> (af.getJavaMember() .getName().equals("feed"))).findFirst().get().add(InjectLiteral.INSTANCE).add(Dogs.DogsLiteral.INSTANCE); // add @Inject to Dog constructor and @Dogs to its param annotatedTypeConfigurator.constructors().iterator().next().add(InjectLiteral.INSTANCE) .filterParams(ap -> ap.getPosition() == 0).findFirst().get().add(Dogs.DogsLiteral.INSTANCE); }
annotatedTypeConfigurator.constructors().stream().forEach(AnnotatedConstructorConfigurator::removeAll); annotatedTypeConfigurator.methods().stream().forEach(AnnotatedMethodConfigurator::removeAll); annotatedTypeConfigurator.methods().stream().forEach(annotatedMethodConfigurator -> {