Package org.osgi.service.component
Class AnyService
- java.lang.Object
-
- org.osgi.service.component.AnyService
-
public final class AnyService extends java.lang.ObjectA marker type whose name is used in theinterfaceattribute of areferenceelement in a component description to indicate that the type of the service for a reference is not specified and can thus be any service type.When specifying this marker type in the
interfaceattribute of areferenceelement in a component description:- The service type of the reference member or parameter must be
java.lang.Objectso that any service object can be provided. - The
targetattribute of thereferenceelement must be specified to constrain the target services.
For example:
@Reference(service = AnyService.class, target = "(osgi.jaxrs.extension=true)") List<Object> extensions;
- Since:
- 1.5
- The service type of the reference member or parameter must be