Annotation Type Const


  • @Documented
    @Retention(RUNTIME)
    @Target({TYPE,METHOD,PARAMETER})
    public @interface Const
    A shortcut annotation to Cast that simply adds const to the parameter type, function, or class.

    • For a parameter type, the first element is for a value like const char* and the second for a pointer like char const *.
    • For a function, the first, second, and third ones are used. The first two are applied to the return value/pointer. The third one determines whether the function is const or not. For backward compatibility, we keep the third element empty.
    • For a class, only the first one is used, and if it is true, it means all the functions are const. Can also be declared on a FunctionPointer in the case of const functions.

    See Also:
    Generator
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      boolean[] value
      If true, applies const to the value and to the pointer, respectively.
    • Element Detail

      • value

        boolean[] value
        If true, applies const to the value and to the pointer, respectively.
        Default:
        {true, false}