Annotation Type DefaultValue


  • @Target(FIELD)
    @Retention(RUNTIME)
    public @interface DefaultValue
    Indicates a data structure containing the default value(s) of a type or of parameters. Two forms are supported:
    1. In case of a type, a single value (not necessarily of that but a VIL assignable type) representing a neutral element, can be marked. This defines the default value of the respective type (or if not overriden by a subsequent definition) for the derived subtypes.
    2. In case of parameters, a whole static data structure (Map<String, Object> or an Object array with even dimension and alternating key-values are supported) can be used to define the relations between parameter names and default values. In the latter case, multiple default value attributes can be stated for different operations, e.g., if the operations overlap in parameter types but not in default values). The different operations can be indicated by their name using name().
    Inherited attributes are considered in both cases, i.e., super classes define the default values for subclasses if not overridden explicitly. If the respective value shall not be visible and the defined static value is not used within the defining class, the annotation SuppressWarnings may be required for that field in addition.
    Author:
    Holger Eichelberger
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String name
      The name of the method/operation the default value(s) apply to.
    • Element Detail

      • name

        java.lang.String name
        The name of the method/operation the default value(s) apply to.
        Returns:
        the name
        Default:
        ""