Save This Page
Home » openjdk-7 » java » util » regex » [javadoc | source]
java.util.regex
public class: PatternSyntaxException [javadoc | source]
java.lang.Object
   java.lang.Throwable
      java.lang.Exception
         java.lang.RuntimeException
            java.lang.IllegalArgumentException
               java.util.regex.PatternSyntaxException

All Implemented Interfaces:
    Serializable

Unchecked exception thrown to indicate a syntax error in a regular-expression pattern.
Fields inherited from java.lang.RuntimeException:
serialVersionUID
Fields inherited from java.lang.Exception:
serialVersionUID
Constructor:
 public PatternSyntaxException(String desc,
    String regex,
    int index) 
    Constructs a new instance of this class.
    Parameters:
    desc - A description of the error
    regex - The erroneous pattern
    index - The approximate index in the pattern of the error, or -1 if the index is not known
Method from java.util.regex.PatternSyntaxException Summary:
getDescription,   getIndex,   getMessage,   getPattern
Methods from java.lang.Throwable:
addSuppressed,   fillInStackTrace,   getCause,   getLocalizedMessage,   getMessage,   getStackTrace,   getStackTraceDepth,   getStackTraceElement,   getSuppressed,   initCause,   printStackTrace,   printStackTrace,   printStackTrace,   setStackTrace,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.util.regex.PatternSyntaxException Detail:
 public String getDescription() 
    Retrieves the description of the error.
 public int getIndex() 
    Retrieves the error index.
 public String getMessage() 
    Returns a multi-line string containing the description of the syntax error and its index, the erroneous regular-expression pattern, and a visual indication of the error index within the pattern.
 public String getPattern() 
    Retrieves the erroneous regular-expression pattern.