Top Description Inners Methods
javax.enterprise.inject

public @Interface Typed

extends Annotation
Known Direct Implementers
javax.enterprise.inject.Typed.Literal
Annotations
@Target:FIELD, METHOD, TYPE
@Retention:RUNTIME
@Documented
Static Imports
java.lang.annotation.ElementType.FIELD, .ElementType.METHOD, .ElementType.TYPE, .RetentionPolicy.RUNTIME

Restricts the bean types of a bean. May be applied to a bean class or producer method or field.

@Typed(Shop.class)
public class BookShop
      extends Business
      implements Shop<Book> {
   ...
}

When a @Typed annotation is specified, only the types whose classes are explicitly listed using the value member, along with java.lang.Object, are bean types of the bean.

Authors
Pete Muir, Gavin King

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
Typed.Literal

Supports inline instantiation of the Typed annotation.

Method Summary

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

Returns:

the classes corresponding to the bean types of the bean
value
()

Selects the bean types of the bean.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

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

Selects the bean types of the bean. Every class must correspond to a type in the unrestricted set of bean types of a bean.

Returns:Class<?>[]

the classes corresponding to the bean types of the bean

javax.enterprise.inject back to summary

public final Class Typed.Literal

extends AnnotationLiteral<Typed>
implements Typed
Class Inheritance
All Implemented Interfaces
javax.enterprise.inject.Typed, java.lang.annotation.Annotation

Supports inline instantiation of the Typed annotation.
Author
Martin Kouba
Since
2.0

Field Summary

Modifier and TypeField and Description
public static final Typed.Literal
private static final long
private final Class<?>[]

Constructor Summary

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

Method Summary

Modifier and TypeMethod and Description
public static Typed.Literal
of(Class<?>[] value)

public Class<?>[]
value()

Implements javax.enterprise.inject.Typed.value.

Selects the bean types of the bean.

Inherited from javax.enterprise.util.AnnotationLiteral:
annotationTypeequalshashCodetoString

Field Detail

INSTANCEback to summary
public static final Typed.Literal INSTANCE
serialVersionUIDback to summary
private static final long serialVersionUID

Hides javax.enterprise.util.AnnotationLiteral.serialVersionUID.

valueback to summary
private final Class<?>[] value

Constructor Detail

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

Method Detail

ofback to summary
public static Typed.Literal of(Class<?>[] value)
valueback to summary
public Class<?>[] value()

Implements javax.enterprise.inject.Typed.value.

Doc from javax.enterprise.inject.Typed.value.

Selects the bean types of the bean. Every class must correspond to a type in the unrestricted set of bean types of a bean.

Returns:Class<?>[]

the classes corresponding to the bean types of the bean