Class PathRegExp


  • @Deprecated
    public class PathRegExp
    extends java.lang.Object
    Deprecated.
    Will be removed in next minor release.
    Wraps a regular expression of a @Path. Instances are immutable. The regular expression has no '/' t the start.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.String DEFAULT_REG_EXP
      Deprecated.
      Default regular expression to use, if no reg exp is given (matches every character expect '/').
      static PathRegExp EMPTY
      Deprecated.
      The PathRegExp with an empty path.
      private boolean emptyOrSlash
      Deprecated.
       
      private static byte NAME_READ
      Deprecated.
       
      private static byte NAME_READ_READY
      Deprecated.
       
      private static byte NAME_READ_START
      Deprecated.
       
      private java.lang.Integer noLitChars
      Deprecated.
      Contains the number of literal chars in this Regular Expression
      private int noNonDefaultRegExp
      Deprecated.
      Contains the number of capturing groups with regular expressions that are not the default.
      private int noOfCapturingGroups
      Deprecated.
       
      private java.lang.String pathTemplateDec
      Deprecated.
       
      private java.lang.String pathTemplateEnc
      Deprecated.
       
      private java.util.regex.Pattern pattern
      Deprecated.
       
      private static byte REGEXP_READ
      Deprecated.
       
      private static byte REGEXP_READ_READY
      Deprecated.
       
      private static byte REGEXP_READ_START
      Deprecated.
       
      private java.util.List<java.lang.String> varNames
      Deprecated.
       
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private PathRegExp​(java.lang.String pathTemplate, javax.ws.rs.Path pathForExcMess)
      Deprecated.
      Is intended for internal use and testing.
    • Field Detail

      • DEFAULT_REG_EXP

        private static final java.lang.String DEFAULT_REG_EXP
        Deprecated.
        Default regular expression to use, if no reg exp is given (matches every character expect '/').
        See Also:
        #defaultRegExp, Constant Field Values
      • EMPTY

        public static final PathRegExp EMPTY
        Deprecated.
        The PathRegExp with an empty path.
      • REGEXP_READ_READY

        private static final byte REGEXP_READ_READY
        Deprecated.
        See Also:
        Constant Field Values
      • REGEXP_READ_START

        private static final byte REGEXP_READ_START
        Deprecated.
        See Also:
        Constant Field Values
      • emptyOrSlash

        private final boolean emptyOrSlash
        Deprecated.
      • noLitChars

        private final java.lang.Integer noLitChars
        Deprecated.
        Contains the number of literal chars in this Regular Expression
      • noNonDefaultRegExp

        private int noNonDefaultRegExp
        Deprecated.
        Contains the number of capturing groups with regular expressions that are not the default.
        See Also:
        DEFAULT_REG_EXP
      • noOfCapturingGroups

        private final int noOfCapturingGroups
        Deprecated.
      • pathTemplateDec

        private final java.lang.String pathTemplateDec
        Deprecated.
      • pathTemplateEnc

        private final java.lang.String pathTemplateEnc
        Deprecated.
      • pattern

        private final java.util.regex.Pattern pattern
        Deprecated.
      • varNames

        private final java.util.List<java.lang.String> varNames
        Deprecated.
    • Method Detail

      • createForMethod

        public static PathRegExp createForMethod​(java.lang.reflect.Method annotatedMethod)
                                          throws IllegalPathOnMethodException,
                                                 java.lang.IllegalArgumentException
        Deprecated.
        Creates a PathRegExp for a sub resource method or sub resource locator. Returns EMPTY, if the method is not annotated with @Path.
        Parameters:
        annotatedMethod -
        Returns:
        the PathRegExp. Never returns null.
        Throws:
        IllegalPathOnMethodException - if the annotation on the method is invalid.
        java.lang.IllegalArgumentException - if the method is null.
      • equals

        public boolean equals​(java.lang.Object anotherObject)
        Deprecated.
        Compares this regular expression of a @Path with the given Object by comparing given patterns.
        Overrides:
        equals in class java.lang.Object
      • getNoNonDefCaprGroups

        public int getNoNonDefCaprGroups()
        Deprecated.
        Returns:
        the number of capturing groups with regular expressions that are not the default.
      • getNoOfCapturingGroups

        public int getNoOfCapturingGroups()
        Deprecated.
        Returns:
        Returns the number of capturing groups.
      • getNoOfLiteralChars

        public int getNoOfLiteralChars()
        Deprecated.
        See Footnode to JSR-311-Spec, Section 2.6, Algorithm, Part 1e
        Returns:
        Returns the number of literal chars in the path patern
      • getPathTemplateDec

        public java.lang.String getPathTemplateDec()
        Deprecated.
        Returns:
        the decoded path template with a '/' at the beginning, and no one at the end.
      • getPathTemplateEnc

        public java.lang.String getPathTemplateEnc()
        Deprecated.
        Returns:
        the encoded path template with a '/' at the beginning, and no one at the end.
      • hashCode

        public int hashCode()
        Deprecated.
        Overrides:
        hashCode in class java.lang.Object
      • isEmptyOrSlash

        public boolean isEmptyOrSlash()
        Deprecated.
        Checks if the URI template is empty or only a slash.
        Returns:
        if this path regular expression is empty or "/"
      • match

        public MatchingResult match​(RemainingPath remainingPath)
        Deprecated.
        Checks if this regular expression matches the given remaining path.
        Parameters:
        remainingPath -
        Returns:
        Returns an MatchingResult, if the remainingPath matches to this template, or null, if not.
      • matchesWithEmpty

        public boolean matchesWithEmpty​(RemainingPath remainingPath)
        Deprecated.
        Checks, if this regular expression matches the given path with no final matching group.
        Parameters:
        remainingPath -
        Returns:
        true, if this regular expression matches exectly the given path, without a final capturing group.
      • processTemplVarname

        private int processTemplVarname​(java.lang.String pathTemplate,
                                        int braceIndex,
                                        java.lang.StringBuilder pathPattern,
                                        javax.ws.rs.Path pathForExcMess)
                                 throws IllegalPathException
        Deprecated.
        Parameters:
        pathTemplate -
        braceIndex -
        pathPattern -
        pathForExcMess -
        Throws:
        IllegalPathException
      • toString

        public java.lang.String toString()
        Deprecated.
        Overrides:
        toString in class java.lang.Object