Package sting
Annotation Interface Fragment
Identify an interface that can contribute to a component graph.
This annotation is a top-level Sting processor entrypoint.
The interface is expected to declare 1 or more default methods and/or include 1 or more types
in the includes parameter. Sting actively processes Named,
Typed, and Eager on provider methods declared by the fragment, and Named
on provider method parameters. When Typed is present on a provider method, it defines the
full set of service types published by that binding.
-
Optional Element Summary
Optional Elements
-
Element Details
-
includes
A list of types that can contribute to the component graph. The types can beInjectable-annotated classes orFragment-annotated interfaces. TheFragment-annotated interfaces contributions are added recursively and contributions are de-duplicated before they are resolved.- Returns:
- a list of types that contribute to the fragments component graph.
- Default:
- {}
-
localOnly
boolean localOnlyTrue if all explicitly included types must be declared in the same package as the fragment.- Returns:
- true to reject cross-package includes, false to permit them.
- Default:
- true
-