Top Description Inners Methods
org.osgi.service.cdi.annotations

public @Interface Service

extends Annotation
Known Direct Implementers
org.osgi.service.cdi.annotations.Service.Literal
Annotations
@Documented
@Qualifier
@Retention:RUNTIME
@Target:FIELD, METHOD, TYPE, TYPE_USE
Static Imports
java.lang.annotation.ElementType.FIELD, .ElementType.METHOD, .ElementType.TYPE, .ElementType.TYPE_USE, .RetentionPolicy.RUNTIME

Annotation used to specify that a bean should be published as a service.

The behavior of this annotation depends on it's usage:

Use of @Service on both type and type_use will result in a definition error.

Where this annotation is used affects how service scopes are supported:

Author
$Id: acf4490d7b9207e098cda72e016f02de85df3f4d $

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
Service.Literal

Support inline instantiation of the Service annotation.

Method Summary

Modifier and TypeMethod and Description
public Class<?>[]

Returns:

the service types
value
()

Override the interfaces under which this service is published.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

valueback to summary
public Class<?>[] value()

Override the interfaces under which this service is published.

Returns:Class<?>[]

the service types

Annotations
@Nonbinding
org.osgi.service.cdi.annotations back to summary

public final Class Service.Literal

extends AnnotationLiteral<Service>
implements Service
Class Inheritance
All Implemented Interfaces
org.osgi.service.cdi.annotations.Service, java.lang.annotation.Annotation

Support inline instantiation of the Service annotation.

Field Summary

Modifier and TypeField and Description
private final Class<?>[]
private static final long

Constructor Summary

AccessConstructor and Description
private
Literal(Class<?>[] interfaces)

Method Summary

Modifier and TypeMethod and Description
public static final Service.Literal

Returns:

instance of Service
of
(Class<?>[] interfaces)

public Class<?>[]
value()

Implements org.osgi.service.cdi.annotations.Service.value.

Override the interfaces under which this service is published.

Inherited from javax.enterprise.util.AnnotationLiteral:
annotationTypeequalshashCodetoString

Field Detail

_interfacesback to summary
private final Class<?>[] _interfaces
serialVersionUIDback to summary
private static final long serialVersionUID

Hides javax.enterprise.util.AnnotationLiteral.serialVersionUID.

Constructor Detail

Literalback to summary
private Literal(Class<?>[] interfaces)

Method Detail

ofback to summary
public static final Service.Literal of(Class<?>[] interfaces)
Returns:Service.Literal

instance of Service

valueback to summary
public Class<?>[] value()

Implements org.osgi.service.cdi.annotations.Service.value.

Doc from org.osgi.service.cdi.annotations.Service.value.

Override the interfaces under which this service is published.

Returns:Class<?>[]

the service types

Annotations
@Override