Annotation Type Find


  • @Retention(CLASS)
    @Target(FIELD)
    public @interface Find
    Overrides the marked method in the Injector, having the implementation return a built MethodProxy or FieldProxy with the specified characteristics.
    Since:
    0.4.0
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String[] inner
      For a TypeProxy, this refers to the target itself rather than its parent.
      java.lang.String name
      For a FieldProxy, this is the name of the field to find.
      java.lang.Class<?> type
      This overrules a field type.
      java.lang.String[] typeInner
      This is to be used in cases where private inner classes are used as parameters.
      java.lang.Class<?> value  
    • Element Detail

      • value

        java.lang.Class<?> value
        Returns:
        the Class object containing the target, or the Object class if not specified (the annotation's parent class is instead used).
        Since:
        0.5.0
        Default:
        java.lang.Object.class
      • inner

        java.lang.String[] inner
        For a TypeProxy, this refers to the target itself rather than its parent.
        Returns:
        the name of the inner class that contains the target, defaults to empty string (not an inner class)
        Since:
        0.5.0
        See Also:
        for details
        Default:
        {}
      • name

        java.lang.String name
        For a FieldProxy, this is the name of the field to find. If omitted, it will fall back on the name of the annotated field. For a MethodProxy it indicates an attempt to match by name only, with this name. This will issue a warning unless warnings are disabled. It will fail and throw an exception if multiple methods with that name are found in the relevant class. It is generally recommended that you use a Target stub for methods, as this can lead to unpredictable behaviour at runtime. It will have no effect on a TypeProxy.
        Returns:
        the name of the target, will default to the empty string (the name of the annotated method will instead be used).
        Since:
        0.5.0
        Default:
        ""
      • type

        java.lang.Class<?> type
        This overrules a field type. Only to be used in the case (such as in fields of anonymous classes) of fields whose parents cannot be reached at processing time.
        Returns:
        a Class representing the type.
        Default:
        java.lang.Object.class
      • typeInner

        java.lang.String[] typeInner
        This is to be used in cases where private inner classes are used as parameters.
        Returns:
        the inner class name to be used with type()
        See Also:
        for details
        Default:
        {}