Top Description Methods
org.checkerframework.checker.regex.qual

public @Interface Regex

extends Annotation
Annotations
@Documented
@Retention:RUNTIME
@Target:TYPE_USE, TYPE_PARAMETER
@SubtypeOf:UnknownRegex
Imports
java.lang.annotation.Documented, .ElementType, .Retention, .RetentionPolicy, .Target, org.checkerframework.framework.qual.SubtypeOf

If a type is annotated as @Regex(n), then the run-time value is a regular expression with n capturing groups.

For example, if an expression's type is @Regex(2) String, then at run time its value will be a legal regular expression with at least two capturing groups. The type states that possible run-time values include "(a*)(b*)", "a(b?)c(d?)e", and "(.)(.)(.)", but not "hello" nor "(good)bye" nor "(a*)(b*)(".

Method Summary

Modifier and TypeMethod and Description
public int
value()

The number of groups in the regular expression.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

valueback to summary
public int value()

The number of groups in the regular expression. Defaults to 0.