normalize indentation (spaces)
Signed-off-by: Raymond Augé <rotty3000@apache.org>
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/OSGi.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/OSGi.java
index 168cbc7..f9143f4 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/OSGi.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/OSGi.java
@@ -59,608 +59,608 @@
* @author Carlos Sierra Andrés
*/
public interface OSGi<T> extends OSGiRunnable<T> {
- OSGiResult NOOP = () -> {};
+ OSGiResult NOOP = () -> {};
- @SafeVarargs
- static <T> OSGi<T> all(OSGi<T> ... programs) {
- return new AllOSGi<>(programs);
- }
+ @SafeVarargs
+ static <T> OSGi<T> all(OSGi<T> ... programs) {
+ return new AllOSGi<>(programs);
+ }
- static OSGi<BundleContext> bundleContext() {
- return new BundleContextOSGiImpl();
- }
+ static OSGi<BundleContext> bundleContext() {
+ return new BundleContextOSGiImpl();
+ }
- static OSGi<Bundle> bundles(int stateMask) {
- return new BundleOSGi(stateMask);
- }
+ static OSGi<Bundle> bundles(int stateMask) {
+ return new BundleOSGi(stateMask);
+ }
- static <T> OSGi<T> changeContext(
- BundleContext bundleContext, OSGi<T> program) {
+ static <T> OSGi<T> changeContext(
+ BundleContext bundleContext, OSGi<T> program) {
- return new ChangeContextOSGiImpl<>(program, bundleContext);
- }
+ return new ChangeContextOSGiImpl<>(program, bundleContext);
+ }
- @SafeVarargs
- static <T> OSGi<T> coalesce(OSGi<T> ... programs) {
- return new CoalesceOSGiImpl<>(programs);
- }
+ @SafeVarargs
+ static <T> OSGi<T> coalesce(OSGi<T> ... programs) {
+ return new CoalesceOSGiImpl<>(programs);
+ }
- static <A, B, RES> OSGi<RES> combine(Function2<A, B, RES> fun, OSGi<A> a, OSGi<B> b) {
- return b.applyTo(a.applyTo(just(fun.curried())));
- }
+ static <A, B, RES> OSGi<RES> combine(Function2<A, B, RES> fun, OSGi<A> a, OSGi<B> b) {
+ return b.applyTo(a.applyTo(just(fun.curried())));
+ }
- static <A, B, C, RES> OSGi<RES> combine(Function3<A, B, C, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c) {
- return c.applyTo(combine((A aa, B bb) -> fun.curried().apply(aa).apply(bb), a, b));
- }
+ static <A, B, C, RES> OSGi<RES> combine(Function3<A, B, C, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c) {
+ return c.applyTo(combine((A aa, B bb) -> fun.curried().apply(aa).apply(bb), a, b));
+ }
- static <A, B, C, D, RES> OSGi<RES> combine(Function4<A, B, C, D, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d) {
- return d.applyTo(combine((A aa, B bb, C cc) -> fun.curried().apply(aa).apply(bb).apply(cc), a, b, c));
- }
+ static <A, B, C, D, RES> OSGi<RES> combine(Function4<A, B, C, D, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d) {
+ return d.applyTo(combine((A aa, B bb, C cc) -> fun.curried().apply(aa).apply(bb).apply(cc), a, b, c));
+ }
- static <A, B, C, D, E, RES> OSGi<RES> combine(Function5<A, B, C, D, E, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e) {
- return e.applyTo(combine((A aa, B bb, C cc, D dd) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd), a, b, c, d));
- }
+ static <A, B, C, D, E, RES> OSGi<RES> combine(Function5<A, B, C, D, E, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e) {
+ return e.applyTo(combine((A aa, B bb, C cc, D dd) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd), a, b, c, d));
+ }
- static <A, B, C, D, E, F, RES> OSGi<RES> combine(Function6<A, B, C, D, E, F, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f) {
- return f.applyTo(combine((A aa, B bb, C cc, D dd, E ee) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee), a, b, c, d, e));
- }
+ static <A, B, C, D, E, F, RES> OSGi<RES> combine(Function6<A, B, C, D, E, F, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f) {
+ return f.applyTo(combine((A aa, B bb, C cc, D dd, E ee) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee), a, b, c, d, e));
+ }
- static <A, B, C, D, E, F, G, RES> OSGi<RES> combine(Function7<A, B, C, D, E, F, G, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g) {
- return g.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff), a, b, c, d, e, f));
- }
+ static <A, B, C, D, E, F, G, RES> OSGi<RES> combine(Function7<A, B, C, D, E, F, G, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g) {
+ return g.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff), a, b, c, d, e, f));
+ }
- static <A, B, C, D, E, F, G, H, RES> OSGi<RES> combine(Function8<A, B, C, D, E, F, G, H, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h) {
- return h.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg), a, b, c, d, e, f, g));
- }
+ static <A, B, C, D, E, F, G, H, RES> OSGi<RES> combine(Function8<A, B, C, D, E, F, G, H, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h) {
+ return h.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg), a, b, c, d, e, f, g));
+ }
- static <A, B, C, D, E, F, G, H, I, RES> OSGi<RES> combine(Function9<A, B, C, D, E, F, G, H, I, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i) {
- return i.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh), a, b, c, d, e, f, g, h));
- }
+ static <A, B, C, D, E, F, G, H, I, RES> OSGi<RES> combine(Function9<A, B, C, D, E, F, G, H, I, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i) {
+ return i.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh), a, b, c, d, e, f, g, h));
+ }
- static <A, B, C, D, E, F, G, H, I, J, RES> OSGi<RES> combine(Function10<A, B, C, D, E, F, G, H, I, J, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j) {
- return j.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh, I ii) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh).apply(ii), a, b, c, d, e, f, g, h, i));
- }
+ static <A, B, C, D, E, F, G, H, I, J, RES> OSGi<RES> combine(Function10<A, B, C, D, E, F, G, H, I, J, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j) {
+ return j.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh, I ii) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh).apply(ii), a, b, c, d, e, f, g, h, i));
+ }
- static <A, B, C, D, E, F, G, H, I, J, K, RES> OSGi<RES> combine(Function11<A, B, C, D, E, F, G, H, I, J, K, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k) {
- return k.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh, I ii, J jj) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh).apply(ii).apply(jj), a, b, c, d, e, f, g, h, i, j));
- }
+ static <A, B, C, D, E, F, G, H, I, J, K, RES> OSGi<RES> combine(Function11<A, B, C, D, E, F, G, H, I, J, K, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k) {
+ return k.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh, I ii, J jj) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh).apply(ii).apply(jj), a, b, c, d, e, f, g, h, i, j));
+ }
- static <A, B, C, D, E, F, G, H, I, J, K, L, RES> OSGi<RES> combine(Function12<A, B, C, D, E, F, G, H, I, J, K, L, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l) {
- return l.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh, I ii, J jj, K kk) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh).apply(ii).apply(jj).apply(kk), a, b, c, d, e, f, g, h, i, j, k));
- }
+ static <A, B, C, D, E, F, G, H, I, J, K, L, RES> OSGi<RES> combine(Function12<A, B, C, D, E, F, G, H, I, J, K, L, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l) {
+ return l.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh, I ii, J jj, K kk) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh).apply(ii).apply(jj).apply(kk), a, b, c, d, e, f, g, h, i, j, k));
+ }
- static <A, B, C, D, E, F, G, H, I, J, K, L, M, RES> OSGi<RES> combine(Function13<A, B, C, D, E, F, G, H, I, J, K, L, M, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m) {
- return m.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh, I ii, J jj, K kk, L ll) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh).apply(ii).apply(jj).apply(kk).apply(ll), a, b, c, d, e, f, g, h, i, j, k, l));
- }
+ static <A, B, C, D, E, F, G, H, I, J, K, L, M, RES> OSGi<RES> combine(Function13<A, B, C, D, E, F, G, H, I, J, K, L, M, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m) {
+ return m.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh, I ii, J jj, K kk, L ll) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh).apply(ii).apply(jj).apply(kk).apply(ll), a, b, c, d, e, f, g, h, i, j, k, l));
+ }
- static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, RES> OSGi<RES> combine(Function14<A, B, C, D, E, F, G, H, I, J, K, L, M, N, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n) {
- return n.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh, I ii, J jj, K kk, L ll, M mm) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh).apply(ii).apply(jj).apply(kk).apply(ll).apply(mm), a, b, c, d, e, f, g, h, i, j, k, l, m));
- }
+ static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, RES> OSGi<RES> combine(Function14<A, B, C, D, E, F, G, H, I, J, K, L, M, N, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n) {
+ return n.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh, I ii, J jj, K kk, L ll, M mm) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh).apply(ii).apply(jj).apply(kk).apply(ll).apply(mm), a, b, c, d, e, f, g, h, i, j, k, l, m));
+ }
- static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, RES> OSGi<RES> combine(Function15<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o) {
- return o.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh, I ii, J jj, K kk, L ll, M mm, N nn) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh).apply(ii).apply(jj).apply(kk).apply(ll).apply(mm).apply(nn), a, b, c, d, e, f, g, h, i, j, k, l, m, n));
- }
+ static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, RES> OSGi<RES> combine(Function15<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o) {
+ return o.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh, I ii, J jj, K kk, L ll, M mm, N nn) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh).apply(ii).apply(jj).apply(kk).apply(ll).apply(mm).apply(nn), a, b, c, d, e, f, g, h, i, j, k, l, m, n));
+ }
- static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, RES> OSGi<RES> combine(Function16<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p) {
- return p.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh, I ii, J jj, K kk, L ll, M mm, N nn, O oo) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh).apply(ii).apply(jj).apply(kk).apply(ll).apply(mm).apply(nn).apply(oo), a, b, c, d, e, f, g, h, i, j, k, l, m, n, o));
- }
+ static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, RES> OSGi<RES> combine(Function16<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p) {
+ return p.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh, I ii, J jj, K kk, L ll, M mm, N nn, O oo) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh).apply(ii).apply(jj).apply(kk).apply(ll).apply(mm).apply(nn).apply(oo), a, b, c, d, e, f, g, h, i, j, k, l, m, n, o));
+ }
- static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, RES> OSGi<RES> combine(Function17<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q) {
- return q.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh, I ii, J jj, K kk, L ll, M mm, N nn, O oo, P pp) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh).apply(ii).apply(jj).apply(kk).apply(ll).apply(mm).apply(nn).apply(oo).apply(pp), a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p));
- }
+ static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, RES> OSGi<RES> combine(Function17<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q) {
+ return q.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh, I ii, J jj, K kk, L ll, M mm, N nn, O oo, P pp) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh).apply(ii).apply(jj).apply(kk).apply(ll).apply(mm).apply(nn).apply(oo).apply(pp), a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p));
+ }
- static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, RES> OSGi<RES> combine(Function18<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r) {
- return r.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh, I ii, J jj, K kk, L ll, M mm, N nn, O oo, P pp, Q qq) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh).apply(ii).apply(jj).apply(kk).apply(ll).apply(mm).apply(nn).apply(oo).apply(pp).apply(qq), a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q));
- }
+ static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, RES> OSGi<RES> combine(Function18<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r) {
+ return r.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh, I ii, J jj, K kk, L ll, M mm, N nn, O oo, P pp, Q qq) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh).apply(ii).apply(jj).apply(kk).apply(ll).apply(mm).apply(nn).apply(oo).apply(pp).apply(qq), a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q));
+ }
- static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, RES> OSGi<RES> combine(Function19<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r, OSGi<S> s) {
- return s.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh, I ii, J jj, K kk, L ll, M mm, N nn, O oo, P pp, Q qq, R rr) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh).apply(ii).apply(jj).apply(kk).apply(ll).apply(mm).apply(nn).apply(oo).apply(pp).apply(qq).apply(rr), a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r));
- }
+ static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, RES> OSGi<RES> combine(Function19<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r, OSGi<S> s) {
+ return s.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh, I ii, J jj, K kk, L ll, M mm, N nn, O oo, P pp, Q qq, R rr) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh).apply(ii).apply(jj).apply(kk).apply(ll).apply(mm).apply(nn).apply(oo).apply(pp).apply(qq).apply(rr), a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r));
+ }
- static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, RES> OSGi<RES> combine(Function20<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r, OSGi<S> s, OSGi<T> t) {
- return t.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh, I ii, J jj, K kk, L ll, M mm, N nn, O oo, P pp, Q qq, R rr, S ss) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh).apply(ii).apply(jj).apply(kk).apply(ll).apply(mm).apply(nn).apply(oo).apply(pp).apply(qq).apply(rr).apply(ss), a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s));
- }
+ static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, RES> OSGi<RES> combine(Function20<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r, OSGi<S> s, OSGi<T> t) {
+ return t.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh, I ii, J jj, K kk, L ll, M mm, N nn, O oo, P pp, Q qq, R rr, S ss) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh).apply(ii).apply(jj).apply(kk).apply(ll).apply(mm).apply(nn).apply(oo).apply(pp).apply(qq).apply(rr).apply(ss), a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s));
+ }
- static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, RES> OSGi<RES> combine(Function21<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r, OSGi<S> s, OSGi<T> t, OSGi<U> u) {
- return u.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh, I ii, J jj, K kk, L ll, M mm, N nn, O oo, P pp, Q qq, R rr, S ss, T tt) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh).apply(ii).apply(jj).apply(kk).apply(ll).apply(mm).apply(nn).apply(oo).apply(pp).apply(qq).apply(rr).apply(ss).apply(tt), a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t));
- }
+ static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, RES> OSGi<RES> combine(Function21<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r, OSGi<S> s, OSGi<T> t, OSGi<U> u) {
+ return u.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh, I ii, J jj, K kk, L ll, M mm, N nn, O oo, P pp, Q qq, R rr, S ss, T tt) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh).apply(ii).apply(jj).apply(kk).apply(ll).apply(mm).apply(nn).apply(oo).apply(pp).apply(qq).apply(rr).apply(ss).apply(tt), a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t));
+ }
- static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, RES> OSGi<RES> combine(Function22<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r, OSGi<S> s, OSGi<T> t, OSGi<U> u, OSGi<V> v) {
- return v.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh, I ii, J jj, K kk, L ll, M mm, N nn, O oo, P pp, Q qq, R rr, S ss, T tt, U uu) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh).apply(ii).apply(jj).apply(kk).apply(ll).apply(mm).apply(nn).apply(oo).apply(pp).apply(qq).apply(rr).apply(ss).apply(tt).apply(uu), a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u));
- }
+ static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, RES> OSGi<RES> combine(Function22<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r, OSGi<S> s, OSGi<T> t, OSGi<U> u, OSGi<V> v) {
+ return v.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh, I ii, J jj, K kk, L ll, M mm, N nn, O oo, P pp, Q qq, R rr, S ss, T tt, U uu) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh).apply(ii).apply(jj).apply(kk).apply(ll).apply(mm).apply(nn).apply(oo).apply(pp).apply(qq).apply(rr).apply(ss).apply(tt).apply(uu), a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u));
+ }
- static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, RES> OSGi<RES> combine(Function23<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r, OSGi<S> s, OSGi<T> t, OSGi<U> u, OSGi<V> v, OSGi<W> w) {
- return w.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh, I ii, J jj, K kk, L ll, M mm, N nn, O oo, P pp, Q qq, R rr, S ss, T tt, U uu, V vv) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh).apply(ii).apply(jj).apply(kk).apply(ll).apply(mm).apply(nn).apply(oo).apply(pp).apply(qq).apply(rr).apply(ss).apply(tt).apply(uu).apply(vv), a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v));
- }
+ static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, RES> OSGi<RES> combine(Function23<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r, OSGi<S> s, OSGi<T> t, OSGi<U> u, OSGi<V> v, OSGi<W> w) {
+ return w.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh, I ii, J jj, K kk, L ll, M mm, N nn, O oo, P pp, Q qq, R rr, S ss, T tt, U uu, V vv) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh).apply(ii).apply(jj).apply(kk).apply(ll).apply(mm).apply(nn).apply(oo).apply(pp).apply(qq).apply(rr).apply(ss).apply(tt).apply(uu).apply(vv), a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v));
+ }
- static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, RES> OSGi<RES> combine(Function24<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r, OSGi<S> s, OSGi<T> t, OSGi<U> u, OSGi<V> v, OSGi<W> w, OSGi<X> x) {
- return x.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh, I ii, J jj, K kk, L ll, M mm, N nn, O oo, P pp, Q qq, R rr, S ss, T tt, U uu, V vv, W ww) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh).apply(ii).apply(jj).apply(kk).apply(ll).apply(mm).apply(nn).apply(oo).apply(pp).apply(qq).apply(rr).apply(ss).apply(tt).apply(uu).apply(vv).apply(ww), a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w));
- }
+ static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, RES> OSGi<RES> combine(Function24<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r, OSGi<S> s, OSGi<T> t, OSGi<U> u, OSGi<V> v, OSGi<W> w, OSGi<X> x) {
+ return x.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh, I ii, J jj, K kk, L ll, M mm, N nn, O oo, P pp, Q qq, R rr, S ss, T tt, U uu, V vv, W ww) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh).apply(ii).apply(jj).apply(kk).apply(ll).apply(mm).apply(nn).apply(oo).apply(pp).apply(qq).apply(rr).apply(ss).apply(tt).apply(uu).apply(vv).apply(ww), a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w));
+ }
- static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, RES> OSGi<RES> combine(Function25<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r, OSGi<S> s, OSGi<T> t, OSGi<U> u, OSGi<V> v, OSGi<W> w, OSGi<X> x, OSGi<Y> y) {
- return y.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh, I ii, J jj, K kk, L ll, M mm, N nn, O oo, P pp, Q qq, R rr, S ss, T tt, U uu, V vv, W ww, X xx) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh).apply(ii).apply(jj).apply(kk).apply(ll).apply(mm).apply(nn).apply(oo).apply(pp).apply(qq).apply(rr).apply(ss).apply(tt).apply(uu).apply(vv).apply(ww).apply(xx), a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x));
- }
+ static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, RES> OSGi<RES> combine(Function25<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r, OSGi<S> s, OSGi<T> t, OSGi<U> u, OSGi<V> v, OSGi<W> w, OSGi<X> x, OSGi<Y> y) {
+ return y.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh, I ii, J jj, K kk, L ll, M mm, N nn, O oo, P pp, Q qq, R rr, S ss, T tt, U uu, V vv, W ww, X xx) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh).apply(ii).apply(jj).apply(kk).apply(ll).apply(mm).apply(nn).apply(oo).apply(pp).apply(qq).apply(rr).apply(ss).apply(tt).apply(uu).apply(vv).apply(ww).apply(xx), a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x));
+ }
- static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, RES> OSGi<RES> combine(Function26<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r, OSGi<S> s, OSGi<T> t, OSGi<U> u, OSGi<V> v, OSGi<W> w, OSGi<X> x, OSGi<Y> y, OSGi<Z> z) {
- return z.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh, I ii, J jj, K kk, L ll, M mm, N nn, O oo, P pp, Q qq, R rr, S ss, T tt, U uu, V vv, W ww, X xx, Y yy) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh).apply(ii).apply(jj).apply(kk).apply(ll).apply(mm).apply(nn).apply(oo).apply(pp).apply(qq).apply(rr).apply(ss).apply(tt).apply(uu).apply(vv).apply(ww).apply(xx).apply(yy), a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y));
- }
+ static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, RES> OSGi<RES> combine(Function26<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, RES> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r, OSGi<S> s, OSGi<T> t, OSGi<U> u, OSGi<V> v, OSGi<W> w, OSGi<X> x, OSGi<Y> y, OSGi<Z> z) {
+ return z.applyTo(combine((A aa, B bb, C cc, D dd, E ee, F ff, G gg, H hh, I ii, J jj, K kk, L ll, M mm, N nn, O oo, P pp, Q qq, R rr, S ss, T tt, U uu, V vv, W ww, X xx, Y yy) -> fun.curried().apply(aa).apply(bb).apply(cc).apply(dd).apply(ee).apply(ff).apply(gg).apply(hh).apply(ii).apply(jj).apply(kk).apply(ll).apply(mm).apply(nn).apply(oo).apply(pp).apply(qq).apply(rr).apply(ss).apply(tt).apply(uu).apply(vv).apply(ww).apply(xx).apply(yy), a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y));
+ }
- static <A, B, RES> OSGi<RES> flatCombine(Function2<A, B, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b) {
- return combine(fun, a, b).flatMap(Function.identity());
- }
+ static <A, B, RES> OSGi<RES> flatCombine(Function2<A, B, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b) {
+ return combine(fun, a, b).flatMap(Function.identity());
+ }
- static <A, B, C, RES> OSGi<RES> flatCombine(Function3<A, B, C, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c) {
- return combine(fun, a, b, c).flatMap(Function.identity());
- }
+ static <A, B, C, RES> OSGi<RES> flatCombine(Function3<A, B, C, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c) {
+ return combine(fun, a, b, c).flatMap(Function.identity());
+ }
- static <A, B, C, D, RES> OSGi<RES> flatCombine(Function4<A, B, C, D, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d) {
- return combine(fun, a, b, c, d).flatMap(Function.identity());
- }
+ static <A, B, C, D, RES> OSGi<RES> flatCombine(Function4<A, B, C, D, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d) {
+ return combine(fun, a, b, c, d).flatMap(Function.identity());
+ }
- static <A, B, C, D, E, RES> OSGi<RES> flatCombine(Function5<A, B, C, D, E, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e) {
- return combine(fun, a, b, c, d, e).flatMap(Function.identity());
- }
+ static <A, B, C, D, E, RES> OSGi<RES> flatCombine(Function5<A, B, C, D, E, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e) {
+ return combine(fun, a, b, c, d, e).flatMap(Function.identity());
+ }
- static <A, B, C, D, E, F, RES> OSGi<RES> flatCombine(Function6<A, B, C, D, E, F, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f) {
- return combine(fun, a, b, c, d, e, f).flatMap(Function.identity());
- }
+ static <A, B, C, D, E, F, RES> OSGi<RES> flatCombine(Function6<A, B, C, D, E, F, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f) {
+ return combine(fun, a, b, c, d, e, f).flatMap(Function.identity());
+ }
- static <A, B, C, D, E, F, G, RES> OSGi<RES> flatCombine(Function7<A, B, C, D, E, F, G, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g) {
- return combine(fun, a, b, c, d, e, f, g).flatMap(Function.identity());
- }
+ static <A, B, C, D, E, F, G, RES> OSGi<RES> flatCombine(Function7<A, B, C, D, E, F, G, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g) {
+ return combine(fun, a, b, c, d, e, f, g).flatMap(Function.identity());
+ }
- static <A, B, C, D, E, F, G, H, RES> OSGi<RES> flatCombine(Function8<A, B, C, D, E, F, G, H, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h) {
- return combine(fun, a, b, c, d, e, f, g, h).flatMap(Function.identity());
- }
+ static <A, B, C, D, E, F, G, H, RES> OSGi<RES> flatCombine(Function8<A, B, C, D, E, F, G, H, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h) {
+ return combine(fun, a, b, c, d, e, f, g, h).flatMap(Function.identity());
+ }
- static <A, B, C, D, E, F, G, H, I, RES> OSGi<RES> flatCombine(Function9<A, B, C, D, E, F, G, H, I, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i) {
- return combine(fun, a, b, c, d, e, f, g, h, i).flatMap(Function.identity());
- }
+ static <A, B, C, D, E, F, G, H, I, RES> OSGi<RES> flatCombine(Function9<A, B, C, D, E, F, G, H, I, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i) {
+ return combine(fun, a, b, c, d, e, f, g, h, i).flatMap(Function.identity());
+ }
- static <A, B, C, D, E, F, G, H, I, J, RES> OSGi<RES> flatCombine(Function10<A, B, C, D, E, F, G, H, I, J, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j) {
- return combine(fun, a, b, c, d, e, f, g, h, i, j).flatMap(Function.identity());
- }
+ static <A, B, C, D, E, F, G, H, I, J, RES> OSGi<RES> flatCombine(Function10<A, B, C, D, E, F, G, H, I, J, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j) {
+ return combine(fun, a, b, c, d, e, f, g, h, i, j).flatMap(Function.identity());
+ }
- static <A, B, C, D, E, F, G, H, I, J, K, RES> OSGi<RES> flatCombine(Function11<A, B, C, D, E, F, G, H, I, J, K, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k) {
- return combine(fun, a, b, c, d, e, f, g, h, i, j, k).flatMap(Function.identity());
- }
+ static <A, B, C, D, E, F, G, H, I, J, K, RES> OSGi<RES> flatCombine(Function11<A, B, C, D, E, F, G, H, I, J, K, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k) {
+ return combine(fun, a, b, c, d, e, f, g, h, i, j, k).flatMap(Function.identity());
+ }
- static <A, B, C, D, E, F, G, H, I, J, K, L, RES> OSGi<RES> flatCombine(Function12<A, B, C, D, E, F, G, H, I, J, K, L, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l) {
- return combine(fun, a, b, c, d, e, f, g, h, i, j, k, l).flatMap(Function.identity());
- }
+ static <A, B, C, D, E, F, G, H, I, J, K, L, RES> OSGi<RES> flatCombine(Function12<A, B, C, D, E, F, G, H, I, J, K, L, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l) {
+ return combine(fun, a, b, c, d, e, f, g, h, i, j, k, l).flatMap(Function.identity());
+ }
- static <A, B, C, D, E, F, G, H, I, J, K, L, M, RES> OSGi<RES> flatCombine(Function13<A, B, C, D, E, F, G, H, I, J, K, L, M, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m) {
- return combine(fun, a, b, c, d, e, f, g, h, i, j, k, l, m).flatMap(Function.identity());
- }
+ static <A, B, C, D, E, F, G, H, I, J, K, L, M, RES> OSGi<RES> flatCombine(Function13<A, B, C, D, E, F, G, H, I, J, K, L, M, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m) {
+ return combine(fun, a, b, c, d, e, f, g, h, i, j, k, l, m).flatMap(Function.identity());
+ }
- static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, RES> OSGi<RES> flatCombine(Function14<A, B, C, D, E, F, G, H, I, J, K, L, M, N, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n) {
- return combine(fun, a, b, c, d, e, f, g, h, i, j, k, l, m, n).flatMap(Function.identity());
- }
+ static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, RES> OSGi<RES> flatCombine(Function14<A, B, C, D, E, F, G, H, I, J, K, L, M, N, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n) {
+ return combine(fun, a, b, c, d, e, f, g, h, i, j, k, l, m, n).flatMap(Function.identity());
+ }
- static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, RES> OSGi<RES> flatCombine(Function15<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o) {
- return combine(fun, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o).flatMap(Function.identity());
- }
+ static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, RES> OSGi<RES> flatCombine(Function15<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o) {
+ return combine(fun, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o).flatMap(Function.identity());
+ }
- static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, RES> OSGi<RES> flatCombine(Function16<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p) {
- return combine(fun, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p).flatMap(Function.identity());
- }
+ static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, RES> OSGi<RES> flatCombine(Function16<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p) {
+ return combine(fun, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p).flatMap(Function.identity());
+ }
- static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, RES> OSGi<RES> flatCombine(Function17<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q) {
- return combine(fun, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q).flatMap(Function.identity());
- }
+ static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, RES> OSGi<RES> flatCombine(Function17<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q) {
+ return combine(fun, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q).flatMap(Function.identity());
+ }
- static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, RES> OSGi<RES> flatCombine(Function18<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r) {
- return combine(fun, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r).flatMap(Function.identity());
- }
+ static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, RES> OSGi<RES> flatCombine(Function18<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r) {
+ return combine(fun, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r).flatMap(Function.identity());
+ }
- static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, RES> OSGi<RES> flatCombine(Function19<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r, OSGi<S> s) {
- return combine(fun, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s).flatMap(Function.identity());
- }
+ static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, RES> OSGi<RES> flatCombine(Function19<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r, OSGi<S> s) {
+ return combine(fun, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s).flatMap(Function.identity());
+ }
- static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, RES> OSGi<RES> flatCombine(Function20<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r, OSGi<S> s, OSGi<T> t) {
- return combine(fun, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t).flatMap(Function.identity());
- }
+ static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, RES> OSGi<RES> flatCombine(Function20<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r, OSGi<S> s, OSGi<T> t) {
+ return combine(fun, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t).flatMap(Function.identity());
+ }
- static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, RES> OSGi<RES> flatCombine(Function21<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r, OSGi<S> s, OSGi<T> t, OSGi<U> u) {
- return combine(fun, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u).flatMap(Function.identity());
- }
+ static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, RES> OSGi<RES> flatCombine(Function21<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r, OSGi<S> s, OSGi<T> t, OSGi<U> u) {
+ return combine(fun, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u).flatMap(Function.identity());
+ }
- static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, RES> OSGi<RES> flatCombine(Function22<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r, OSGi<S> s, OSGi<T> t, OSGi<U> u, OSGi<V> v) {
- return combine(fun, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v).flatMap(Function.identity());
- }
+ static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, RES> OSGi<RES> flatCombine(Function22<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r, OSGi<S> s, OSGi<T> t, OSGi<U> u, OSGi<V> v) {
+ return combine(fun, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v).flatMap(Function.identity());
+ }
- static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, RES> OSGi<RES> flatCombine(Function23<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r, OSGi<S> s, OSGi<T> t, OSGi<U> u, OSGi<V> v, OSGi<W> w) {
- return combine(fun, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w).flatMap(Function.identity());
- }
+ static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, RES> OSGi<RES> flatCombine(Function23<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r, OSGi<S> s, OSGi<T> t, OSGi<U> u, OSGi<V> v, OSGi<W> w) {
+ return combine(fun, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w).flatMap(Function.identity());
+ }
- static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, RES> OSGi<RES> flatCombine(Function24<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r, OSGi<S> s, OSGi<T> t, OSGi<U> u, OSGi<V> v, OSGi<W> w, OSGi<X> x) {
- return combine(fun, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x).flatMap(Function.identity());
- }
+ static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, RES> OSGi<RES> flatCombine(Function24<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r, OSGi<S> s, OSGi<T> t, OSGi<U> u, OSGi<V> v, OSGi<W> w, OSGi<X> x) {
+ return combine(fun, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x).flatMap(Function.identity());
+ }
- static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, RES> OSGi<RES> flatCombine(Function25<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r, OSGi<S> s, OSGi<T> t, OSGi<U> u, OSGi<V> v, OSGi<W> w, OSGi<X> x, OSGi<Y> y) {
- return combine(fun, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y).flatMap(Function.identity());
- }
+ static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, RES> OSGi<RES> flatCombine(Function25<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r, OSGi<S> s, OSGi<T> t, OSGi<U> u, OSGi<V> v, OSGi<W> w, OSGi<X> x, OSGi<Y> y) {
+ return combine(fun, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y).flatMap(Function.identity());
+ }
- static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, RES> OSGi<RES> flatCombine(Function26<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r, OSGi<S> s, OSGi<T> t, OSGi<U> u, OSGi<V> v, OSGi<W> w, OSGi<X> x, OSGi<Y> y, OSGi<Z> z) {
- return combine(fun, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z).flatMap(Function.identity());
- }
-
- static OSGi<Dictionary<String, ?>> configuration(String pid) {
- return refreshWhen(
- new ConfigurationOSGiImpl(pid),
- __ -> true
- ).map(
- ConfigurationHolder::getUpdatedProperties
- );
- }
+ static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, RES> OSGi<RES> flatCombine(Function26<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, OSGi<RES>> fun, OSGi<A> a, OSGi<B> b, OSGi<C> c, OSGi<D> d, OSGi<E> e, OSGi<F> f, OSGi<G> g, OSGi<H> h, OSGi<I> i, OSGi<J> j, OSGi<K> k, OSGi<L> l, OSGi<M> m, OSGi<N> n, OSGi<O> o, OSGi<P> p, OSGi<Q> q, OSGi<R> r, OSGi<S> s, OSGi<T> t, OSGi<U> u, OSGi<V> v, OSGi<W> w, OSGi<X> x, OSGi<Y> y, OSGi<Z> z) {
+ return combine(fun, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z).flatMap(Function.identity());
+ }
- static OSGi<Dictionary<String, ?>> configurations(String factoryPid) {
- return refreshWhen(
- new ConfigurationsOSGiImpl(factoryPid),
- __ -> true
- ).map(
- ConfigurationHolder::getUpdatedProperties
- );
- }
+ static OSGi<Dictionary<String, ?>> configuration(String pid) {
+ return refreshWhen(
+ new ConfigurationOSGiImpl(pid),
+ __ -> true
+ ).map(
+ ConfigurationHolder::getUpdatedProperties
+ );
+ }
- static OSGi<Void> effect(Effect<Void> effect) {
- return new EffectsOSGi(
- () -> effect.getOnIncoming().accept(null),
- NOOP,
- NOOP,
- () -> effect.getOnLeaving().accept(null),
- NOOP);
- }
+ static OSGi<Dictionary<String, ?>> configurations(String factoryPid) {
+ return refreshWhen(
+ new ConfigurationsOSGiImpl(factoryPid),
+ __ -> true
+ ).map(
+ ConfigurationHolder::getUpdatedProperties
+ );
+ }
- static OSGi<Void> effects(Runnable onAdding, Runnable onRemoving) {
- return new EffectsOSGi(onAdding, NOOP, NOOP, onRemoving, NOOP);
- }
+ static OSGi<Void> effect(Effect<Void> effect) {
+ return new EffectsOSGi(
+ () -> effect.getOnIncoming().accept(null),
+ NOOP,
+ NOOP,
+ () -> effect.getOnLeaving().accept(null),
+ NOOP);
+ }
- static OSGi<Void> effects(
- Runnable onAddingBefore, Runnable onAddingAfter,
- Runnable onRemovingBefore, Runnable onRemovingAfter) {
+ static OSGi<Void> effects(Runnable onAdding, Runnable onRemoving) {
+ return new EffectsOSGi(onAdding, NOOP, NOOP, onRemoving, NOOP);
+ }
- return new EffectsOSGi(
- onAddingBefore, onAddingAfter, onRemovingBefore, onRemovingAfter,
- NOOP);
- }
+ static OSGi<Void> effects(
+ Runnable onAddingBefore, Runnable onAddingAfter,
+ Runnable onRemovingBefore, Runnable onRemovingAfter) {
- static OSGi<Void> effects(
- Runnable onAddingBefore, Runnable onAddingAfter,
- Runnable onRemovingBefore, Runnable onRemovingAfter, Runnable onUpdate) {
+ return new EffectsOSGi(
+ onAddingBefore, onAddingAfter, onRemovingBefore, onRemovingAfter,
+ NOOP);
+ }
- return new EffectsOSGi(
- onAddingBefore, onAddingAfter, onRemovingBefore, onRemovingAfter, onUpdate);
- }
+ static OSGi<Void> effects(
+ Runnable onAddingBefore, Runnable onAddingAfter,
+ Runnable onRemovingBefore, Runnable onRemovingAfter, Runnable onUpdate) {
- static <T> OSGi<T> fromOsgiRunnable(OSGiRunnable<T> runnable) {
- return getOsgiFactory().create(runnable);
- }
+ return new EffectsOSGi(
+ onAddingBefore, onAddingAfter, onRemovingBefore, onRemovingAfter, onUpdate);
+ }
- static OSGiFactory getOsgiFactory() {
- return OSGiImpl::create;
- }
+ static <T> OSGi<T> fromOsgiRunnable(OSGiRunnable<T> runnable) {
+ return getOsgiFactory().create(runnable);
+ }
- static OSGi<Void> ignore(OSGi<?> program) {
- return new IgnoreImpl(program);
- }
+ static OSGiFactory getOsgiFactory() {
+ return OSGiImpl::create;
+ }
- static <S> OSGi<S> join(OSGi<OSGi<S>> program) {
- return program.flatMap(x -> x);
- }
+ static OSGi<Void> ignore(OSGi<?> program) {
+ return new IgnoreImpl(program);
+ }
- static <S> OSGi<S> just(S s) {
- return new JustOSGiImpl<>(s);
- }
+ static <S> OSGi<S> join(OSGi<OSGi<S>> program) {
+ return program.flatMap(x -> x);
+ }
- static <S> OSGi<S> just(Collection<S> s) {
- return new JustOSGiImpl<>(s);
- }
+ static <S> OSGi<S> just(S s) {
+ return new JustOSGiImpl<>(s);
+ }
- static <S> OSGi<S> just(Supplier<S> s) {
- return new JustOSGiImpl<>(() -> Collections.singletonList(s.get()));
- }
+ static <S> OSGi<S> just(Collection<S> s) {
+ return new JustOSGiImpl<>(s);
+ }
+
+ static <S> OSGi<S> just(Supplier<S> s) {
+ return new JustOSGiImpl<>(() -> Collections.singletonList(s.get()));
+ }
- static <S> OSGi<S> nothing() {
- return new NothingOSGiImpl<>();
- }
+ static <S> OSGi<S> nothing() {
+ return new NothingOSGiImpl<>();
+ }
- @Deprecated()
- /**
- * @deprecated see {@link #effects(Runnable, Runnable)}
- */
- static OSGi<Void> onClose(Runnable action) {
- return effects(NOOP, action);
- }
+ @Deprecated()
+ /**
+ * @deprecated see {@link #effects(Runnable, Runnable)}
+ */
+ static OSGi<Void> onClose(Runnable action) {
+ return effects(NOOP, action);
+ }
- static <T> OSGi<T> once(OSGi<T> program) {
- return program.transform(new OnceTransformer<>());
- }
+ static <T> OSGi<T> once(OSGi<T> program) {
+ return program.transform(new OnceTransformer<>());
+ }
- static OSGi<ServiceObjects<Object>> prototypes(String filterString) {
- return prototypes(null, filterString);
- }
+ static OSGi<ServiceObjects<Object>> prototypes(String filterString) {
+ return prototypes(null, filterString);
+ }
- static <T> OSGi<ServiceObjects<T>> prototypes(Class<T> clazz) {
- return prototypes(clazz, null);
- }
+ static <T> OSGi<ServiceObjects<T>> prototypes(Class<T> clazz) {
+ return prototypes(clazz, null);
+ }
- static <T> OSGi<ServiceObjects<T>> prototypes(
- Class<T> clazz, String filterString) {
+ static <T> OSGi<ServiceObjects<T>> prototypes(
+ Class<T> clazz, String filterString) {
- return
- bundleContext().flatMap(
- bundleContext ->
+ return
+ bundleContext().flatMap(
+ bundleContext ->
- serviceReferences(clazz, filterString).map(
- CachingServiceReference::getServiceReference
- ).map(
- bundleContext::getServiceObjects)
- );
- }
+ serviceReferences(clazz, filterString).map(
+ CachingServiceReference::getServiceReference
+ ).map(
+ bundleContext::getServiceObjects)
+ );
+ }
- static <T> OSGi<ServiceObjects<T>> prototypes(
- CachingServiceReference<T> serviceReference) {
+ static <T> OSGi<ServiceObjects<T>> prototypes(
+ CachingServiceReference<T> serviceReference) {
- return
- bundleContext().flatMap(bundleContext ->
- just(bundleContext.getServiceObjects(
- serviceReference.getServiceReference())));
- }
+ return
+ bundleContext().flatMap(bundleContext ->
+ just(bundleContext.getServiceObjects(
+ serviceReference.getServiceReference())));
+ }
- static <T> OSGi<ServiceObjects<T>> prototypes(
- ServiceReference<T> serviceReference) {
+ static <T> OSGi<ServiceObjects<T>> prototypes(
+ ServiceReference<T> serviceReference) {
- return
- bundleContext().flatMap(bundleContext ->
- just(bundleContext.getServiceObjects(serviceReference)));
- }
+ return
+ bundleContext().flatMap(bundleContext ->
+ just(bundleContext.getServiceObjects(serviceReference)));
+ }
- static <T> OSGi<ServiceObjects<T>> prototypes(
- OSGi<ServiceReference<T>> serviceReference) {
+ static <T> OSGi<ServiceObjects<T>> prototypes(
+ OSGi<ServiceReference<T>> serviceReference) {
- return serviceReference.flatMap(OSGi::prototypes);
- }
+ return serviceReference.flatMap(OSGi::prototypes);
+ }
- static <T> OSGi<T> recover(OSGi<T> program, BiFunction<T, Exception, T> function) {
- return new RecoverOSGi<>(program, function);
- }
+ static <T> OSGi<T> recover(OSGi<T> program, BiFunction<T, Exception, T> function) {
+ return new RecoverOSGi<>(program, function);
+ }
- static <T> OSGi<T> recoverWith(OSGi<T> program, BiFunction<T, Exception, OSGi<T>> function) {
- return new RecoverWithOSGi<>(program, function);
- }
+ static <T> OSGi<T> recoverWith(OSGi<T> program, BiFunction<T, Exception, OSGi<T>> function) {
+ return new RecoverWithOSGi<>(program, function);
+ }
- static <T> OSGi<T> refreshAsUpdates(OSGi<T> program) {
- return program.transform(new RefreshAsUpdatesTransformer<>());
- }
+ static <T> OSGi<T> refreshAsUpdates(OSGi<T> program) {
+ return program.transform(new RefreshAsUpdatesTransformer<>());
+ }
- static <T> OSGi<T> refreshWhen(OSGi<T> program, Predicate<T> refresher) {
- return new RefreshWhenOSGi<>(program, refresher);
- }
+ static <T> OSGi<T> refreshWhen(OSGi<T> program, Predicate<T> refresher) {
+ return new RefreshWhenOSGi<>(program, refresher);
+ }
- static <T> OSGi<ServiceRegistration<T>> register(
- Class<T> clazz, T service, Map<String, Object> properties) {
+ static <T> OSGi<ServiceRegistration<T>> register(
+ Class<T> clazz, T service, Map<String, Object> properties) {
- return register(clazz, () -> service, () -> properties);
- }
+ return register(clazz, () -> service, () -> properties);
+ }
- static <T> OSGi<ServiceRegistration<T>> register(
- Class<T> clazz, ServiceFactory<T> service,
- Map<String, Object> properties) {
+ static <T> OSGi<ServiceRegistration<T>> register(
+ Class<T> clazz, ServiceFactory<T> service,
+ Map<String, Object> properties) {
- return register(clazz, service, () -> properties);
- }
+ return register(clazz, service, () -> properties);
+ }
- @SuppressWarnings({ "rawtypes", "unchecked" })
- static OSGi<ServiceRegistration<?>> register(
- String[] classes, Object service, Map<String, ?> properties) {
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+ static OSGi<ServiceRegistration<?>> register(
+ String[] classes, Object service, Map<String, ?> properties) {
- return new ServiceRegistrationOSGiImpl(
- classes, () -> service, () -> properties);
- }
+ return new ServiceRegistrationOSGiImpl(
+ classes, () -> service, () -> properties);
+ }
- static <T> OSGi<ServiceRegistration<T>> register(
- Class<T> clazz, Supplier<T> service,
- Supplier<Map<String, ?>> properties) {
+ static <T> OSGi<ServiceRegistration<T>> register(
+ Class<T> clazz, Supplier<T> service,
+ Supplier<Map<String, ?>> properties) {
- return new ServiceRegistrationOSGiImpl<>(clazz, service, properties);
- }
+ return new ServiceRegistrationOSGiImpl<>(clazz, service, properties);
+ }
- static <T> OSGi<ServiceRegistration<T>> register(
- Class<T> clazz, ServiceFactory<T> service,
- Supplier<Map<String, ?>> properties) {
+ static <T> OSGi<ServiceRegistration<T>> register(
+ Class<T> clazz, ServiceFactory<T> service,
+ Supplier<Map<String, ?>> properties) {
- return new ServiceRegistrationOSGiImpl<>(clazz, service, properties);
- }
+ return new ServiceRegistrationOSGiImpl<>(clazz, service, properties);
+ }
- @SuppressWarnings({ "rawtypes", "unchecked" })
- static OSGi<ServiceRegistration<?>> register(
- String[] classes, Supplier<Object> service,
- Supplier<Map<String, ?>> properties) {
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+ static OSGi<ServiceRegistration<?>> register(
+ String[] classes, Supplier<Object> service,
+ Supplier<Map<String, ?>> properties) {
- return new ServiceRegistrationOSGiImpl(classes, service, properties);
- }
+ return new ServiceRegistrationOSGiImpl(classes, service, properties);
+ }
- static <T> OSGi<T> service(ServiceReference<T> serviceReference) {
- return
- bundleContext().flatMap(bundleContext -> {
- T service = bundleContext.getService(serviceReference);
+ static <T> OSGi<T> service(ServiceReference<T> serviceReference) {
+ return
+ bundleContext().flatMap(bundleContext -> {
+ T service = bundleContext.getService(serviceReference);
- return
- onClose(() -> bundleContext.ungetService(serviceReference)).
- then(
- just(service));
- });
- }
+ return
+ onClose(() -> bundleContext.ungetService(serviceReference)).
+ then(
+ just(service));
+ });
+ }
- static <T> OSGi<T> service(CachingServiceReference<T> serviceReference) {
- return
- bundleContext().flatMap(bundleContext -> {
- T service = bundleContext.getService(
- serviceReference.getServiceReference());
+ static <T> OSGi<T> service(CachingServiceReference<T> serviceReference) {
+ return
+ bundleContext().flatMap(bundleContext -> {
+ T service = bundleContext.getService(
+ serviceReference.getServiceReference());
- return
- onClose(() -> bundleContext.ungetService(
- serviceReference.getServiceReference())).
- then(
- just(service));
- });
- }
+ return
+ onClose(() -> bundleContext.ungetService(
+ serviceReference.getServiceReference())).
+ then(
+ just(service));
+ });
+ }
- static <T> OSGi<T> service(
- OSGi<CachingServiceReference<T>> serviceReference) {
+ static <T> OSGi<T> service(
+ OSGi<CachingServiceReference<T>> serviceReference) {
- return serviceReference.flatMap(OSGi::service);
- }
+ return serviceReference.flatMap(OSGi::service);
+ }
- static <T> OSGi<CachingServiceReference<T>> serviceReferences(
- Class<T> clazz) {
+ static <T> OSGi<CachingServiceReference<T>> serviceReferences(
+ Class<T> clazz) {
- return serviceReferences(clazz, (String)null);
- }
+ return serviceReferences(clazz, (String)null);
+ }
- static OSGi<CachingServiceReference<Object>> serviceReferences(
- String filterString) {
+ static OSGi<CachingServiceReference<Object>> serviceReferences(
+ String filterString) {
- return serviceReferences(null, filterString);
- }
+ return serviceReferences(null, filterString);
+ }
- static <T> OSGi<CachingServiceReference<T>> serviceReferences(
- Class<T> clazz, String filterString) {
+ static <T> OSGi<CachingServiceReference<T>> serviceReferences(
+ Class<T> clazz, String filterString) {
- return serviceReferences(
- clazz, filterString, CachingServiceReference::isDirty);
- }
+ return serviceReferences(
+ clazz, filterString, CachingServiceReference::isDirty);
+ }
- static <T> OSGi<CachingServiceReference<T>> serviceReferences(
- Class<T> clazz, String filterString,
- Refresher<? super CachingServiceReference<T>> onModified) {
+ static <T> OSGi<CachingServiceReference<T>> serviceReferences(
+ Class<T> clazz, String filterString,
+ Refresher<? super CachingServiceReference<T>> onModified) {
- return refreshWhen(
- new ServiceReferenceOSGi<>(clazz, filterString),
- onModified::test);
+ return refreshWhen(
+ new ServiceReferenceOSGi<>(clazz, filterString),
+ onModified::test);
- }
+ }
- static <T> OSGi<CachingServiceReference<T>> serviceReferences(
- Class<T> clazz,
- Refresher<? super CachingServiceReference<T>> onModified) {
+ static <T> OSGi<CachingServiceReference<T>> serviceReferences(
+ Class<T> clazz,
+ Refresher<? super CachingServiceReference<T>> onModified) {
- return refreshWhen(
- serviceReferences(clazz, (String)null),
- onModified::test);
- }
+ return refreshWhen(
+ serviceReferences(clazz, (String)null),
+ onModified::test);
+ }
- static OSGi<CachingServiceReference<Object>> serviceReferences(
- String filterString,
- Refresher<? super CachingServiceReference<Object>> onModified) {
+ static OSGi<CachingServiceReference<Object>> serviceReferences(
+ String filterString,
+ Refresher<? super CachingServiceReference<Object>> onModified) {
- return refreshWhen(
- serviceReferences(null, filterString),
- onModified::test);
- }
+ return refreshWhen(
+ serviceReferences(null, filterString),
+ onModified::test);
+ }
- static <T> OSGi<T> services(Class<T> clazz) {
- return services(clazz, null);
- }
+ static <T> OSGi<T> services(Class<T> clazz) {
+ return services(clazz, null);
+ }
- static <T> OSGi<Object> services(String filterString) {
- return services(null, filterString);
- }
+ static <T> OSGi<Object> services(String filterString) {
+ return services(null, filterString);
+ }
- static <T> OSGi<T> services(Class<T> clazz, String filterString) {
- return
- bundleContext().flatMap(
- bundleContext ->
+ static <T> OSGi<T> services(Class<T> clazz, String filterString) {
+ return
+ bundleContext().flatMap(
+ bundleContext ->
- serviceReferences(clazz, filterString).map(
- CachingServiceReference::getServiceReference
- ).flatMap(
- sr -> {
- T service = bundleContext.getService(sr);
+ serviceReferences(clazz, filterString).map(
+ CachingServiceReference::getServiceReference
+ ).flatMap(
+ sr -> {
+ T service = bundleContext.getService(sr);
- return
- onClose(() -> bundleContext.ungetService(sr)).then(
- just(service)
- );
- }
- ));
- }
+ return
+ onClose(() -> bundleContext.ungetService(sr)).then(
+ just(service)
+ );
+ }
+ ));
+ }
- <S> OSGi<S> applyTo(OSGi<Function<T, S>> fun);
+ <S> OSGi<S> applyTo(OSGi<Function<T, S>> fun);
- <S> OSGi<S> choose(
- Function<T, OSGi<Boolean>> chooser, Function<OSGi<T>, OSGi<S>> then,
- Function<OSGi<T>, OSGi<S>> otherwise);
+ <S> OSGi<S> choose(
+ Function<T, OSGi<Boolean>> chooser, Function<OSGi<T>, OSGi<S>> then,
+ Function<OSGi<T>, OSGi<S>> otherwise);
- <S> OSGi<S> distribute(@SuppressWarnings("unchecked") Function<OSGi<T>, OSGi<S>> ... funs);
+ <S> OSGi<S> distribute(@SuppressWarnings("unchecked") Function<OSGi<T>, OSGi<S>> ... funs);
- default OSGi<T> effects(
- Consumer<? super T> onAdded, Consumer<? super T> onRemoved) {
+ default OSGi<T> effects(
+ Consumer<? super T> onAdded, Consumer<? super T> onRemoved) {
- return effects(onAdded, __ -> {}, __ -> {}, onRemoved);
- }
+ return effects(onAdded, __ -> {}, __ -> {}, onRemoved);
+ }
- default OSGi<T> effects(
- Consumer<? super T> onAdded, Consumer<? super T> onRemoved, Consumer<? super T> onUpdate) {
+ default OSGi<T> effects(
+ Consumer<? super T> onAdded, Consumer<? super T> onRemoved, Consumer<? super T> onUpdate) {
- return effects(onAdded, __ -> {}, __ -> {}, onRemoved, onUpdate);
- }
+ return effects(onAdded, __ -> {}, __ -> {}, onRemoved, onUpdate);
+ }
- default OSGi<T> effects(
- Consumer<? super T> onAddedBefore, Consumer<? super T> onAddedAfter,
- Consumer<? super T> onRemovedBefore,
- Consumer<? super T> onRemovedAfter) {
+ default OSGi<T> effects(
+ Consumer<? super T> onAddedBefore, Consumer<? super T> onAddedAfter,
+ Consumer<? super T> onRemovedBefore,
+ Consumer<? super T> onRemovedAfter) {
- return effects(
- onAddedBefore, onAddedAfter, onRemovedBefore, onRemovedAfter, __ -> {});
- }
+ return effects(
+ onAddedBefore, onAddedAfter, onRemovedBefore, onRemovedAfter, __ -> {});
+ }
- OSGi<T> effects(
- Consumer<? super T> onAddedBefore, Consumer<? super T> onAddedAfter,
- Consumer<? super T> onRemovedBefore,
- Consumer<? super T> onRemovedAfter,
- Consumer<? super T> onUpdate);
+ OSGi<T> effects(
+ Consumer<? super T> onAddedBefore, Consumer<? super T> onAddedAfter,
+ Consumer<? super T> onRemovedBefore,
+ Consumer<? super T> onRemovedAfter,
+ Consumer<? super T> onUpdate);
- default OSGi<T> effects(Effect<? super T> effect) {
- return effects(effect.getOnIncoming(), effect.getOnLeaving());
- }
+ default OSGi<T> effects(Effect<? super T> effect) {
+ return effects(effect.getOnIncoming(), effect.getOnLeaving());
+ }
- OSGi<T> filter(Predicate<T> predicate);
+ OSGi<T> filter(Predicate<T> predicate);
- <S> OSGi<S> flatMap(Function<? super T, OSGi<? extends S>> fun);
+ <S> OSGi<S> flatMap(Function<? super T, OSGi<? extends S>> fun);
- default OSGi<Void> foreach(Consumer<? super T> onAdded) {
- return foreach(onAdded, __ -> {});
- }
+ default OSGi<Void> foreach(Consumer<? super T> onAdded) {
+ return foreach(onAdded, __ -> {});
+ }
- default OSGi<Void> foreach(
- Consumer<? super T> onAdded, Consumer<? super T> onRemoved) {
+ default OSGi<Void> foreach(
+ Consumer<? super T> onAdded, Consumer<? super T> onRemoved) {
- return ignore(effects(onAdded, onRemoved));
- }
+ return ignore(effects(onAdded, onRemoved));
+ }
- <S> OSGi<S> map(Function<? super T, ? extends S> function);
+ <S> OSGi<S> map(Function<? super T, ? extends S> function);
- @Deprecated
- /**
- * @deprecated in favor of {@link OSGi#recover(OSGi, BiFunction)}
- */
- OSGi<T> recover(BiFunction<T, Exception, T> onError);
+ @Deprecated
+ /**
+ * @deprecated in favor of {@link OSGi#recover(OSGi, BiFunction)}
+ */
+ OSGi<T> recover(BiFunction<T, Exception, T> onError);
- @Deprecated
- /**
- * @deprecated in favor of {@link OSGi#recoverWith(OSGi, BiFunction)}
- */
- OSGi<T> recoverWith(BiFunction<T, Exception, OSGi<T>> onError);
+ @Deprecated
+ /**
+ * @deprecated in favor of {@link OSGi#recoverWith(OSGi, BiFunction)}
+ */
+ OSGi<T> recoverWith(BiFunction<T, Exception, OSGi<T>> onError);
- <K, S> OSGi<S> splitBy(
- Function<T, OSGi<K>> mapper, BiFunction<K, OSGi<T>, OSGi<S>> fun);
+ <K, S> OSGi<S> splitBy(
+ Function<T, OSGi<K>> mapper, BiFunction<K, OSGi<T>, OSGi<S>> fun);
- default public <S> OSGi<S> then(OSGi<S> next) {
- return flatMap(__ -> next);
- }
+ default public <S> OSGi<S> then(OSGi<S> next) {
+ return flatMap(__ -> next);
+ }
- <S> OSGi<S> transform(Transformer<T, S> fun);
+ <S> OSGi<S> transform(Transformer<T, S> fun);
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/OSGiResult.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/OSGiResult.java
index 26f9807..6150ded 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/OSGiResult.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/OSGiResult.java
@@ -22,15 +22,15 @@
*/
public interface OSGiResult extends AutoCloseable, Runnable {
- @Override
- public void close();
+ @Override
+ public void close();
- default void run() {
- close();
- }
+ default void run() {
+ close();
+ }
- public default boolean update() {
- return false;
- };
+ public default boolean update() {
+ return false;
+ };
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/OSGiRunnable.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/OSGiRunnable.java
index 0721ba4..e47325f 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/OSGiRunnable.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/OSGiRunnable.java
@@ -24,30 +24,30 @@
*/
public interface OSGiRunnable<T> {
- default OSGiResult run(ExecutionContext executionContext) {
- return run(executionContext, (__) -> () -> {});
- }
+ default OSGiResult run(ExecutionContext executionContext) {
+ return run(executionContext, (__) -> () -> {});
+ }
- default OSGiResult run(BundleContext bundleContext) {
- return run(new ExecutionContext(bundleContext), (__) -> () -> {});
- }
+ default OSGiResult run(BundleContext bundleContext) {
+ return run(new ExecutionContext(bundleContext), (__) -> () -> {});
+ }
- OSGiResult run(ExecutionContext executionContext, Publisher<? super T> andThen);
+ OSGiResult run(ExecutionContext executionContext, Publisher<? super T> andThen);
- default OSGiResult run(BundleContext bundleContext, Publisher<? super T> andThen) {
- return run(new ExecutionContext(bundleContext), andThen);
- }
+ default OSGiResult run(BundleContext bundleContext, Publisher<? super T> andThen) {
+ return run(new ExecutionContext(bundleContext), andThen);
+ }
- public class ExecutionContext {
- private BundleContext bundleContext;
+ public class ExecutionContext {
+ private BundleContext bundleContext;
- public ExecutionContext(BundleContext bundleContext) {
- this.bundleContext = bundleContext;
- }
+ public ExecutionContext(BundleContext bundleContext) {
+ this.bundleContext = bundleContext;
+ }
- public BundleContext getBundleContext() {
- return bundleContext;
- }
- }
+ public BundleContext getBundleContext() {
+ return bundleContext;
+ }
+ }
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function1.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function1.java
index ddb60f3..f6a068b 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function1.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function1.java
@@ -20,14 +20,14 @@
import java.util.function.Function;
/**
-* generated
-*/
+ * generated
+ */
@FunctionalInterface
-public interface Function1<A,RESULT> {
-
+public interface Function1<A, RESULT> {
+
public RESULT apply(A a);
-
- default public Function<A,RESULT> curried() {
+
+ default public Function<A, RESULT> curried() {
return a -> apply(a);
}
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function10.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function10.java
index 4340f5d..2474ac3 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function10.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function10.java
@@ -24,9 +24,9 @@
*/
@FunctionalInterface
public interface Function10<A,B,C,D,E,F,G,H,I,J,RESULT> {
-
+
public RESULT apply(A a,B b,C c,D d,E e,F f,G g,H h,I i,J j);
-
+
default public Function<A,Function<B,Function<C,Function<D,Function<E,Function<F,Function<G,Function<H,Function<I,Function<J,RESULT>>>>>>>>>> curried() {
return a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> apply(a,b,c,d,e,f,g,h,i,j);
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function11.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function11.java
index 7d5c619..b0849c1 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function11.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function11.java
@@ -24,9 +24,9 @@
*/
@FunctionalInterface
public interface Function11<A,B,C,D,E,F,G,H,I,J,K,RESULT> {
-
+
public RESULT apply(A a,B b,C c,D d,E e,F f,G g,H h,I i,J j,K k);
-
+
default public Function<A,Function<B,Function<C,Function<D,Function<E,Function<F,Function<G,Function<H,Function<I,Function<J,Function<K,RESULT>>>>>>>>>>> curried() {
return a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> apply(a,b,c,d,e,f,g,h,i,j,k);
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function12.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function12.java
index 5068db4..f04b5f2 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function12.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function12.java
@@ -24,9 +24,9 @@
*/
@FunctionalInterface
public interface Function12<A,B,C,D,E,F,G,H,I,J,K,L,RESULT> {
-
+
public RESULT apply(A a,B b,C c,D d,E e,F f,G g,H h,I i,J j,K k,L l);
-
+
default public Function<A,Function<B,Function<C,Function<D,Function<E,Function<F,Function<G,Function<H,Function<I,Function<J,Function<K,Function<L,RESULT>>>>>>>>>>>> curried() {
return a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> apply(a,b,c,d,e,f,g,h,i,j,k,l);
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function13.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function13.java
index a329f8e..6604636 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function13.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function13.java
@@ -24,9 +24,9 @@
*/
@FunctionalInterface
public interface Function13<A,B,C,D,E,F,G,H,I,J,K,L,M,RESULT> {
-
+
public RESULT apply(A a,B b,C c,D d,E e,F f,G g,H h,I i,J j,K k,L l,M m);
-
+
default public Function<A,Function<B,Function<C,Function<D,Function<E,Function<F,Function<G,Function<H,Function<I,Function<J,Function<K,Function<L,Function<M,RESULT>>>>>>>>>>>>> curried() {
return a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> apply(a,b,c,d,e,f,g,h,i,j,k,l,m);
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function14.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function14.java
index fdf76fd..a0e5df5 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function14.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function14.java
@@ -24,9 +24,9 @@
*/
@FunctionalInterface
public interface Function14<A,B,C,D,E,F,G,H,I,J,K,L,M,N,RESULT> {
-
+
public RESULT apply(A a,B b,C c,D d,E e,F f,G g,H h,I i,J j,K k,L l,M m,N n);
-
+
default public Function<A,Function<B,Function<C,Function<D,Function<E,Function<F,Function<G,Function<H,Function<I,Function<J,Function<K,Function<L,Function<M,Function<N,RESULT>>>>>>>>>>>>>> curried() {
return a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n -> apply(a,b,c,d,e,f,g,h,i,j,k,l,m,n);
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function15.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function15.java
index 66b9312..e77009b 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function15.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function15.java
@@ -24,9 +24,9 @@
*/
@FunctionalInterface
public interface Function15<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,RESULT> {
-
+
public RESULT apply(A a,B b,C c,D d,E e,F f,G g,H h,I i,J j,K k,L l,M m,N n,O o);
-
+
default public Function<A,Function<B,Function<C,Function<D,Function<E,Function<F,Function<G,Function<H,Function<I,Function<J,Function<K,Function<L,Function<M,Function<N,Function<O,RESULT>>>>>>>>>>>>>>> curried() {
return a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n -> o -> apply(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o);
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function16.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function16.java
index 69213f1..51168e1 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function16.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function16.java
@@ -24,9 +24,9 @@
*/
@FunctionalInterface
public interface Function16<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,RESULT> {
-
+
public RESULT apply(A a,B b,C c,D d,E e,F f,G g,H h,I i,J j,K k,L l,M m,N n,O o,P p);
-
+
default public Function<A,Function<B,Function<C,Function<D,Function<E,Function<F,Function<G,Function<H,Function<I,Function<J,Function<K,Function<L,Function<M,Function<N,Function<O,Function<P,RESULT>>>>>>>>>>>>>>>> curried() {
return a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n -> o -> p -> apply(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p);
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function17.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function17.java
index 62621ad..cfe2f5e 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function17.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function17.java
@@ -24,9 +24,9 @@
*/
@FunctionalInterface
public interface Function17<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,RESULT> {
-
+
public RESULT apply(A a,B b,C c,D d,E e,F f,G g,H h,I i,J j,K k,L l,M m,N n,O o,P p,Q q);
-
+
default public Function<A,Function<B,Function<C,Function<D,Function<E,Function<F,Function<G,Function<H,Function<I,Function<J,Function<K,Function<L,Function<M,Function<N,Function<O,Function<P,Function<Q,RESULT>>>>>>>>>>>>>>>>> curried() {
return a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n -> o -> p -> q -> apply(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q);
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function18.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function18.java
index 5898012..6280ec8 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function18.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function18.java
@@ -24,9 +24,9 @@
*/
@FunctionalInterface
public interface Function18<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,RESULT> {
-
+
public RESULT apply(A a,B b,C c,D d,E e,F f,G g,H h,I i,J j,K k,L l,M m,N n,O o,P p,Q q,R r);
-
+
default public Function<A,Function<B,Function<C,Function<D,Function<E,Function<F,Function<G,Function<H,Function<I,Function<J,Function<K,Function<L,Function<M,Function<N,Function<O,Function<P,Function<Q,Function<R,RESULT>>>>>>>>>>>>>>>>>> curried() {
return a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n -> o -> p -> q -> r -> apply(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r);
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function19.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function19.java
index f8f4631..a81d4f0 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function19.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function19.java
@@ -24,9 +24,9 @@
*/
@FunctionalInterface
public interface Function19<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,RESULT> {
-
+
public RESULT apply(A a,B b,C c,D d,E e,F f,G g,H h,I i,J j,K k,L l,M m,N n,O o,P p,Q q,R r,S s);
-
+
default public Function<A,Function<B,Function<C,Function<D,Function<E,Function<F,Function<G,Function<H,Function<I,Function<J,Function<K,Function<L,Function<M,Function<N,Function<O,Function<P,Function<Q,Function<R,Function<S,RESULT>>>>>>>>>>>>>>>>>>> curried() {
return a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n -> o -> p -> q -> r -> s -> apply(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s);
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function2.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function2.java
index d096223..0b34278 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function2.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function2.java
@@ -20,14 +20,14 @@
import java.util.function.Function;
/**
-* generated
-*/
+ * generated
+ */
@FunctionalInterface
-public interface Function2<A,B,RESULT> {
-
- public RESULT apply(A a,B b);
-
- default public Function<A,Function<B,RESULT>> curried() {
- return a -> b -> apply(a,b);
+public interface Function2<A, B, RESULT> {
+
+ public RESULT apply(A a, B b);
+
+ default public Function<A, Function<B, RESULT>> curried() {
+ return a -> b -> apply(a, b);
}
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function20.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function20.java
index 80a21d1..57b76b5 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function20.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function20.java
@@ -24,9 +24,9 @@
*/
@FunctionalInterface
public interface Function20<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,RESULT> {
-
+
public RESULT apply(A a,B b,C c,D d,E e,F f,G g,H h,I i,J j,K k,L l,M m,N n,O o,P p,Q q,R r,S s,T t);
-
+
default public Function<A,Function<B,Function<C,Function<D,Function<E,Function<F,Function<G,Function<H,Function<I,Function<J,Function<K,Function<L,Function<M,Function<N,Function<O,Function<P,Function<Q,Function<R,Function<S,Function<T,RESULT>>>>>>>>>>>>>>>>>>>> curried() {
return a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n -> o -> p -> q -> r -> s -> t -> apply(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t);
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function21.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function21.java
index e7d2e40..0a41989 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function21.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function21.java
@@ -24,9 +24,9 @@
*/
@FunctionalInterface
public interface Function21<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,RESULT> {
-
+
public RESULT apply(A a,B b,C c,D d,E e,F f,G g,H h,I i,J j,K k,L l,M m,N n,O o,P p,Q q,R r,S s,T t,U u);
-
+
default public Function<A,Function<B,Function<C,Function<D,Function<E,Function<F,Function<G,Function<H,Function<I,Function<J,Function<K,Function<L,Function<M,Function<N,Function<O,Function<P,Function<Q,Function<R,Function<S,Function<T,Function<U,RESULT>>>>>>>>>>>>>>>>>>>>> curried() {
return a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n -> o -> p -> q -> r -> s -> t -> u -> apply(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u);
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function22.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function22.java
index ff8df1a..af89b30 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function22.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function22.java
@@ -24,9 +24,9 @@
*/
@FunctionalInterface
public interface Function22<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,RESULT> {
-
+
public RESULT apply(A a,B b,C c,D d,E e,F f,G g,H h,I i,J j,K k,L l,M m,N n,O o,P p,Q q,R r,S s,T t,U u,V v);
-
+
default public Function<A,Function<B,Function<C,Function<D,Function<E,Function<F,Function<G,Function<H,Function<I,Function<J,Function<K,Function<L,Function<M,Function<N,Function<O,Function<P,Function<Q,Function<R,Function<S,Function<T,Function<U,Function<V,RESULT>>>>>>>>>>>>>>>>>>>>>> curried() {
return a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n -> o -> p -> q -> r -> s -> t -> u -> v -> apply(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v);
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function23.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function23.java
index cf2c92f..619cc38 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function23.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function23.java
@@ -24,9 +24,9 @@
*/
@FunctionalInterface
public interface Function23<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,RESULT> {
-
+
public RESULT apply(A a,B b,C c,D d,E e,F f,G g,H h,I i,J j,K k,L l,M m,N n,O o,P p,Q q,R r,S s,T t,U u,V v,W w);
-
+
default public Function<A,Function<B,Function<C,Function<D,Function<E,Function<F,Function<G,Function<H,Function<I,Function<J,Function<K,Function<L,Function<M,Function<N,Function<O,Function<P,Function<Q,Function<R,Function<S,Function<T,Function<U,Function<V,Function<W,RESULT>>>>>>>>>>>>>>>>>>>>>>> curried() {
return a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n -> o -> p -> q -> r -> s -> t -> u -> v -> w -> apply(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w);
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function24.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function24.java
index dd07760..e5db07e 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function24.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function24.java
@@ -24,9 +24,9 @@
*/
@FunctionalInterface
public interface Function24<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,RESULT> {
-
+
public RESULT apply(A a,B b,C c,D d,E e,F f,G g,H h,I i,J j,K k,L l,M m,N n,O o,P p,Q q,R r,S s,T t,U u,V v,W w,X x);
-
+
default public Function<A,Function<B,Function<C,Function<D,Function<E,Function<F,Function<G,Function<H,Function<I,Function<J,Function<K,Function<L,Function<M,Function<N,Function<O,Function<P,Function<Q,Function<R,Function<S,Function<T,Function<U,Function<V,Function<W,Function<X,RESULT>>>>>>>>>>>>>>>>>>>>>>>> curried() {
return a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n -> o -> p -> q -> r -> s -> t -> u -> v -> w -> x -> apply(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x);
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function25.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function25.java
index c20f944..8973677 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function25.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function25.java
@@ -24,9 +24,9 @@
*/
@FunctionalInterface
public interface Function25<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,RESULT> {
-
+
public RESULT apply(A a,B b,C c,D d,E e,F f,G g,H h,I i,J j,K k,L l,M m,N n,O o,P p,Q q,R r,S s,T t,U u,V v,W w,X x,Y y);
-
+
default public Function<A,Function<B,Function<C,Function<D,Function<E,Function<F,Function<G,Function<H,Function<I,Function<J,Function<K,Function<L,Function<M,Function<N,Function<O,Function<P,Function<Q,Function<R,Function<S,Function<T,Function<U,Function<V,Function<W,Function<X,Function<Y,RESULT>>>>>>>>>>>>>>>>>>>>>>>>> curried() {
return a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n -> o -> p -> q -> r -> s -> t -> u -> v -> w -> x -> y -> apply(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y);
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function26.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function26.java
index 6d61dc6..c8f4cbb 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function26.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function26.java
@@ -24,9 +24,9 @@
*/
@FunctionalInterface
public interface Function26<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,RESULT> {
-
+
public RESULT apply(A a,B b,C c,D d,E e,F f,G g,H h,I i,J j,K k,L l,M m,N n,O o,P p,Q q,R r,S s,T t,U u,V v,W w,X x,Y y,Z z);
-
+
default public Function<A,Function<B,Function<C,Function<D,Function<E,Function<F,Function<G,Function<H,Function<I,Function<J,Function<K,Function<L,Function<M,Function<N,Function<O,Function<P,Function<Q,Function<R,Function<S,Function<T,Function<U,Function<V,Function<W,Function<X,Function<Y,Function<Z,RESULT>>>>>>>>>>>>>>>>>>>>>>>>>> curried() {
return a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n -> o -> p -> q -> r -> s -> t -> u -> v -> w -> x -> y -> z -> apply(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z);
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function3.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function3.java
index b8b7a84..70e34fd 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function3.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function3.java
@@ -20,14 +20,14 @@
import java.util.function.Function;
/**
-* generated
-*/
+ * generated
+ */
@FunctionalInterface
-public interface Function3<A,B,C,RESULT> {
-
- public RESULT apply(A a,B b,C c);
-
- default public Function<A,Function<B,Function<C,RESULT>>> curried() {
- return a -> b -> c -> apply(a,b,c);
+public interface Function3<A, B, C, RESULT> {
+
+ public RESULT apply(A a, B b, C c);
+
+ default public Function<A, Function<B, Function<C, RESULT>>> curried() {
+ return a -> b -> c -> apply(a, b, c);
}
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function4.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function4.java
index f1efd72..e73f7b3 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function4.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function4.java
@@ -20,14 +20,14 @@
import java.util.function.Function;
/**
-* generated
-*/
+ * generated
+ */
@FunctionalInterface
-public interface Function4<A,B,C,D,RESULT> {
-
- public RESULT apply(A a,B b,C c,D d);
-
- default public Function<A,Function<B,Function<C,Function<D,RESULT>>>> curried() {
- return a -> b -> c -> d -> apply(a,b,c,d);
+public interface Function4<A, B, C, D, RESULT> {
+
+ public RESULT apply(A a, B b, C c, D d);
+
+ default public Function<A, Function<B, Function<C, Function<D, RESULT>>>> curried() {
+ return a -> b -> c -> d -> apply(a, b, c, d);
}
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function5.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function5.java
index 6a10d0d..c4e0811 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function5.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function5.java
@@ -20,14 +20,14 @@
import java.util.function.Function;
/**
-* generated
-*/
+ * generated
+ */
@FunctionalInterface
-public interface Function5<A,B,C,D,E,RESULT> {
-
- public RESULT apply(A a,B b,C c,D d,E e);
-
- default public Function<A,Function<B,Function<C,Function<D,Function<E,RESULT>>>>> curried() {
- return a -> b -> c -> d -> e -> apply(a,b,c,d,e);
+public interface Function5<A, B, C, D, E, RESULT> {
+
+ public RESULT apply(A a, B b, C c, D d, E e);
+
+ default public Function<A, Function<B, Function<C, Function<D, Function<E, RESULT>>>>> curried() {
+ return a -> b -> c -> d -> e -> apply(a, b, c, d, e);
}
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function6.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function6.java
index e49a3f2..ec8cc87 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function6.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function6.java
@@ -20,14 +20,14 @@
import java.util.function.Function;
/**
-* generated
-*/
+ * generated
+ */
@FunctionalInterface
-public interface Function6<A,B,C,D,E,F,RESULT> {
-
- public RESULT apply(A a,B b,C c,D d,E e,F f);
-
- default public Function<A,Function<B,Function<C,Function<D,Function<E,Function<F,RESULT>>>>>> curried() {
- return a -> b -> c -> d -> e -> f -> apply(a,b,c,d,e,f);
+public interface Function6<A, B, C, D, E, F, RESULT> {
+
+ public RESULT apply(A a, B b, C c, D d, E e, F f);
+
+ default public Function<A, Function<B, Function<C, Function<D, Function<E, Function<F, RESULT>>>>>> curried() {
+ return a -> b -> c -> d -> e -> f -> apply(a, b, c, d, e, f);
}
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function7.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function7.java
index 82028f2..a52745d 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function7.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function7.java
@@ -20,14 +20,14 @@
import java.util.function.Function;
/**
-* generated
-*/
+ * generated
+ */
@FunctionalInterface
-public interface Function7<A,B,C,D,E,F,G,RESULT> {
-
- public RESULT apply(A a,B b,C c,D d,E e,F f,G g);
-
- default public Function<A,Function<B,Function<C,Function<D,Function<E,Function<F,Function<G,RESULT>>>>>>> curried() {
- return a -> b -> c -> d -> e -> f -> g -> apply(a,b,c,d,e,f,g);
+public interface Function7<A, B, C, D, E, F, G, RESULT> {
+
+ public RESULT apply(A a, B b, C c, D d, E e, F f, G g);
+
+ default public Function<A, Function<B, Function<C, Function<D, Function<E, Function<F, Function<G, RESULT>>>>>>> curried() {
+ return a -> b -> c -> d -> e -> f -> g -> apply(a, b, c, d, e, f, g);
}
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function8.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function8.java
index 6d0f891..f554cff 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function8.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function8.java
@@ -24,9 +24,9 @@
*/
@FunctionalInterface
public interface Function8<A,B,C,D,E,F,G,H,RESULT> {
-
+
public RESULT apply(A a,B b,C c,D d,E e,F f,G g,H h);
-
+
default public Function<A,Function<B,Function<C,Function<D,Function<E,Function<F,Function<G,Function<H,RESULT>>>>>>>> curried() {
return a -> b -> c -> d -> e -> f -> g -> h -> apply(a,b,c,d,e,f,g,h);
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function9.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function9.java
index 808eb40..cd12ca4 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function9.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/function/Function9.java
@@ -24,9 +24,9 @@
*/
@FunctionalInterface
public interface Function9<A,B,C,D,E,F,G,H,I,RESULT> {
-
+
public RESULT apply(A a,B b,C c,D d,E e,F f,G g,H h,I i);
-
+
default public Function<A,Function<B,Function<C,Function<D,Function<E,Function<F,Function<G,Function<H,Function<I,RESULT>>>>>>>>> curried() {
return a -> b -> c -> d -> e -> f -> g -> h -> i -> apply(a,b,c,d,e,f,g,h,i);
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/BaseOSGiImpl.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/BaseOSGiImpl.java
index 2b8da59..e941cc4 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/BaseOSGiImpl.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/BaseOSGiImpl.java
@@ -34,178 +34,178 @@
*/
public class BaseOSGiImpl<T> implements OSGi<T> {
- protected BaseOSGiImpl(OSGiRunnable<T> operation) {
- _operation = operation;
- }
+ protected BaseOSGiImpl(OSGiRunnable<T> operation) {
+ _operation = operation;
+ }
- @Override
- public OSGiResult run(ExecutionContext executionContext) {
- return run(executionContext, x -> NOOP);
- }
+ @Override
+ public OSGiResult run(ExecutionContext executionContext) {
+ return run(executionContext, x -> NOOP);
+ }
- public OSGiResult run(
- ExecutionContext executionContext, Publisher<? super T> op) {
+ public OSGiResult run(
+ ExecutionContext executionContext, Publisher<? super T> op) {
- return _operation.run(executionContext, op);
- }
+ return _operation.run(executionContext, op);
+ }
- static Filter buildFilter(
- ExecutionContext executionContext, String filterString, Class<?> clazz) {
+ static Filter buildFilter(
+ ExecutionContext executionContext, String filterString, Class<?> clazz) {
- Filter filter;
+ Filter filter;
- String string = buildFilterString(filterString, clazz);
+ String string = buildFilterString(filterString, clazz);
- try {
- filter = executionContext.getBundleContext().createFilter(string);
- }
- catch (InvalidSyntaxException e) {
- throw new RuntimeException(e);
- }
+ try {
+ filter = executionContext.getBundleContext().createFilter(string);
+ }
+ catch (InvalidSyntaxException e) {
+ throw new RuntimeException(e);
+ }
- return filter;
- }
+ return filter;
+ }
- static String buildFilterString(String filterString, Class<?> clazz) {
- if (filterString == null && clazz == null) {
- throw new IllegalArgumentException(
- "Both filterString and clazz can't be null");
- }
+ static String buildFilterString(String filterString, Class<?> clazz) {
+ if (filterString == null && clazz == null) {
+ throw new IllegalArgumentException(
+ "Both filterString and clazz can't be null");
+ }
- StringBuilder stringBuilder = new StringBuilder();
+ StringBuilder stringBuilder = new StringBuilder();
- if (filterString != null) {
- stringBuilder.append(filterString);
- }
+ if (filterString != null) {
+ stringBuilder.append(filterString);
+ }
- if (clazz != null) {
- boolean extend = !(stringBuilder.length() == 0);
- if (extend) {
- stringBuilder.insert(0, "(&");
- }
+ if (clazz != null) {
+ boolean extend = !(stringBuilder.length() == 0);
+ if (extend) {
+ stringBuilder.insert(0, "(&");
+ }
- stringBuilder.
- append("(objectClass=").
- append(clazz.getName()).
- append(")");
+ stringBuilder.
+ append("(objectClass=").
+ append(clazz.getName()).
+ append(")");
- if (extend) {
- stringBuilder.append(")");
- }
+ if (extend) {
+ stringBuilder.append(")");
+ }
- }
+ }
- return stringBuilder.toString();
- }
+ return stringBuilder.toString();
+ }
- OSGiRunnable<T> _operation;
+ OSGiRunnable<T> _operation;
- @Override
- public <S> OSGi<S> applyTo(OSGi<Function<T, S>> fun) {
- return new BaseOSGiImpl<>((executionContext, op) -> {
- ConcurrentDoublyLinkedList<T> identities = new ConcurrentDoublyLinkedList<>();
- ConcurrentDoublyLinkedList<Function<T,S>> functions = new ConcurrentDoublyLinkedList<>();
- IdentityHashMap<T, IdentityHashMap<Function<T, S>, OSGiResult>>
- terminators = new IdentityHashMap<>();
+ @Override
+ public <S> OSGi<S> applyTo(OSGi<Function<T, S>> fun) {
+ return new BaseOSGiImpl<>((executionContext, op) -> {
+ ConcurrentDoublyLinkedList<T> identities = new ConcurrentDoublyLinkedList<>();
+ ConcurrentDoublyLinkedList<Function<T,S>> functions = new ConcurrentDoublyLinkedList<>();
+ IdentityHashMap<T, IdentityHashMap<Function<T, S>, OSGiResult>>
+ terminators = new IdentityHashMap<>();
- OSGiResult funRun = fun.run(
- executionContext,
- op.pipe(f -> {
- synchronized(identities) {
- ConcurrentDoublyLinkedList.Node node = functions.addLast(f);
+ OSGiResult funRun = fun.run(
+ executionContext,
+ op.pipe(f -> {
+ synchronized(identities) {
+ ConcurrentDoublyLinkedList.Node node = functions.addLast(f);
- for (T t : identities) {
- IdentityHashMap<Function<T, S>, OSGiResult> terminatorMap =
- terminators.computeIfAbsent(
- t, __ -> new IdentityHashMap<>());
- terminatorMap.put(f, op.apply(f.apply(t)));
- }
+ for (T t : identities) {
+ IdentityHashMap<Function<T, S>, OSGiResult> terminatorMap =
+ terminators.computeIfAbsent(
+ t, __ -> new IdentityHashMap<>());
+ terminatorMap.put(f, op.apply(f.apply(t)));
+ }
- return new OSGiResultImpl(
- () -> {
- synchronized (identities) {
- node.remove();
+ return new OSGiResultImpl(
+ () -> {
+ synchronized (identities) {
+ node.remove();
- identities.forEach(t -> {
- Runnable terminator = terminators.get(t).remove(f);
+ identities.forEach(t -> {
+ Runnable terminator = terminators.get(t).remove(f);
- terminator.run();
- });
- }
- },
- () -> {
- synchronized (identities) {
- return identities.stream().map(t -> {
- OSGiResult terminator = terminators.get(t).get(f);
+ terminator.run();
+ });
+ }
+ },
+ () -> {
+ synchronized (identities) {
+ return identities.stream().map(t -> {
+ OSGiResult terminator = terminators.get(t).get(f);
- return terminator.update();
- }).reduce(
- Boolean.FALSE, Boolean::logicalOr
- );
- }
- }
- );
- }
- }
- ));
+ return terminator.update();
+ }).reduce(
+ Boolean.FALSE, Boolean::logicalOr
+ );
+ }
+ }
+ );
+ }
+ }
+ ));
- OSGiResult myRun = run(
- executionContext,
- op.pipe(t -> {
- synchronized (identities) {
- ConcurrentDoublyLinkedList.Node node = identities.addLast(t);
+ OSGiResult myRun = run(
+ executionContext,
+ op.pipe(t -> {
+ synchronized (identities) {
+ ConcurrentDoublyLinkedList.Node node = identities.addLast(t);
- for (Function<T, S> f : functions) {
- IdentityHashMap<Function<T, S>, OSGiResult> terminatorMap =
- terminators.computeIfAbsent(
- t, __ -> new IdentityHashMap<>());
- terminatorMap.put(f, op.apply(f.apply(t)));
- }
+ for (Function<T, S> f : functions) {
+ IdentityHashMap<Function<T, S>, OSGiResult> terminatorMap =
+ terminators.computeIfAbsent(
+ t, __ -> new IdentityHashMap<>());
+ terminatorMap.put(f, op.apply(f.apply(t)));
+ }
- return new OSGiResultImpl(
- () -> {
- synchronized (identities) {
- node.remove();
+ return new OSGiResultImpl(
+ () -> {
+ synchronized (identities) {
+ node.remove();
- functions.forEach(f -> {
- Runnable terminator = terminators.get(t).remove(f);
+ functions.forEach(f -> {
+ Runnable terminator = terminators.get(t).remove(f);
- terminator.run();
- });
- }
- },
- () -> {
- synchronized (identities) {
- return functions.stream().map(f -> {
- OSGiResult terminator = terminators.get(t).get(f);
+ terminator.run();
+ });
+ }
+ },
+ () -> {
+ synchronized (identities) {
+ return functions.stream().map(f -> {
+ OSGiResult terminator = terminators.get(t).get(f);
- return terminator.update();
- }).reduce(
- Boolean.FALSE, Boolean::logicalOr
- );
- }
- }
- );
- }
- })
- );
+ return terminator.update();
+ }).reduce(
+ Boolean.FALSE, Boolean::logicalOr
+ );
+ }
+ }
+ );
+ }
+ })
+ );
- return new AggregateOSGiResult(myRun, funRun);
- });
- }
+ return new AggregateOSGiResult(myRun, funRun);
+ });
+ }
- @Override
- public <S> OSGi<S> choose(
- Function<T, OSGi<Boolean>> chooser, Function<OSGi<T>, OSGi<S>> then,
- Function<OSGi<T>, OSGi<S>> otherwise) {
+ @Override
+ public <S> OSGi<S> choose(
+ Function<T, OSGi<Boolean>> chooser, Function<OSGi<T>, OSGi<S>> then,
+ Function<OSGi<T>, OSGi<S>> otherwise) {
- return new BaseOSGiImpl<>((executionContext, op) -> {
- Pad<T, S> thenPad = new Pad<>(executionContext, then, op);
- Pad<T, S> elsePad = new Pad<>(executionContext, otherwise, op);
+ return new BaseOSGiImpl<>((executionContext, op) -> {
+ Pad<T, S> thenPad = new Pad<>(executionContext, then, op);
+ Pad<T, S> elsePad = new Pad<>(executionContext, otherwise, op);
- OSGiResult result = run(
- executionContext,
- op.pipe(t -> chooser.apply(t).run(
+ OSGiResult result = run(
+ executionContext,
+ op.pipe(t -> chooser.apply(t).run(
executionContext,
b -> {
if (b) {
@@ -215,189 +215,189 @@
}
}
)));
- return new AggregateOSGiResult(thenPad, elsePad, result);
- });
- }
+ return new AggregateOSGiResult(thenPad, elsePad, result);
+ });
+ }
- @Override
- public <S> OSGi<S> distribute(@SuppressWarnings("unchecked") Function<OSGi<T>, OSGi<S>>... funs) {
- return new DistributeOSGiImpl<>(this, funs);
- }
+ @Override
+ public <S> OSGi<S> distribute(@SuppressWarnings("unchecked") Function<OSGi<T>, OSGi<S>>... funs) {
+ return new DistributeOSGiImpl<>(this, funs);
+ }
- @Override
- public OSGi<T> effects(
- Consumer<? super T> onAddedBefore, Consumer<? super T> onAddedAfter,
- Consumer<? super T> onRemovedBefore,
- Consumer<? super T> onRemovedAfter,
- Consumer<? super T> onUpdate) {
+ @Override
+ public OSGi<T> effects(
+ Consumer<? super T> onAddedBefore, Consumer<? super T> onAddedAfter,
+ Consumer<? super T> onRemovedBefore,
+ Consumer<? super T> onRemovedAfter,
+ Consumer<? super T> onUpdate) {
- return transform(op -> t -> {
- onAddedBefore.accept(t);
+ return transform(op -> t -> {
+ onAddedBefore.accept(t);
- try {
- OSGiResult terminator = op.publish(t);
+ try {
+ OSGiResult terminator = op.publish(t);
- OSGiResult result = new OSGiResultImpl(() -> {
- try {
- onRemovedBefore.accept(t);
- }
- catch (Exception e) {
- //TODO: logging
- }
+ OSGiResult result = new OSGiResultImpl(() -> {
+ try {
+ onRemovedBefore.accept(t);
+ }
+ catch (Exception e) {
+ //TODO: logging
+ }
- try {
- terminator.run();
- }
- catch (Exception e) {
- //TODO: logging
- }
+ try {
+ terminator.run();
+ }
+ catch (Exception e) {
+ //TODO: logging
+ }
- try {
- onRemovedAfter.accept(t);
- }
- catch (Exception e) {
- //TODO: logging
- }
- },
- () -> {
- AtomicBoolean atomicBoolean = new AtomicBoolean();
+ try {
+ onRemovedAfter.accept(t);
+ }
+ catch (Exception e) {
+ //TODO: logging
+ }
+ },
+ () -> {
+ AtomicBoolean atomicBoolean = new AtomicBoolean();
- UpdateSupport.deferPublication(() -> {
- if (!atomicBoolean.get()) {
- onUpdate.accept(t);
- }
- });
+ UpdateSupport.deferPublication(() -> {
+ if (!atomicBoolean.get()) {
+ onUpdate.accept(t);
+ }
+ });
- atomicBoolean.set(terminator.update());
+ atomicBoolean.set(terminator.update());
- return atomicBoolean.get();
- }
- );
+ return atomicBoolean.get();
+ }
+ );
- try {
- onAddedAfter.accept(t);
- }
- catch (Exception e) {
- result.run();
+ try {
+ onAddedAfter.accept(t);
+ }
+ catch (Exception e) {
+ result.run();
- throw e;
- }
+ throw e;
+ }
- return result;
- }
- catch (Exception e) {
- try {
- onRemovedAfter.accept(t);
- }
- catch (Exception e1) {
- //TODO: logging
- }
+ return result;
+ }
+ catch (Exception e) {
+ try {
+ onRemovedAfter.accept(t);
+ }
+ catch (Exception e1) {
+ //TODO: logging
+ }
- throw e;
- }
- }
- );
- }
+ throw e;
+ }
+ }
+ );
+ }
- @Override
- public OSGi<T> filter(Predicate<T> predicate) {
- return transform(
- op -> t -> {
- if (predicate.test(t)) {
- return op.apply(t);
- }
- else {
- return NOOP;
- }
- }
- );
- }
+ @Override
+ public OSGi<T> filter(Predicate<T> predicate) {
+ return transform(
+ op -> t -> {
+ if (predicate.test(t)) {
+ return op.apply(t);
+ }
+ else {
+ return NOOP;
+ }
+ }
+ );
+ }
- @Override
- public <S> OSGi<S> flatMap(Function<? super T, OSGi<? extends S>> fun) {
- return new BaseOSGiImpl<>((executionContext, op) ->
- run(executionContext, op.pipe(t -> fun.apply(t).run(executionContext, op))));
- }
+ @Override
+ public <S> OSGi<S> flatMap(Function<? super T, OSGi<? extends S>> fun) {
+ return new BaseOSGiImpl<>((executionContext, op) ->
+ run(executionContext, op.pipe(t -> fun.apply(t).run(executionContext, op))));
+ }
- @Override
- public <S> OSGi<S> map(Function<? super T, ? extends S> function) {
- return transform(op -> t -> op.apply(function.apply(t)));
- }
+ @Override
+ public <S> OSGi<S> map(Function<? super T, ? extends S> function) {
+ return transform(op -> t -> op.apply(function.apply(t)));
+ }
- @Deprecated
- @Override
- public OSGi<T> recover(BiFunction<T, Exception, T> onError) {
- return new BaseOSGiImpl<>((executionContext, op) ->
- run(
- executionContext,
- t -> {
- try {
- return op.apply(t);
- }
- catch (Exception e) {
- return op.apply(onError.apply(t, e));
- }
- }
- ));
- }
+ @Deprecated
+ @Override
+ public OSGi<T> recover(BiFunction<T, Exception, T> onError) {
+ return new BaseOSGiImpl<>((executionContext, op) ->
+ run(
+ executionContext,
+ t -> {
+ try {
+ return op.apply(t);
+ }
+ catch (Exception e) {
+ return op.apply(onError.apply(t, e));
+ }
+ }
+ ));
+ }
- @Deprecated
- @Override
- public OSGi<T> recoverWith(BiFunction<T, Exception, OSGi<T>> onError) {
- return new BaseOSGiImpl<>((executionContext, op) ->
- run(
- executionContext,
- t -> {
- try {
- return op.apply(t);
- }
- catch (Exception e) {
- return onError.apply(t, e).run(executionContext, op);
- }
- }
- ));
- }
+ @Deprecated
+ @Override
+ public OSGi<T> recoverWith(BiFunction<T, Exception, OSGi<T>> onError) {
+ return new BaseOSGiImpl<>((executionContext, op) ->
+ run(
+ executionContext,
+ t -> {
+ try {
+ return op.apply(t);
+ }
+ catch (Exception e) {
+ return onError.apply(t, e).run(executionContext, op);
+ }
+ }
+ ));
+ }
- @Override
- public <K, S> OSGi<S> splitBy(
- Function<T, OSGi<K>> mapper, BiFunction<K, OSGi<T>, OSGi<S>> fun) {
+ @Override
+ public <K, S> OSGi<S> splitBy(
+ Function<T, OSGi<K>> mapper, BiFunction<K, OSGi<T>, OSGi<S>> fun) {
- return new BaseOSGiImpl<>((executionContext, op) -> {
- ConcurrentHashMap<K, Pad<T, S>> pads = new ConcurrentHashMap<>();
+ return new BaseOSGiImpl<>((executionContext, op) -> {
+ ConcurrentHashMap<K, Pad<T, S>> pads = new ConcurrentHashMap<>();
- OSGiResult result = run(
- executionContext,
- op.pipe(t -> mapper.apply(t).run(
- executionContext,
- k -> pads.computeIfAbsent(
- k,
- __ -> new Pad<>(
- executionContext,
- ___ -> fun.apply(k, ___), op)
- ).publish(t)
- )
- ));
+ OSGiResult result = run(
+ executionContext,
+ op.pipe(t -> mapper.apply(t).run(
+ executionContext,
+ k -> pads.computeIfAbsent(
+ k,
+ __ -> new Pad<>(
+ executionContext,
+ ___ -> fun.apply(k, ___), op)
+ ).publish(t)
+ )
+ ));
- return new OSGiResultImpl(
- () -> {
- pads.values().forEach(Pad::close);
+ return new OSGiResultImpl(
+ () -> {
+ pads.values().forEach(Pad::close);
- result.close();
- },
- () -> pads.values().stream().map(
- Pad::update
- ).reduce(
- Boolean.FALSE, Boolean::logicalOr
- ) | result.update()
- );
- });
- }
+ result.close();
+ },
+ () -> pads.values().stream().map(
+ Pad::update
+ ).reduce(
+ Boolean.FALSE, Boolean::logicalOr
+ ) | result.update()
+ );
+ });
+ }
- @Override
- public <S> OSGi<S> transform(Transformer<T, S> fun) {
- return new BaseOSGiImpl<>((executionContext, op) -> run(
- executionContext, op.pipe(fun.transform(op)::apply)));
- }
+ @Override
+ public <S> OSGi<S> transform(Transformer<T, S> fun) {
+ return new BaseOSGiImpl<>((executionContext, op) -> run(
+ executionContext, op.pipe(fun.transform(op)::apply)));
+ }
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/BundleContextOSGiImpl.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/BundleContextOSGiImpl.java
index 29bd81c..1d319d8 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/BundleContextOSGiImpl.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/BundleContextOSGiImpl.java
@@ -24,8 +24,8 @@
*/
public class BundleContextOSGiImpl extends OSGiImpl<BundleContext> {
- public BundleContextOSGiImpl() {
- super((executionContext, op) ->
- new JustOSGiImpl<>(executionContext.getBundleContext()).run(executionContext, op));
- }
+ public BundleContextOSGiImpl() {
+ super((executionContext, op) ->
+ new JustOSGiImpl<>(executionContext.getBundleContext()).run(executionContext, op));
+ }
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/BundleOSGi.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/BundleOSGi.java
index 1ea33f0..7dac723 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/BundleOSGi.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/BundleOSGi.java
@@ -28,50 +28,50 @@
*/
public class BundleOSGi extends OSGiImpl<Bundle> {
- public BundleOSGi(int stateMask) {
- super((executionContext, op) -> {
+ public BundleOSGi(int stateMask) {
+ super((executionContext, op) -> {
- BundleTracker<OSGiResult> bundleTracker =
- new BundleTracker<>(
- executionContext.getBundleContext(), stateMask,
- new BundleTrackerCustomizer<OSGiResult>() {
+ BundleTracker<OSGiResult> bundleTracker =
+ new BundleTracker<>(
+ executionContext.getBundleContext(), stateMask,
+ new BundleTrackerCustomizer<OSGiResult>() {
- @Override
- public OSGiResult addingBundle(
- Bundle bundle, BundleEvent bundleEvent) {
+ @Override
+ public OSGiResult addingBundle(
+ Bundle bundle, BundleEvent bundleEvent) {
- return op.apply(bundle);
- }
+ return op.apply(bundle);
+ }
- @Override
- public void modifiedBundle(
- Bundle bundle, BundleEvent bundleEvent,
- OSGiResult osgiResult) {
+ @Override
+ public void modifiedBundle(
+ Bundle bundle, BundleEvent bundleEvent,
+ OSGiResult osgiResult) {
- osgiResult.update();
- }
+ osgiResult.update();
+ }
- @Override
- public void removedBundle(
- Bundle bundle, BundleEvent bundleEvent,
- OSGiResult osgiResult) {
+ @Override
+ public void removedBundle(
+ Bundle bundle, BundleEvent bundleEvent,
+ OSGiResult osgiResult) {
- osgiResult.run();
- }
- });
+ osgiResult.run();
+ }
+ });
- bundleTracker.open();
+ bundleTracker.open();
- return new OSGiResultImpl(
- bundleTracker::close,
- () -> bundleTracker.getTracked().values().stream().map(
- OSGiResult::update
- ).reduce(
- Boolean.FALSE, Boolean::logicalOr
- )
- );
- });
+ return new OSGiResultImpl(
+ bundleTracker::close,
+ () -> bundleTracker.getTracked().values().stream().map(
+ OSGiResult::update
+ ).reduce(
+ Boolean.FALSE, Boolean::logicalOr
+ )
+ );
+ });
- }
+ }
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/ChangeContextOSGiImpl.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/ChangeContextOSGiImpl.java
index 22adcb0..2797840 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/ChangeContextOSGiImpl.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/ChangeContextOSGiImpl.java
@@ -25,9 +25,9 @@
*/
public class ChangeContextOSGiImpl<T> extends OSGiImpl<T> {
- public ChangeContextOSGiImpl(
+ public ChangeContextOSGiImpl(
OSGi<T> program, BundleContext bundleContext) {
- super((executionContext, op) -> program.run(new ExecutionContext(bundleContext), op));
- }
+ super((executionContext, op) -> program.run(new ExecutionContext(bundleContext), op));
+ }
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/ConfigurationOSGiImpl.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/ConfigurationOSGiImpl.java
index 54698dc..0dec4fa 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/ConfigurationOSGiImpl.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/ConfigurationOSGiImpl.java
@@ -39,96 +39,96 @@
*/
public class ConfigurationOSGiImpl extends OSGiImpl<ConfigurationHolder> {
- public ConfigurationOSGiImpl(String pid) {
- super((executionContext, op) -> {
- AtomicReference<Configuration> atomicReference =
- new AtomicReference<>(null);
+ public ConfigurationOSGiImpl(String pid) {
+ super((executionContext, op) -> {
+ AtomicReference<Configuration> atomicReference =
+ new AtomicReference<>(null);
- AtomicReference<OSGiResult>
- terminatorAtomicReference = new AtomicReference<>(
- new OSGiResultImpl(NOOP, () -> false));
+ AtomicReference<OSGiResult>
+ terminatorAtomicReference = new AtomicReference<>(
+ new OSGiResultImpl(NOOP, () -> false));
- AtomicBoolean closed = new AtomicBoolean();
+ AtomicBoolean closed = new AtomicBoolean();
- AtomicLong initialCounter = new AtomicLong();
+ AtomicLong initialCounter = new AtomicLong();
- CountDownLatch countDownLatch = new CountDownLatch(1);
+ CountDownLatch countDownLatch = new CountDownLatch(1);
- BundleContext bundleContext = executionContext.getBundleContext();
+ BundleContext bundleContext = executionContext.getBundleContext();
- ServiceRegistration<?> serviceRegistration =
- bundleContext.registerService(
- ConfigurationListener.class,
- (ConfigurationEvent configurationEvent) -> {
- if (configurationEvent.getFactoryPid() != null ||
- !configurationEvent.getPid().equals(pid)) {
+ ServiceRegistration<?> serviceRegistration =
+ bundleContext.registerService(
+ ConfigurationListener.class,
+ (ConfigurationEvent configurationEvent) -> {
+ if (configurationEvent.getFactoryPid() != null ||
+ !configurationEvent.getPid().equals(pid)) {
- return;
- }
+ return;
+ }
- try {
- countDownLatch.await(1, TimeUnit.MINUTES);
- }
- catch (InterruptedException e) {
- return;
- }
+ try {
+ countDownLatch.await(1, TimeUnit.MINUTES);
+ }
+ catch (InterruptedException e) {
+ return;
+ }
- Configuration configuration;
+ Configuration configuration;
- if (configurationEvent.getType() ==
- ConfigurationEvent.CM_DELETED) {
+ if (configurationEvent.getType() ==
+ ConfigurationEvent.CM_DELETED) {
- atomicReference.set(null);
+ atomicReference.set(null);
- signalLeave(terminatorAtomicReference);
- }
- else {
- configuration = getConfiguration(
- bundleContext, configurationEvent);
+ signalLeave(terminatorAtomicReference);
+ }
+ else {
+ configuration = getConfiguration(
+ bundleContext, configurationEvent);
- if (configuration == null ||
- configuration.getChangeCount() == initialCounter.get()) {
+ if (configuration == null ||
+ configuration.getChangeCount() == initialCounter.get()) {
- return;
- }
+ return;
+ }
- if (atomicReference.get() == null) {
- atomicReference.set(configuration);
- }
- else {
- if (!UpdateSupport.sendUpdate(terminatorAtomicReference.get())) {
- return;
- }
- }
+ if (atomicReference.get() == null) {
+ atomicReference.set(configuration);
+ }
+ else {
+ if (!UpdateSupport.sendUpdate(terminatorAtomicReference.get())) {
+ return;
+ }
+ }
- UpdateSupport.runUpdate(() -> {
- signalLeave(terminatorAtomicReference);
+ UpdateSupport.runUpdate(() -> {
+ signalLeave(terminatorAtomicReference);
- terminatorAtomicReference.set(
- op.apply(new ConfigurationHolderImpl(configuration)));
+ terminatorAtomicReference.set(
+ op.apply(new ConfigurationHolderImpl(configuration)));
- });
+ });
- if (closed.get()) {
- /*
- if we have closed while executing the
- effects we have to execute the terminator
- directly instead of storing it
- */
- signalLeave(terminatorAtomicReference);
- }
- }
- },
- new Hashtable<>());
+ if (closed.get()) {
+ /*
+ if we have closed while executing the
+ effects we have to execute the terminator
+ directly instead of storing it
+ */
+ signalLeave(terminatorAtomicReference);
+ }
+ }
+ },
+ new Hashtable<>());
- ServiceReference<ConfigurationAdmin> serviceReference =
- bundleContext.getServiceReference(ConfigurationAdmin.class);
+ ServiceReference<ConfigurationAdmin> serviceReference =
+ bundleContext.getServiceReference(ConfigurationAdmin.class);
- if (serviceReference != null) {
- Configuration configuration = getConfiguration(
+ if (serviceReference != null) {
+ Configuration configuration = getConfiguration(
bundleContext, pid, serviceReference);
- if (configuration != null) {
+ if (configuration != null) {
atomicReference.set(configuration);
initialCounter.set(configuration.getChangeCount());
@@ -136,68 +136,68 @@
terminatorAtomicReference.set(
op.apply(new ConfigurationHolderImpl(configuration)));
}
- }
+ }
- countDownLatch.countDown();
+ countDownLatch.countDown();
- return new OSGiResultImpl(
- () -> {
- closed.set(true);
+ return new OSGiResultImpl(
+ () -> {
+ closed.set(true);
- serviceRegistration.unregister();
+ serviceRegistration.unregister();
- signalLeave(terminatorAtomicReference);
- },
- () -> terminatorAtomicReference.get().update())
- ;
- });
- }
+ signalLeave(terminatorAtomicReference);
+ },
+ () -> terminatorAtomicReference.get().update())
+ ;
+ });
+ }
- private static Configuration getConfiguration(
- BundleContext bundleContext, ConfigurationEvent configurationEvent) {
+ private static Configuration getConfiguration(
+ BundleContext bundleContext, ConfigurationEvent configurationEvent) {
- String pid = configurationEvent.getPid();
+ String pid = configurationEvent.getPid();
- ServiceReference<ConfigurationAdmin> reference =
- configurationEvent.getReference();
+ ServiceReference<ConfigurationAdmin> reference =
+ configurationEvent.getReference();
- return getConfiguration(bundleContext, pid, reference);
- }
+ return getConfiguration(bundleContext, pid, reference);
+ }
- private static Configuration getConfiguration(
- BundleContext bundleContext, String pid,
- ServiceReference<ConfigurationAdmin> reference) {
+ private static Configuration getConfiguration(
+ BundleContext bundleContext, String pid,
+ ServiceReference<ConfigurationAdmin> reference) {
- ConfigurationAdmin configurationAdmin = bundleContext.getService(
- reference);
+ ConfigurationAdmin configurationAdmin = bundleContext.getService(
+ reference);
- try {
- Configuration[] configurations =
+ try {
+ Configuration[] configurations =
configurationAdmin.listConfigurations(
"(&(service.pid=" + pid + ")(!(service.factoryPid=*)))");
- if (configurations == null || configurations.length == 0) {
+ if (configurations == null || configurations.length == 0) {
return null;
}
- return configurations[0];
- }
- catch (Exception e) {
- return null;
- }
- finally {
- bundleContext.ungetService(reference);
- }
- }
+ return configurations[0];
+ }
+ catch (Exception e) {
+ return null;
+ }
+ finally {
+ bundleContext.ungetService(reference);
+ }
+ }
- private static void signalLeave(
- AtomicReference<OSGiResult> terminatorAtomicReference) {
+ private static void signalLeave(
+ AtomicReference<OSGiResult> terminatorAtomicReference) {
- OSGiResult old = terminatorAtomicReference.getAndSet(null);
+ OSGiResult old = terminatorAtomicReference.getAndSet(null);
- if (old != null) {
+ if (old != null) {
old.run();
}
- }
+ }
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/ConfigurationsOSGiImpl.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/ConfigurationsOSGiImpl.java
index d485c53..6c73162 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/ConfigurationsOSGiImpl.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/ConfigurationsOSGiImpl.java
@@ -38,199 +38,199 @@
*/
public class ConfigurationsOSGiImpl extends OSGiImpl<ConfigurationHolder> {
- public ConfigurationsOSGiImpl(String factoryPid) {
- super((executionContext, op) -> {
- ConcurrentHashMap<String, Long> configurationCounters =
- new ConcurrentHashMap<>();
+ public ConfigurationsOSGiImpl(String factoryPid) {
+ super((executionContext, op) -> {
+ ConcurrentHashMap<String, Long> configurationCounters =
+ new ConcurrentHashMap<>();
- ConcurrentHashMap<String, OSGiResult> terminators =
- new ConcurrentHashMap<>();
+ ConcurrentHashMap<String, OSGiResult> terminators =
+ new ConcurrentHashMap<>();
- AtomicBoolean closed = new AtomicBoolean();
+ AtomicBoolean closed = new AtomicBoolean();
- CountDownLatch countDownLatch = new CountDownLatch(1);
+ CountDownLatch countDownLatch = new CountDownLatch(1);
- final BundleContext bundleContext = executionContext.getBundleContext();
+ final BundleContext bundleContext = executionContext.getBundleContext();
- ServiceRegistration<?> serviceRegistration =
- bundleContext.registerService(
- ConfigurationListener.class,
- (ConfigurationEvent configurationEvent) -> {
- String incomingFactoryPid =
- configurationEvent.getFactoryPid();
+ ServiceRegistration<?> serviceRegistration =
+ bundleContext.registerService(
+ ConfigurationListener.class,
+ (ConfigurationEvent configurationEvent) -> {
+ String incomingFactoryPid =
+ configurationEvent.getFactoryPid();
- if (!factoryPid.equals(incomingFactoryPid)) {
- return;
- }
+ if (!factoryPid.equals(incomingFactoryPid)) {
+ return;
+ }
- try {
- countDownLatch.await(1, TimeUnit.MINUTES);
- }
- catch (InterruptedException e) {
- return;
- }
+ try {
+ countDownLatch.await(1, TimeUnit.MINUTES);
+ }
+ catch (InterruptedException e) {
+ return;
+ }
- String pid = configurationEvent.getPid();
+ String pid = configurationEvent.getPid();
- Configuration configuration;
+ Configuration configuration;
- if (configurationEvent.getType() ==
- ConfigurationEvent.CM_DELETED) {
+ if (configurationEvent.getType() ==
+ ConfigurationEvent.CM_DELETED) {
- configurationCounters.remove(pid);
+ configurationCounters.remove(pid);
- signalLeave(pid, terminators);
- }
- else {
- configuration = getConfiguration(
- bundleContext, configurationEvent);
+ signalLeave(pid, terminators);
+ }
+ else {
+ configuration = getConfiguration(
+ bundleContext, configurationEvent);
- Long oldChangeCount = configurationCounters.putIfAbsent(
- pid, configuration.getChangeCount());
+ Long oldChangeCount = configurationCounters.putIfAbsent(
+ pid, configuration.getChangeCount());
- if (oldChangeCount != null) {
- if (oldChangeCount == configuration.getChangeCount()) {
- return;
- }
+ if (oldChangeCount != null) {
+ if (oldChangeCount == configuration.getChangeCount()) {
+ return;
+ }
- OSGiResult osgiResult = terminators.get(pid);
+ OSGiResult osgiResult = terminators.get(pid);
- if (osgiResult != null && !UpdateSupport.sendUpdate(osgiResult)) {
- return;
- }
- }
+ if (osgiResult != null && !UpdateSupport.sendUpdate(osgiResult)) {
+ return;
+ }
+ }
- UpdateSupport.runUpdate(() -> {
- signalLeave(pid, terminators);
+ UpdateSupport.runUpdate(() -> {
+ signalLeave(pid, terminators);
- terminators.put(
- pid, op.apply(new ConfigurationHolderImpl(configuration)));
- });
+ terminators.put(
+ pid, op.apply(new ConfigurationHolderImpl(configuration)));
+ });
- if (closed.get()) {
- /*
- if we have closed while executing the
- effects we have to execute the terminator
- directly instead of storing it
- */
- signalLeave(pid, terminators);
- }
- }
- },
- new Hashtable<>());
+ if (closed.get()) {
+ /*
+ if we have closed while executing the
+ effects we have to execute the terminator
+ directly instead of storing it
+ */
+ signalLeave(pid, terminators);
+ }
+ }
+ },
+ new Hashtable<>());
- ServiceReference<ConfigurationAdmin> serviceReference =
- bundleContext.getServiceReference(ConfigurationAdmin.class);
+ ServiceReference<ConfigurationAdmin> serviceReference =
+ bundleContext.getServiceReference(ConfigurationAdmin.class);
- if (serviceReference != null) {
- Configuration[] configurations = getConfigurations(
- bundleContext, factoryPid, serviceReference);
+ if (serviceReference != null) {
+ Configuration[] configurations = getConfigurations(
+ bundleContext, factoryPid, serviceReference);
- for (Configuration configuration : configurations) {
- configurationCounters.put(
- configuration.getPid(), configuration.getChangeCount());
+ for (Configuration configuration : configurations) {
+ configurationCounters.put(
+ configuration.getPid(), configuration.getChangeCount());
- terminators.put(
- configuration.getPid(),
- op.publish(new ConfigurationHolderImpl(configuration)));
- }
- }
+ terminators.put(
+ configuration.getPid(),
+ op.publish(new ConfigurationHolderImpl(configuration)));
+ }
+ }
- countDownLatch.countDown();
+ countDownLatch.countDown();
- return new OSGiResultImpl(
- () -> {
- closed.set(true);
+ return new OSGiResultImpl(
+ () -> {
+ closed.set(true);
- serviceRegistration.unregister();
+ serviceRegistration.unregister();
- for (Runnable runnable : terminators.values()) {
- if (runnable != null) {
- runnable.run();
- }
- }
- },
- () -> terminators.values().stream().map(
- OSGiResult::update
- ).reduce(
- Boolean.FALSE, Boolean::logicalOr
- ));
- });
- }
+ for (Runnable runnable : terminators.values()) {
+ if (runnable != null) {
+ runnable.run();
+ }
+ }
+ },
+ () -> terminators.values().stream().map(
+ OSGiResult::update
+ ).reduce(
+ Boolean.FALSE, Boolean::logicalOr
+ ));
+ });
+ }
- private static Configuration getConfiguration(
- BundleContext bundleContext, ConfigurationEvent configurationEvent) {
+ private static Configuration getConfiguration(
+ BundleContext bundleContext, ConfigurationEvent configurationEvent) {
- String pid = configurationEvent.getPid();
- String factoryPid = configurationEvent.getFactoryPid();
+ String pid = configurationEvent.getPid();
+ String factoryPid = configurationEvent.getFactoryPid();
- ServiceReference<ConfigurationAdmin> reference =
- configurationEvent.getReference();
+ ServiceReference<ConfigurationAdmin> reference =
+ configurationEvent.getReference();
- return getConfiguration(bundleContext, pid, factoryPid, reference);
- }
+ return getConfiguration(bundleContext, pid, factoryPid, reference);
+ }
- private static Configuration getConfiguration(
- BundleContext bundleContext, String pid, String factoryPid,
- ServiceReference<ConfigurationAdmin> reference) {
+ private static Configuration getConfiguration(
+ BundleContext bundleContext, String pid, String factoryPid,
+ ServiceReference<ConfigurationAdmin> reference) {
- ConfigurationAdmin configurationAdmin = bundleContext.getService(
- reference);
+ ConfigurationAdmin configurationAdmin = bundleContext.getService(
+ reference);
- try {
- Configuration[] configurations =
- configurationAdmin.listConfigurations(
- "(&(service.pid=" + pid + ")" +
- "(service.factoryPid="+ factoryPid + "))");
+ try {
+ Configuration[] configurations =
+ configurationAdmin.listConfigurations(
+ "(&(service.pid=" + pid + ")" +
+ "(service.factoryPid="+ factoryPid + "))");
- if (configurations == null || configurations.length == 0) {
- return null;
- }
+ if (configurations == null || configurations.length == 0) {
+ return null;
+ }
- return configurations[0];
- }
- catch (Exception e) {
- return null;
- }
- finally {
- bundleContext.ungetService(reference);
- }
- }
+ return configurations[0];
+ }
+ catch (Exception e) {
+ return null;
+ }
+ finally {
+ bundleContext.ungetService(reference);
+ }
+ }
- private static Configuration[] getConfigurations(
- BundleContext bundleContext, String factoryPid,
- ServiceReference<ConfigurationAdmin> serviceReference) {
+ private static Configuration[] getConfigurations(
+ BundleContext bundleContext, String factoryPid,
+ ServiceReference<ConfigurationAdmin> serviceReference) {
- ConfigurationAdmin configurationAdmin = bundleContext.getService(
- serviceReference);
+ ConfigurationAdmin configurationAdmin = bundleContext.getService(
+ serviceReference);
- try {
- Configuration[] configurations =
- configurationAdmin.listConfigurations(
- "(&(service.pid=*)(service.factoryPid="+ factoryPid +"))");
+ try {
+ Configuration[] configurations =
+ configurationAdmin.listConfigurations(
+ "(&(service.pid=*)(service.factoryPid="+ factoryPid +"))");
- if (configurations == null) {
- return new Configuration[0];
- }
+ if (configurations == null) {
+ return new Configuration[0];
+ }
- return configurations;
- }
- catch (Exception e) {
- return new Configuration[0];
- }
- finally {
- bundleContext.ungetService(serviceReference);
- }
- }
+ return configurations;
+ }
+ catch (Exception e) {
+ return new Configuration[0];
+ }
+ finally {
+ bundleContext.ungetService(serviceReference);
+ }
+ }
- private static void signalLeave(
- String factoryPid, ConcurrentHashMap<String, OSGiResult> terminators) {
+ private static void signalLeave(
+ String factoryPid, ConcurrentHashMap<String, OSGiResult> terminators) {
- OSGiResult osgiResult = terminators.remove(factoryPid);
+ OSGiResult osgiResult = terminators.remove(factoryPid);
- if (osgiResult != null) {
- osgiResult.run();
- }
- }
+ if (osgiResult != null) {
+ osgiResult.run();
+ }
+ }
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/JustOSGiImpl.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/JustOSGiImpl.java
index 1f8db5a..ee534a6 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/JustOSGiImpl.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/JustOSGiImpl.java
@@ -32,49 +32,49 @@
*/
public class JustOSGiImpl<T> extends OSGiImpl<T> {
- public JustOSGiImpl(Collection<T> t) {
- this(() -> t);
- }
+ public JustOSGiImpl(Collection<T> t) {
+ this(() -> t);
+ }
- public JustOSGiImpl(Supplier<Collection<T>> supplier) {
- super((executionContext, op) -> {
+ public JustOSGiImpl(Supplier<Collection<T>> supplier) {
+ super((executionContext, op) -> {
- Collection<T> collection = supplier.get();
- ArrayList<OSGiResult> references = new ArrayList<>(collection.size());
+ Collection<T> collection = supplier.get();
+ ArrayList<OSGiResult> references = new ArrayList<>(collection.size());
- try {
- for (T t : collection) {
- references.add(op.publish(t));
- }
- }
- catch (Exception e) {
- cleanUp(references);
+ try {
+ for (T t : collection) {
+ references.add(op.publish(t));
+ }
+ }
+ catch (Exception e) {
+ cleanUp(references);
- throw e;
- }
+ throw e;
+ }
- return new OSGiResultImpl(
- () -> cleanUp(references),
- () -> references.stream().map(res -> res.update()).reduce(Boolean.FALSE, Boolean::logicalOr)
- );
- });
- }
+ return new OSGiResultImpl(
+ () -> cleanUp(references),
+ () -> references.stream().map(res -> res.update()).reduce(Boolean.FALSE, Boolean::logicalOr)
+ );
+ });
+ }
- private static void cleanUp(ArrayList<OSGiResult> references) {
- ListIterator<OSGiResult> iterator =
- references.listIterator(references.size());
+ private static void cleanUp(ArrayList<OSGiResult> references) {
+ ListIterator<OSGiResult> iterator =
+ references.listIterator(references.size());
- while (iterator.hasPrevious()) {
- try {
- iterator.previous().run();
- }
- catch (Exception e) {
- }
- }
- }
+ while (iterator.hasPrevious()) {
+ try {
+ iterator.previous().run();
+ }
+ catch (Exception e) {
+ }
+ }
+ }
- public JustOSGiImpl(T t) {
- this(() -> Collections.singletonList(t));
- }
+ public JustOSGiImpl(T t) {
+ this(() -> Collections.singletonList(t));
+ }
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/NothingOSGiImpl.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/NothingOSGiImpl.java
index 8781c0b..80f1da9 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/NothingOSGiImpl.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/NothingOSGiImpl.java
@@ -24,7 +24,7 @@
*/
public class NothingOSGiImpl<S> extends OSGiImpl<S> {
- public NothingOSGiImpl() {
- super((executionContext, __) -> new OSGiResultImpl(OSGi.NOOP, () -> false));
- }
+ public NothingOSGiImpl() {
+ super((executionContext, __) -> new OSGiResultImpl(OSGi.NOOP, () -> false));
+ }
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/OSGiImpl.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/OSGiImpl.java
index 1d46573..3b9373c 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/OSGiImpl.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/OSGiImpl.java
@@ -24,46 +24,46 @@
*/
public class OSGiImpl<T> extends BaseOSGiImpl<T> {
- protected OSGiImpl(OSGiRunnable<T> operation) {
- super(new ErrorHandlerOSGiRunnable<>(operation));
- }
+ protected OSGiImpl(OSGiRunnable<T> operation) {
+ super(new ErrorHandlerOSGiRunnable<>(operation));
+ }
- @SuppressWarnings("unchecked")
- static <T extends Throwable> void rethrow(Throwable t) throws T {
- throw (T)t;
- }
+ @SuppressWarnings("unchecked")
+ static <T extends Throwable> void rethrow(Throwable t) throws T {
+ throw (T)t;
+ }
- public static <T> OSGi<T> create(OSGiRunnable<T> runnable) {
- return new OSGiImpl<>(runnable);
- }
+ public static <T> OSGi<T> create(OSGiRunnable<T> runnable) {
+ return new OSGiImpl<>(runnable);
+ }
- protected static class ErrorHandlerOSGiRunnable<T>
- implements OSGiRunnable<T> {
+ protected static class ErrorHandlerOSGiRunnable<T>
+ implements OSGiRunnable<T> {
- private final OSGiRunnable<T> operation;
+ private final OSGiRunnable<T> operation;
- public ErrorHandlerOSGiRunnable(OSGiRunnable<T> operation) {
- this.operation = operation;
- }
+ public ErrorHandlerOSGiRunnable(OSGiRunnable<T> operation) {
+ this.operation = operation;
+ }
- @Override
- public OSGiResult run(
- ExecutionContext ec, Publisher<? super T> op) {
+ @Override
+ public OSGiResult run(
+ ExecutionContext ec, Publisher<? super T> op) {
- return operation.run(ec,
- op.pipe(t -> {
- try {
- return op.publish(t);
- } catch (PublisherRethrowException pre) {
- rethrow(pre.getCause());
+ return operation.run(ec,
+ op.pipe(t -> {
+ try {
+ return op.publish(t);
+ } catch (PublisherRethrowException pre) {
+ rethrow(pre.getCause());
- return null;
- } catch (Exception e) {
- return op.error(t, e);
- }
- }));
- }
- }
+ return null;
+ } catch (Exception e) {
+ return op.error(t, e);
+ }
+ }));
+ }
+ }
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/OSGiResultImpl.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/OSGiResultImpl.java
index 16bfe02..5833785 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/OSGiResultImpl.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/OSGiResultImpl.java
@@ -27,29 +27,29 @@
*/
public class OSGiResultImpl implements OSGiResult {
- public OSGiResultImpl(Runnable close, Supplier<Boolean> onUpdate) {
- this.close = close;
- this.onUpdate = onUpdate;
- }
+ public OSGiResultImpl(Runnable close, Supplier<Boolean> onUpdate) {
+ this.close = close;
+ this.onUpdate = onUpdate;
+ }
- @Override
- public void close() {
- if (_closed.compareAndSet(false, true)) {
- close.run();
- }
- }
+ @Override
+ public void close() {
+ if (_closed.compareAndSet(false, true)) {
+ close.run();
+ }
+ }
- @Override
- public boolean update() {
- if (_closed.get()) {
- return false;
- }
+ @Override
+ public boolean update() {
+ if (_closed.get()) {
+ return false;
+ }
- return onUpdate.get();
- }
+ return onUpdate.get();
+ }
- private final Runnable close;
- private Supplier<Boolean> onUpdate;
- private AtomicBoolean _closed = new AtomicBoolean();
+ private final Runnable close;
+ private Supplier<Boolean> onUpdate;
+ private AtomicBoolean _closed = new AtomicBoolean();
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/ServiceReferenceOSGi.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/ServiceReferenceOSGi.java
index e60aa22..ae92f57 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/ServiceReferenceOSGi.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/ServiceReferenceOSGi.java
@@ -28,86 +28,86 @@
* @author Carlos Sierra Andrés
*/
public class ServiceReferenceOSGi<T>
- extends OSGiImpl<CachingServiceReference<T>> {
+ extends OSGiImpl<CachingServiceReference<T>> {
- public ServiceReferenceOSGi(Class<T> clazz, String filterString) {
+ public ServiceReferenceOSGi(Class<T> clazz, String filterString) {
- super((executionContext, op) -> {
- ServiceTracker<T, Tracked<T>>
- serviceTracker = new ServiceTracker<>(
- executionContext.getBundleContext(),
- buildFilter(executionContext, filterString, clazz),
- new DefaultServiceTrackerCustomizer<>(op));
+ super((executionContext, op) -> {
+ ServiceTracker<T, Tracked<T>>
+ serviceTracker = new ServiceTracker<>(
+ executionContext.getBundleContext(),
+ buildFilter(executionContext, filterString, clazz),
+ new DefaultServiceTrackerCustomizer<>(op));
- serviceTracker.open();
+ serviceTracker.open();
- return new OSGiResultImpl(
- serviceTracker::close,
- () -> serviceTracker.getTracked().values().stream().map(
- tracked -> tracked.runnable.update()
- ).reduce(
- Boolean.FALSE, Boolean::logicalOr
- )
- );
- });
- }
+ return new OSGiResultImpl(
+ serviceTracker::close,
+ () -> serviceTracker.getTracked().values().stream().map(
+ tracked -> tracked.runnable.update()
+ ).reduce(
+ Boolean.FALSE, Boolean::logicalOr
+ )
+ );
+ });
+ }
- private static class DefaultServiceTrackerCustomizer<T>
- implements ServiceTrackerCustomizer<T, Tracked<T>> {
+ private static class DefaultServiceTrackerCustomizer<T>
+ implements ServiceTrackerCustomizer<T, Tracked<T>> {
- public DefaultServiceTrackerCustomizer(
- Publisher<? super CachingServiceReference<T>> addedSource) {
+ public DefaultServiceTrackerCustomizer(
+ Publisher<? super CachingServiceReference<T>> addedSource) {
- _addedSource = addedSource;
- }
+ _addedSource = addedSource;
+ }
- @Override
- public Tracked<T> addingService(ServiceReference<T> reference) {
- CachingServiceReference<T> cachingServiceReference =
- new CachingServiceReference<>(reference);
+ @Override
+ public Tracked<T> addingService(ServiceReference<T> reference) {
+ CachingServiceReference<T> cachingServiceReference =
+ new CachingServiceReference<>(reference);
- return new Tracked<>(
- cachingServiceReference, _addedSource.apply(cachingServiceReference));
- }
+ return new Tracked<>(
+ cachingServiceReference, _addedSource.apply(cachingServiceReference));
+ }
- @Override
- public void modifiedService(
- ServiceReference<T> reference, Tracked<T> tracked) {
+ @Override
+ public void modifiedService(
+ ServiceReference<T> reference, Tracked<T> tracked) {
- if (UpdateSupport.sendUpdate(tracked.runnable)) {
- UpdateSupport.runUpdate(() -> {
- tracked.runnable.run();
- tracked.cachingServiceReference = new CachingServiceReference<>(
- reference);
- tracked.runnable =
- _addedSource.apply(tracked.cachingServiceReference);
- });
- }
- }
+ if (UpdateSupport.sendUpdate(tracked.runnable)) {
+ UpdateSupport.runUpdate(() -> {
+ tracked.runnable.run();
+ tracked.cachingServiceReference = new CachingServiceReference<>(
+ reference);
+ tracked.runnable =
+ _addedSource.apply(tracked.cachingServiceReference);
+ });
+ }
+ }
- @Override
- public void removedService(
- ServiceReference<T> reference, Tracked<T> tracked) {
+ @Override
+ public void removedService(
+ ServiceReference<T> reference, Tracked<T> tracked) {
- tracked.runnable.run();
- }
+ tracked.runnable.run();
+ }
- private final Publisher<? super CachingServiceReference<T>> _addedSource;
+ private final Publisher<? super CachingServiceReference<T>> _addedSource;
- }
+ }
- private static class Tracked<T> {
+ private static class Tracked<T> {
- public Tracked(
- CachingServiceReference<T> cachingServiceReference,
- OSGiResult osgiResult) {
+ public Tracked(
+ CachingServiceReference<T> cachingServiceReference,
+ OSGiResult osgiResult) {
- this.cachingServiceReference = cachingServiceReference;
- this.runnable = osgiResult;
- }
+ this.cachingServiceReference = cachingServiceReference;
+ this.runnable = osgiResult;
+ }
- volatile CachingServiceReference<T> cachingServiceReference;
- volatile OSGiResult runnable;
+ volatile CachingServiceReference<T> cachingServiceReference;
+ volatile OSGiResult runnable;
- }
+ }
}
diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/ServiceRegistrationOSGiImpl.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/ServiceRegistrationOSGiImpl.java
index e8a4a33..d9cd8da 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/ServiceRegistrationOSGiImpl.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/internal/ServiceRegistrationOSGiImpl.java
@@ -30,67 +30,67 @@
* @author Carlos Sierra Andrés
*/
public class ServiceRegistrationOSGiImpl<T>
- extends OSGiImpl<ServiceRegistration<T>> {
+ extends OSGiImpl<ServiceRegistration<T>> {
- public ServiceRegistrationOSGiImpl(
- Class<T> clazz, Supplier<T> service,
- Supplier<Map<String, ?>> properties) {
+ public ServiceRegistrationOSGiImpl(
+ Class<T> clazz, Supplier<T> service,
+ Supplier<Map<String, ?>> properties) {
- super((executionContext, op) -> {
- ServiceRegistration<?> serviceRegistration =
- executionContext.getBundleContext().registerService(
- clazz, service.get(), getProperties(properties.get()));
+ super((executionContext, op) -> {
+ ServiceRegistration<?> serviceRegistration =
+ executionContext.getBundleContext().registerService(
+ clazz, service.get(), getProperties(properties.get()));
- return getServiceRegistrationOSGiResult(serviceRegistration, op);
- });
- }
+ return getServiceRegistrationOSGiResult(serviceRegistration, op);
+ });
+ }
- public ServiceRegistrationOSGiImpl(
- Class<T> clazz, ServiceFactory<T> serviceFactory,
- Supplier<Map<String, ?>> properties) {
+ public ServiceRegistrationOSGiImpl(
+ Class<T> clazz, ServiceFactory<T> serviceFactory,
+ Supplier<Map<String, ?>> properties) {
- super((executionContext, op) -> {
- ServiceRegistration<?> serviceRegistration =
- executionContext.getBundleContext().registerService(
- clazz, serviceFactory,
- getProperties(properties.get()));
+ super((executionContext, op) -> {
+ ServiceRegistration<?> serviceRegistration =
+ executionContext.getBundleContext().registerService(
+ clazz, serviceFactory,
+ getProperties(properties.get()));
- return getServiceRegistrationOSGiResult(serviceRegistration, op);
- });
- }
+ return getServiceRegistrationOSGiResult(serviceRegistration, op);
+ });
+ }
- public ServiceRegistrationOSGiImpl(
- String[] clazz, Supplier<Object> service,
- Supplier<Map<String, ?>> properties) {
+ public ServiceRegistrationOSGiImpl(
+ String[] clazz, Supplier<Object> service,
+ Supplier<Map<String, ?>> properties) {
- super((executionContext, op) -> {
- ServiceRegistration<?> serviceRegistration =
- executionContext.getBundleContext().registerService(
- clazz, service.get(), new Hashtable<>(properties.get()));
+ super((executionContext, op) -> {
+ ServiceRegistration<?> serviceRegistration =
+ executionContext.getBundleContext().registerService(
+ clazz, service.get(), new Hashtable<>(properties.get()));
- return getServiceRegistrationOSGiResult(serviceRegistration, op);
- });
- }
+ return getServiceRegistrationOSGiResult(serviceRegistration, op);
+ });
+ }
- private static Hashtable<String, Object> getProperties(
- Map<String, ?> properties) {
+ private static Hashtable<String, Object> getProperties(
+ Map<String, ?> properties) {
- if (properties == null) {
- return new Hashtable<>();
- }
+ if (properties == null) {
+ return new Hashtable<>();
+ }
- return new Hashtable<>(properties);
- }
+ return new Hashtable<>(properties);
+ }
- private static <T> OSGiResultImpl
- getServiceRegistrationOSGiResult(
- ServiceRegistration<?> serviceRegistration,
- Publisher<? super ServiceRegistration<T>> op) {
+ private static <T> OSGiResultImpl
+ getServiceRegistrationOSGiResult(
+ ServiceRegistration<?> serviceRegistration,
+ Publisher<? super ServiceRegistration<T>> op) {
- @SuppressWarnings("unchecked")
- OSGiResult terminator = ((Publisher<Object>)op).publish(serviceRegistration);
+ @SuppressWarnings("unchecked")
+ OSGiResult terminator = ((Publisher<Object>)op).publish(serviceRegistration);
- return new OSGiResultImpl(
+ return new OSGiResultImpl(
() -> {
try {
serviceRegistration.unregister();
@@ -101,8 +101,8 @@
terminator.run();
}
},
- terminator::update
- );
- }
+ terminator::update
+ );
+ }
}
diff --git a/component-dsl/src/test/java/org/apache/aries/component/dsl/internal/OSGiImplTest.java b/component-dsl/src/test/java/org/apache/aries/component/dsl/internal/OSGiImplTest.java
index d9c4e77..adf3e0f 100644
--- a/component-dsl/src/test/java/org/apache/aries/component/dsl/internal/OSGiImplTest.java
+++ b/component-dsl/src/test/java/org/apache/aries/component/dsl/internal/OSGiImplTest.java
@@ -26,29 +26,29 @@
*/
public class OSGiImplTest {
- @Test(expected = IllegalArgumentException.class)
- public void testBuildFilterThrowsIllegalArgument() {
- OSGiImpl.buildFilterString(null, null);
- }
+ @Test(expected = IllegalArgumentException.class)
+ public void testBuildFilterThrowsIllegalArgument() {
+ OSGiImpl.buildFilterString(null, null);
+ }
- @Test
- public void testBuildFilterWithBothArguments() {
- assertEquals(
- "(&(filter=*)(objectClass=java.lang.String))",
- OSGiImpl.buildFilterString("(filter=*)", String.class));
- }
+ @Test
+ public void testBuildFilterWithBothArguments() {
+ assertEquals(
+ "(&(filter=*)(objectClass=java.lang.String))",
+ OSGiImpl.buildFilterString("(filter=*)", String.class));
+ }
- @Test
- public void testBuildFilterWithFilterOnly() {
- assertEquals(
- "(filter=*)", OSGiImpl.buildFilterString("(filter=*)", null));
- }
+ @Test
+ public void testBuildFilterWithFilterOnly() {
+ assertEquals(
+ "(filter=*)", OSGiImpl.buildFilterString("(filter=*)", null));
+ }
- @Test
- public void testBuildFilterWithClassOnly() {
- assertEquals(
- "(objectClass=java.lang.String)",
- OSGiImpl.buildFilterString(null, String.class));
- }
+ @Test
+ public void testBuildFilterWithClassOnly() {
+ assertEquals(
+ "(objectClass=java.lang.String)",
+ OSGiImpl.buildFilterString(null, String.class));
+ }
}
diff --git a/itests/src/test/java/org/apache/aries/component/dsl/test/HashTable.java b/itests/src/test/java/org/apache/aries/component/dsl/test/HashTable.java
index a07b447..3f4a025 100644
--- a/itests/src/test/java/org/apache/aries/component/dsl/test/HashTable.java
+++ b/itests/src/test/java/org/apache/aries/component/dsl/test/HashTable.java
@@ -25,14 +25,14 @@
*/
public class HashTable {
- public static <K, V> Hashtable<K, V> of() {
- return of(h -> {});
- }
+ public static <K, V> Hashtable<K, V> of() {
+ return of(h -> {});
+ }
- public static <K, V> Hashtable<K, V> of(Consumer<Hashtable<K, V>> t) {
- Hashtable<K, V> hashtable = new Hashtable<>();
- t.accept(hashtable);
- return hashtable;
- }
+ public static <K, V> Hashtable<K, V> of(Consumer<Hashtable<K, V>> t) {
+ Hashtable<K, V> hashtable = new Hashtable<>();
+ t.accept(hashtable);
+ return hashtable;
+ }
}