Annotation Type AddToRuleKey


  • @Retention(RUNTIME)
    @Target({FIELD,METHOD})
    public @interface AddToRuleKey
    Indicates that a field or method of a class should be added to rulekeys when an instance of that class is added to a rulekey.

    This annotation also indicates that we should derive inputs, deps and serialization automatically from this field/method.

    Annotating a method with @AddToRuleKey should only be used for Immutable objects.

    In general, this should be added to all fields unless there's a good reason not to add it. In that case, annotated the field/method with @ExcludeFromRuleKey to indicate that not adding it to the keys is intentional.

    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      boolean stringify
      This causes us to add the value to the rulekey in its stringified form (i.e.
    • Element Detail

      • stringify

        boolean stringify
        This causes us to add the value to the rulekey in its stringified form (i.e. we call toString() on it).
        Default:
        false