Annotation Interface Uses
Marking class A with @Uses(B.class) makes the production build
treat B as used whenever A is, even if no code of
A refers to B directly, for example because
B is only reached through reflection. All StyleSheet,
JavaScript and other dependencies of B are also loaded
when a component A is used, the same way as those of an
interface that A implements. The used class does not have to be
a component: it can be an interface, for example a
JsInvokers interface that A runs
JavaScript of. A used class that is neither a component nor an interface is
only treated as used by the build, which bundles its JsModule,
CssImport and bundled JavaScript values. What is loaded at
runtime, such as a StyleSheet, is not loaded for such a class. The
classes that it names in its own @Uses are handled as usual.
For PolymerTemplate implementations, used components will also be
instantiated if an element with the corresponding @Tag value is
defined in the template. Note that Polymer template support is deprecated -
we recommend you to use LitTemplate instead. Read more details from
the
Vaadin blog.
- Since:
- 1.0
- Author:
- Vaadin Ltd
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceInternal annotation to enable use of multipleUsesannotations. -
Required Element Summary
Required Elements
-
Element Details
-
value
Class<?> valueMarks the class to depend on.- Returns:
- the class to depend on
-