import java.util.regex.Pattern;
/**
* Contains all Regex
*/
public abstract class Regex {
/**
* Matches any method in the UML format, including a constructor
*
*
Examples:
*
* - + doStuff(foo: int, foo: int): int
* - + getFoo(): int
* - - work()
*
*
* Groups:
*
* - 1 The encapsulate modifier (+-~#)
* - 2 The name
* - 3 All Arguments
* - 4 The return type, "" if no return type is specified (void)
*
*
*/
public static final Pattern METHOD_FIND_REGEX = Pattern.compile(" *(?[+\\-~#]) *(?\\w+) *\\( *(?(?: *\\w+ *: *\\w+ *,? *)*) *\\) *(?:: *(?\\w+))?");
/**
* Matches any Field in the UML format, including a constructor
*y
* Examples:
*
* - - age: int
* - - name: String
* - # date: LocalDate
*
*
* Groups:
*
* - 1 The encapsulate modifier (+-~#)
* - 2 The name
* - 3 The datatype
*
*
*/
public static final Pattern FIELD_FIND_REGEX = Pattern.compile(" *(?[+\\-~#]) *(?\\w+) *: *(?\\w+)");
/**
* Matches a single arg in a method
*
* Groups:
*
* - 1 The name
* - 2 The datatype
*
*/
public static final Pattern ARG_SPLIT_REGEX = Pattern.compile(" *(\\w+) *: *(\\w+)");
}