Package org.plumelib.reflection
Class SignatureRegexes
java.lang.Object
org.plumelib.reflection.SignatureRegexes
This class defines regular expressions for types supported by the Signature String Checker.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final @Regex String
A regex that matches the nested-class part of a class name.static final Pattern
A pattern that matches ArrayWithoutPackage strings.static final @Regex String
A regex that matches ArrayWithoutPackage strings.private static final @Regex String
An unanchored regex that matches BinaryName strings.static final Pattern
A pattern that matches BinaryNameOrPrimitiveType strings.static final @Regex String
A regex that matches BinaryNameOrPrimitiveType strings.static final Pattern
A pattern that matches BinaryName strings.static final @Regex String
A regex that matches BinaryName strings.static final Pattern
A pattern that matches BinaryNameWithoutPackage strings.static final @Regex String
A regex that matches BinaryNameWithoutPackage strings.private static final @Regex String
A regex that matches ClassGetName, for non-primitive, non-array types.static final Pattern
A pattern that matches ClassGetName strings.static final @Regex String
A regex that matches ClassGetName strings.static final Pattern
A pattern that matches ClassGetSimpleName strings.static final @Regex String
A regex that matches ClassGetSimpleName strings.private static final @Regex String
An unanchored regex that matches DotSeparatedIdentifiers strings.static final Pattern
A pattern that matches DotSeparatedIdentifiersOrPrimitiveType strings.static final @Regex String
A regex that matches DotSeparatedIdentifiersOrPrimitiveType strings.static final Pattern
A pattern that matches DotSeparatedIdentifiers strings.static final @Regex String
A regex that matches DotSeparatedIdentifiers strings.private static final @Regex String
A regex that matches field descriptors for primitive types.static final Pattern
A pattern that matches FieldDescriptorForPrimitive strings.static final @Regex String
A regex that matches FieldDescriptorForPrimitive strings.static final Pattern
A pattern that matches FieldDescriptor strings.static final @Regex String
A regex that matches FieldDescriptor strings.static final Pattern
A pattern that matches FieldDescriptorWithoutPackage strings.static final @Regex String
A regex that matches FieldDescriptorWithoutPackage strings.static final Pattern
A pattern that matches FqBinaryName strings.static final @Regex String
A regex that matches FqBinaryName strings.static final Pattern
A pattern that matches FullyQualifiedName strings.static final @Regex String
A regex that matches FullyQualifiedName strings.private static final @Regex String
A grouped regex that matches identifiers.static final @Regex String
An anchored regex that matches Identifier strings.private static final @Regex String
A regex that matches Java identifier tokens, as defined by the Java grammar.static final Pattern
A pattern that matches IdentifierOrPrimitiveType strings.static final @Regex String
A regex that matches IdentifierOrPrimitiveType strings.static final Pattern
A pattern that matches Identifier strings.static final @Regex String
A regex that matches Identifier strings.static final @Regex String
A regex that matches InternalForm strings.static final Pattern
A pattern that matches InternalForm strings.static final @Regex String
A regex that matches InternalForm strings.private static final @Regex String
An unanchored regex that matches keywords.private static final @Regex String
An unanchored regex that matches keywords, except primitive types.private static final @Regex String
A regex that matches identifier tokens that are not identifiers (keywords, boolean literals, and the null literal).private static final @Regex String
A regex that matches the nested-class part of a class name.private static final @Regex String
A regex that matches the nested-class part of a class name, for one nested class.private static final @Regex String
An unanchored regex that matches primitive types.static final Pattern
A pattern that matches PrimitiveType strings.static final @Regex String
A regex that matches PrimitiveType strings.private static final @Regex String
An unanchored regex that matches slash-separated identifiers. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static final @Regex String
An ungrouped alternation.private static final @Regex String
Create a regex that must match the entire string.private static final @Regex String
Create a regex matching zero or more of the given argument (Kleene star).private static final @Regex String
Create a capturing group.private static final @Regex String
GROUPED_ALTERNATE
(@Regex String... args) A grouped alternation.
-
Field Details
-
KEYWORD_NON_PRIMITIVE_TYPE
An unanchored regex that matches keywords, except primitive types. -
PRIMITIVE_TYPE
An unanchored regex that matches primitive types. -
FD_PRIMITIVE
A regex that matches field descriptors for primitive types.- See Also:
-
KEYWORD
An unanchored regex that matches keywords. -
KEYWORD_OR_LITERAL
A regex that matches identifier tokens that are not identifiers (keywords, boolean literals, and the null literal). -
IDENTIFIER_TOKEN
A regex that matches Java identifier tokens, as defined by the Java grammar.- See Also:
-
IDENTIFIER
A grouped regex that matches identifiers. -
IDENTIFIER_OR_PRIMITIVE_TYPE
An anchored regex that matches Identifier strings. -
DOT_SEPARATED_IDENTIFIERS
An unanchored regex that matches DotSeparatedIdentifiers strings. -
SLASH_SEPARATED_IDENTIFIERS
An unanchored regex that matches slash-separated identifiers. -
NESTED_ONE
A regex that matches the nested-class part of a class name, for one nested class.- See Also:
-
NESTED
A regex that matches the nested-class part of a class name. -
BINARY_NAME
An unanchored regex that matches BinaryName strings. -
ARRAY
A regex that matches the nested-class part of a class name.- See Also:
-
INTERNAL_FORM
A regex that matches InternalForm strings. -
CLASS_GET_NAME_NONPRIMITIVE_NONARRAY
A regex that matches ClassGetName, for non-primitive, non-array types. -
ArrayWithoutPackageRegex
A regex that matches ArrayWithoutPackage strings. -
ArrayWithoutPackagePattern
A pattern that matches ArrayWithoutPackage strings. -
BinaryNameRegex
A regex that matches BinaryName strings. -
BinaryNamePattern
A pattern that matches BinaryName strings. -
BinaryNameWithoutPackageRegex
A regex that matches BinaryNameWithoutPackage strings. -
BinaryNameWithoutPackagePattern
A pattern that matches BinaryNameWithoutPackage strings. -
BinaryNameOrPrimitiveTypeRegex
A regex that matches BinaryNameOrPrimitiveType strings. -
BinaryNameOrPrimitiveTypePattern
A pattern that matches BinaryNameOrPrimitiveType strings. -
ClassGetNameRegex
A regex that matches ClassGetName strings. -
ClassGetNamePattern
A pattern that matches ClassGetName strings. -
ClassGetSimpleNameRegex
A regex that matches ClassGetSimpleName strings. -
ClassGetSimpleNamePattern
A pattern that matches ClassGetSimpleName strings. -
DotSeparatedIdentifiersRegex
A regex that matches DotSeparatedIdentifiers strings. -
DotSeparatedIdentifiersPattern
A pattern that matches DotSeparatedIdentifiers strings. -
DotSeparatedIdentifiersOrPrimitiveTypeRegex
A regex that matches DotSeparatedIdentifiersOrPrimitiveType strings. -
DotSeparatedIdentifiersOrPrimitiveTypePattern
A pattern that matches DotSeparatedIdentifiersOrPrimitiveType strings. -
FieldDescriptorRegex
A regex that matches FieldDescriptor strings. -
FieldDescriptorPattern
A pattern that matches FieldDescriptor strings. -
FieldDescriptorWithoutPackageRegex
A regex that matches FieldDescriptorWithoutPackage strings. -
FieldDescriptorWithoutPackagePattern
A pattern that matches FieldDescriptorWithoutPackage strings. -
FieldDescriptorForPrimitiveRegex
A regex that matches FieldDescriptorForPrimitive strings. -
FieldDescriptorForPrimitivePattern
A pattern that matches FieldDescriptorForPrimitive strings. -
FqBinaryNameRegex
A regex that matches FqBinaryName strings. -
FqBinaryNamePattern
A pattern that matches FqBinaryName strings. -
FullyQualifiedNameRegex
A regex that matches FullyQualifiedName strings. -
FullyQualifiedNamePattern
A pattern that matches FullyQualifiedName strings. -
IdentifierRegex
A regex that matches Identifier strings. -
IdentifierPattern
A pattern that matches Identifier strings. -
IdentifierOrPrimitiveTypeRegex
A regex that matches IdentifierOrPrimitiveType strings. -
IdentifierOrPrimitiveTypePattern
A pattern that matches IdentifierOrPrimitiveType strings. -
InternalFormRegex
A regex that matches InternalForm strings. -
InternalFormPattern
A pattern that matches InternalForm strings. -
PrimitiveTypeRegex
A regex that matches PrimitiveType strings. -
PrimitiveTypePattern
A pattern that matches PrimitiveType strings.
-
-
Constructor Details
-
SignatureRegexes
private SignatureRegexes()Do not instantiate this class.
-
-
Method Details
-
GROUPED
Create a capturing group.- Parameters:
arg
- a regular expression- Returns:
- the argument wrapped in a capturing group
-
ANY
Create a regex matching zero or more of the given argument (Kleene star).- Parameters:
arg
- a regular expression- Returns:
- the argument, repeated zero or more times
-
ANCHORED
Create a regex that must match the entire string.- Parameters:
arg
- a regular expression- Returns:
- the argument, made to match the entire string
-
ALTERNATE
An ungrouped alternation.- Parameters:
args
- regular expressions- Returns:
- a regex that matches any one of the arguments
-
GROUPED_ALTERNATE
A grouped alternation.- Parameters:
args
- regular expressions- Returns:
- a regex that matches any one of the arguments, wrapped in a capturing group
-