Annotation Interface Inject


@Retention(RUNTIME) @Target(FIELD) public @interface Inject
Annotate a field to be injected - an injected field will be automatically created and persisted between code changes. Injected fields do not have ports or controls, and values are not saved to projects.

The @Inject annotation may be used on fields of type Ref, Property, or any field type that can be backed by a Property - String, double, float, int, boolean, PArray, PBytes, any enum.

The @Inject annotation may also be used on fields of types supported by the default Ref.Handler, or the custom Ref.Handler specified.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<? extends Ref.Provider>
    A custom Ref.Provider that can initialize the provided field type.
  • Element Details

    • provider

      Class<? extends Ref.Provider> provider
      A custom Ref.Provider that can initialize the provided field type.
      Returns:
      custom Ref.Handler or default handler
      Default:
      org.praxislive.code.userapi.Ref.Provider.class