public class ConsoleViewerMixin implements LogServiceListener { @Service private LoggingService service; }
public class SwingViewer extends JFrame { @Service private Iterable<LoggingService> services; }
public SecureJettyMixin( @This HasIdentity meAsIdentity, @Service Server jettyServer, @Service Iterable<ServiceReference<ServletContextListener>> contextListeners, @Service Iterable<ServiceReference<Servlet>> servlets, @Service Iterable<ServiceReference<Filter>> filters, @Optional @Service MBeanServer mBeanServer ) { super( meAsIdentity.identity().get(), jettyServer, contextListeners, servlets, filters, mBeanServer ); }
public JettyMixin( @This HasIdentity meAsIdentity, @Service Server jettyServer, @Service Iterable<ServiceReference<ServletContextListener>> contextListeners, @Service Iterable<ServiceReference<Servlet>> servlets, @Service Iterable<ServiceReference<Filter>> filters, @Optional @Service MBeanServer mBeanServer ) { super( meAsIdentity.identity().get(), jettyServer, contextListeners, servlets, filters, mBeanServer ); }
public SecureJettyMixin( @This HasIdentity meAsIdentity, @Service Server jettyServer, @Service Iterable<ServiceReference<ServletContextListener>> contextListeners, @Service Iterable<ServiceReference<Servlet>> servlets, @Service Iterable<ServiceReference<Filter>> filters, @Optional @Service MBeanServer mBeanServer ) { super( meAsIdentity.identity().get(), jettyServer, contextListeners, servlets, filters, mBeanServer ); }
public JettyMixin( @This HasIdentity meAsIdentity, @Service Server jettyServer, @Service Iterable<ServiceReference<ServletContextListener>> contextListeners, @Service Iterable<ServiceReference<Servlet>> servlets, @Service Iterable<ServiceReference<Filter>> filters, @Optional @Service MBeanServer mBeanServer ) { super( meAsIdentity.identity().get(), jettyServer, contextListeners, servlets, filters, mBeanServer ); }
class Mixin implements MyEntity { @Service private YourService service; @Override public void logic() { YourEntity result = service.get(); } } }
public static class ServiceConsumer { private @Service TestService service; public TestService getService() { return service; } }
public static class UnderTestMixin implements UnderTest { @Service private UuidService service; public String generateUuid( int len ) { return service.generateUuid( len ); } } }
abstract class IdentityMixin<T extends HasIdentity> implements ServerResource<T> { @This private Parameters<T> parameters; @Service private IdentityManager identityManager; @Override public Identity identity() { return identityManager.generate( parameters.entityType().get(), parameters.id().get() ); } }
public static class UnderTestMixin implements UnderTest { @Service private Sequencing service; public long nextValue() { return service.newSequenceValue(); } public long currentValue() { return service.currentSequenceValue(); } } }
public static class UnderTestMixin implements UnderTest { @Service private Sequencing service; public long nextValue() { return service.newSequenceValue(); } public long currentValue() { return service.currentSequenceValue(); } } }
public class JavaxJsonConvertersSerializationTest extends AbstractConvertersSerializationTest { @Override public void assemble( ModuleAssembly module ) { new JavaxJsonSerializationAssembler().assemble( module ); super.assemble( module ); } @Service private JavaxJsonFactories jsonFactories; @Override protected String getStringFromValueState( String state, String key ) throws Exception { JsonObject jsonObject = jsonFactories.readerFactory().createReader( new StringReader( state ) ).readObject(); return jsonObject.getString( key ); } }
public Mixin( @Service Iterable<ServiceReference<CrudRepository>> repositories ) { StreamSupport.stream( repositories.spliterator(), true ).forEach( ref -> { Class type = ref.metaInfo( EntityTypeDescriptor.class ).entityType(); this.repositories.put( type, ref.get() ); } ); }
public TimingCaptureConcern( @Structure Module module, @Service @Optional MetricsProvider metrics, @Invocation Method method ) { super( module, metrics, method ); }
public TimingCaptureConcern( @Structure Module module, @Service @Optional MetricsProvider metrics, @Invocation Method method ) { super( module, metrics, method ); }
public ServiceConsumer( @Uses String serviceId, @Service Iterable<ServiceReference<TestService>> serviceRefs ) { service = StreamSupport.stream( serviceRefs.spliterator(), false ) .filter( withId( serviceId ) ) .findFirst().map( ServiceReference::get ).orElse( null ); }
public static abstract class SomeMixin implements Some { @Service DummyService service; @Structure Module module; public DummyService service() { return service; } public Module module() { return module; } }
public static abstract class SomeMixin implements Some { @Service DummyService service; @Structure Module module; public DummyService service() { return service; } public Module module() { return module; } }
public static class TestObject { @Service @Optional @Available TestService service; public TestService getService() { return service; } } }