Package sting

Annotation Interface Typed


Declare the types published by a component. This annotation is used to explicitly specify which types that a component can provide.

Sting actively processes this annotation on Injectable types and on provider methods contained within a type annotated by Fragment. When applied to a fragment provider method, the listed types become the complete set of published services for that binding.

Sting also tolerates this annotation for framework integration on types annotated with an annotation meta-annotated by ActAsStingProvider. Types annotated with annotations meta-annotated by ActAsStingComponent receive the same validation allowance.

Typed must not be applied to Injector output methods.

If this annotation is applied to a class then the class must be able to be assigned to the types specified by this annotation. If the annotation is applied to a method then the return type of the method must be able to be assigned to the types specified by this annotation. The method return type is not implicitly published unless it is listed in value().

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Class<?>[]
    The types published by the component.
  • Element Details

    • value

      @Nonnull Class<?>[] value
      The types published by the component.
      Returns:
      the types published by the component.