@Retention(value=RUNTIME) @Target(value=TYPE) @Inherited public @interface Service
serviceType) is annotated as a service, the compiler will generate a class
${serviceType}Factory. Service implementations are discovered in the ServiceLoader standard manner}.
instantiate(String implementation) that returns an implementation. If the
serviceType has constructor arguments specified, then
the signature of the static method will have the required constructor arguments added after the implementation.
create(String implementation) which returns an instance of
${serviceType}Factory. The factory class itself will have a method create() that returns an
implementation. Like the static create method, the signature will be augmented if required constructor arguments
are specified.
The implementation parameter to the create methods is either the name (ServiceName) of an implementation or a
fully qualified class name.
ExampleService and ExampleServiceFactory for examples of a service with a constructor signature, and
the generated factory.Copyright © 2012. All Rights Reserved.