Annotation Interface Param


@Target({PARAMETER,FIELD,METHOD}) @Retention(RUNTIME) public @interface Param
Fields, parameters and methods annotated with this annotation will be injected with a parameter provided when using the FulibFxApp.show(String, Map) method.

If the annotation is used on a field, the field will be injected with the specified parameter's value before initializing the controller/component. If the field is a writable property, the value will be set using the property's setter method (e.g. SimpleStringProperty).

If the annotation is used on a method, the method will be called with the specified parameter's value initializing the controller/component.

If the annotation is used on a method argument, the argument will be injected with the specified parameter's value (method has to be annotated with OnRender or OnInit).

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The name of the parameter.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The method of the field's class that will be called with the parameter's value.
    When using method(), this specifies the type of the first (and only) parameter of that method.
  • Element Details

    • value

      String value
      The name of the parameter.
      Returns:
      The name of the parameter.
    • method

      String method
      The method of the field's class that will be called with the parameter's value. Useful for final fields or Property fields.
      Returns:
      the method name
      Default:
      ""
    • type

      Class<?> type
      When using method(), this specifies the type of the first (and only) parameter of that method.
      Returns:
      the type of the method parameter
      Default:
      java.lang.Object.class