Class SignatureRegexes

java.lang.Object
org.plumelib.reflection.SignatureRegexes

public class SignatureRegexes extends Object
This class defines regular expressions for types supported by the Signature String Checker.
  • Field Details

    • KEYWORD_NON_PRIMITIVE_TYPE

      private static final @Regex String KEYWORD_NON_PRIMITIVE_TYPE
      An unanchored regex that matches keywords, except primitive types.
    • PRIMITIVE_TYPE

      private static final @Regex String PRIMITIVE_TYPE
      An unanchored regex that matches primitive types.
    • FD_PRIMITIVE

      private static final @Regex String FD_PRIMITIVE
      A regex that matches field descriptors for primitive types.
      See Also:
    • KEYWORD

      private static final @Regex String KEYWORD
      An unanchored regex that matches keywords.
    • KEYWORD_OR_LITERAL

      private static final @Regex String KEYWORD_OR_LITERAL
      A regex that matches identifier tokens that are not identifiers (keywords, boolean literals, and the null literal).
    • IDENTIFIER_TOKEN

      private static final @Regex String IDENTIFIER_TOKEN
      A regex that matches Java identifier tokens, as defined by the Java grammar.
      See Also:
    • IDENTIFIER

      private static final @Regex String IDENTIFIER
      A grouped regex that matches identifiers.
    • IDENTIFIER_OR_PRIMITIVE_TYPE

      public static final @Regex String IDENTIFIER_OR_PRIMITIVE_TYPE
      An anchored regex that matches Identifier strings.
    • DOT_SEPARATED_IDENTIFIERS

      private static final @Regex String DOT_SEPARATED_IDENTIFIERS
      An unanchored regex that matches DotSeparatedIdentifiers strings.
    • SLASH_SEPARATED_IDENTIFIERS

      private static final @Regex String SLASH_SEPARATED_IDENTIFIERS
      An unanchored regex that matches slash-separated identifiers.
    • NESTED_ONE

      private static final @Regex String NESTED_ONE
      A regex that matches the nested-class part of a class name, for one nested class.
      See Also:
    • NESTED

      private static final @Regex String NESTED
      A regex that matches the nested-class part of a class name.
    • BINARY_NAME

      private static final @Regex String BINARY_NAME
      An unanchored regex that matches BinaryName strings.
    • ARRAY

      private static final @Regex String ARRAY
      A regex that matches the nested-class part of a class name.
      See Also:
    • INTERNAL_FORM

      public static final @Regex String INTERNAL_FORM
      A regex that matches InternalForm strings.
    • CLASS_GET_NAME_NONPRIMITIVE_NONARRAY

      private static final @Regex String CLASS_GET_NAME_NONPRIMITIVE_NONARRAY
      A regex that matches ClassGetName, for non-primitive, non-array types.
    • ArrayWithoutPackageRegex

      public static final @Regex String ArrayWithoutPackageRegex
      A regex that matches ArrayWithoutPackage strings.
    • ArrayWithoutPackagePattern

      public static final Pattern ArrayWithoutPackagePattern
      A pattern that matches ArrayWithoutPackage strings.
    • BinaryNameRegex

      public static final @Regex String BinaryNameRegex
      A regex that matches BinaryName strings.
    • BinaryNamePattern

      public static final Pattern BinaryNamePattern
      A pattern that matches BinaryName strings.
    • BinaryNameWithoutPackageRegex

      public static final @Regex String BinaryNameWithoutPackageRegex
      A regex that matches BinaryNameWithoutPackage strings.
    • BinaryNameWithoutPackagePattern

      public static final Pattern BinaryNameWithoutPackagePattern
      A pattern that matches BinaryNameWithoutPackage strings.
    • BinaryNameOrPrimitiveTypeRegex

      public static final @Regex String BinaryNameOrPrimitiveTypeRegex
      A regex that matches BinaryNameOrPrimitiveType strings.
    • BinaryNameOrPrimitiveTypePattern

      public static final Pattern BinaryNameOrPrimitiveTypePattern
      A pattern that matches BinaryNameOrPrimitiveType strings.
    • ClassGetNameRegex

      public static final @Regex String ClassGetNameRegex
      A regex that matches ClassGetName strings.
    • ClassGetNamePattern

      public static final Pattern ClassGetNamePattern
      A pattern that matches ClassGetName strings.
    • ClassGetSimpleNameRegex

      public static final @Regex String ClassGetSimpleNameRegex
      A regex that matches ClassGetSimpleName strings.
    • ClassGetSimpleNamePattern

      public static final Pattern ClassGetSimpleNamePattern
      A pattern that matches ClassGetSimpleName strings.
    • DotSeparatedIdentifiersRegex

      public static final @Regex String DotSeparatedIdentifiersRegex
      A regex that matches DotSeparatedIdentifiers strings.
    • DotSeparatedIdentifiersPattern

      public static final Pattern DotSeparatedIdentifiersPattern
      A pattern that matches DotSeparatedIdentifiers strings.
    • DotSeparatedIdentifiersOrPrimitiveTypeRegex

      public static final @Regex String DotSeparatedIdentifiersOrPrimitiveTypeRegex
      A regex that matches DotSeparatedIdentifiersOrPrimitiveType strings.
    • DotSeparatedIdentifiersOrPrimitiveTypePattern

      public static final Pattern DotSeparatedIdentifiersOrPrimitiveTypePattern
      A pattern that matches DotSeparatedIdentifiersOrPrimitiveType strings.
    • FieldDescriptorRegex

      public static final @Regex String FieldDescriptorRegex
      A regex that matches FieldDescriptor strings.
    • FieldDescriptorPattern

      public static final Pattern FieldDescriptorPattern
      A pattern that matches FieldDescriptor strings.
    • FieldDescriptorWithoutPackageRegex

      public static final @Regex String FieldDescriptorWithoutPackageRegex
      A regex that matches FieldDescriptorWithoutPackage strings.
    • FieldDescriptorWithoutPackagePattern

      public static final Pattern FieldDescriptorWithoutPackagePattern
      A pattern that matches FieldDescriptorWithoutPackage strings.
    • FieldDescriptorForPrimitiveRegex

      public static final @Regex String FieldDescriptorForPrimitiveRegex
      A regex that matches FieldDescriptorForPrimitive strings.
    • FieldDescriptorForPrimitivePattern

      public static final Pattern FieldDescriptorForPrimitivePattern
      A pattern that matches FieldDescriptorForPrimitive strings.
    • FqBinaryNameRegex

      public static final @Regex String FqBinaryNameRegex
      A regex that matches FqBinaryName strings.
    • FqBinaryNamePattern

      public static final Pattern FqBinaryNamePattern
      A pattern that matches FqBinaryName strings.
    • FullyQualifiedNameRegex

      public static final @Regex String FullyQualifiedNameRegex
      A regex that matches FullyQualifiedName strings.
    • FullyQualifiedNamePattern

      public static final Pattern FullyQualifiedNamePattern
      A pattern that matches FullyQualifiedName strings.
    • IdentifierRegex

      public static final @Regex String IdentifierRegex
      A regex that matches Identifier strings.
    • IdentifierPattern

      public static final Pattern IdentifierPattern
      A pattern that matches Identifier strings.
    • IdentifierOrPrimitiveTypeRegex

      public static final @Regex String IdentifierOrPrimitiveTypeRegex
      A regex that matches IdentifierOrPrimitiveType strings.
    • IdentifierOrPrimitiveTypePattern

      public static final Pattern IdentifierOrPrimitiveTypePattern
      A pattern that matches IdentifierOrPrimitiveType strings.
    • InternalFormRegex

      public static final @Regex String InternalFormRegex
      A regex that matches InternalForm strings.
    • InternalFormPattern

      public static final Pattern InternalFormPattern
      A pattern that matches InternalForm strings.
    • PrimitiveTypeRegex

      public static final @Regex String PrimitiveTypeRegex
      A regex that matches PrimitiveType strings.
    • PrimitiveTypePattern

      public static final Pattern PrimitiveTypePattern
      A pattern that matches PrimitiveType strings.
  • Constructor Details

    • SignatureRegexes

      private SignatureRegexes()
      Do not instantiate this class.
  • Method Details

    • GROUPED

      private static final @Regex String GROUPED(@Regex String arg)
      Create a capturing group.
      Parameters:
      arg - a regular expression
      Returns:
      the argument wrapped in a capturing group
    • ANY

      private static final @Regex String ANY(@Regex String arg)
      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

      private static final @Regex String ANCHORED(@Regex String arg)
      Create a regex that must match the entire string.
      Parameters:
      arg - a regular expression
      Returns:
      the argument, made to match the entire string
    • ALTERNATE

      private static final @Regex String ALTERNATE(@Regex String... args)
      An ungrouped alternation.
      Parameters:
      args - regular expressions
      Returns:
      a regex that matches any one of the arguments
    • GROUPED_ALTERNATE

      private static final @Regex String GROUPED_ALTERNATE(@Regex String... args)
      A grouped alternation.
      Parameters:
      args - regular expressions
      Returns:
      a regex that matches any one of the arguments, wrapped in a capturing group