Annotation Type Marker


  • @Target({TYPE,METHOD})
    @Retention(RUNTIME)
    @Documented
    @UseWith({SERVICE,MODULE})
    public @interface Marker
    Used to define one or more ServiceDef#getMarkers() marker annotations for a service implementation. This allows for injection based on the combination of type and marker interface. These marker interfaces should not have any values. The mere presence of the marker annotation is all that is needed. When applied to a module class, this sets the default markers for all services within the module. Markers are additive, so a Marker annotation on the implementation class and/or specified with ServiceBindingOptions.withMarker(Class[]) will accumulate; a service may have any number of markers. Generally one or two is enough.
    See Also:
    ObjectLocator.getService(Class, Class[])
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.Class[] value
      The type of annotation (which will be present at the injection point).
    • Element Detail

      • value

        java.lang.Class[] value
        The type of annotation (which will be present at the injection point).