Annotation Interface KeepPattern


@Documented @Repeatable(KeepPatterns.class) @Target(PACKAGE) public @interface KeepPattern
Annotation indicating symbols matching pattern may appear in generated javascript.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    A regular expression used to match symbols that may appear in generated javascript.
    A regular expression used to match types that may appear in generated javascript.
    The symbol may be kept unless this expression is true.
    The symbol may be kept if this expression is true.
  • Element Details

    • type

      String type
      A regular expression used to match types that may appear in generated javascript. If not specified then it will default to the package annotated by the annotation and all sub-packages.
      Returns:
      a regular expression used to match types that may appear in generated javascript.
      Default:
      "<default>"
    • symbol

      String symbol
      A regular expression used to match symbols that may appear in generated javascript.
      Returns:
      a regular expression used to match symbols that may appear in generated javascript.
      Default:
      "<default>"
    • unless

      String unless
      The symbol may be kept unless this expression is true. Supplying a value for this parameter is incompatible with supplying a value to the when() parameter.
      Returns:
      the conditional expression.
      Default:
      ""
    • when

      String when
      The symbol may be kept if this expression is true. Supplying a value for this parameter is incompatible with supplying a value to the unless() parameter.
      Returns:
      the conditional expression.
      Default:
      ""