JML

java.util.regex
Class Pattern

java.lang.Object
  extended byjava.util.regex.Pattern
All Implemented Interfaces:
Serializable

public final class Pattern
extends Object
implements Serializable


Nested Class Summary
(package private) static class Pattern.All
           
(package private) static class Pattern.BackRef
           
(package private) static class Pattern.Begin
           
(package private) static class Pattern.Behind
           
(package private) static class Pattern.BehindS
           
private static class Pattern.BitClass
           
private static class Pattern.BmpCharProperty
           
(package private) static class Pattern.BnM
           
(package private) static class Pattern.BnMS
           
(package private) static class Pattern.Bound
           
(package private) static class Pattern.Branch
           
(package private) static class Pattern.BranchConn
           
(package private) static class Pattern.Caret
           
(package private) static class Pattern.Category
           
private static class Pattern.CharProperty
           
private static class Pattern.CharPropertyNames
           
(package private) static class Pattern.CIBackRef
           
(package private) static class Pattern.Conditional
           
(package private) static class Pattern.Ctype
           
(package private) static class Pattern.Curly
           
(package private) static class Pattern.Dollar
           
(package private) static class Pattern.Dot
           
(package private) static class Pattern.End
           
(package private) static class Pattern.First
           
(package private) static class Pattern.GroupCurly
           
(package private) static class Pattern.GroupHead
           
(package private) static class Pattern.GroupRef
           
(package private) static class Pattern.GroupTail
           
(package private) static class Pattern.LastMatch
           
(package private) static class Pattern.LastNode
           
(package private) static class Pattern.LazyLoop
           
(package private) static class Pattern.Loop
           
(package private) static class Pattern.Neg
           
(package private) static class Pattern.Node
           
(package private) static class Pattern.NotBehind
           
(package private) static class Pattern.NotBehindS
           
(package private) static class Pattern.Pos
           
(package private) static class Pattern.Prolog
           
(package private) static class Pattern.Ques
           
(package private) static class Pattern.Slice
           
(package private) static class Pattern.SliceA
           
(package private) static class Pattern.SliceS
           
(package private) static class Pattern.SliceU
           
(package private) static class Pattern.Start
           
(package private) static class Pattern.StartS
           
(package private) static class Pattern.TreeInfo
           
(package private) static class Pattern.UnixCaret
           
(package private) static class Pattern.UnixDollar
           
(package private) static class Pattern.UnixDot
           
 
Field Summary
(package private) static Pattern.Node accept
           
(package private)  int[] buffer
           
static int CANON_EQ
           
(package private)  int capturingGroupCount
           
static int CASE_INSENSITIVE
           
static int COMMENTS
           
private  boolean compiled
           
private  int cursor
           
static int DOTALL
           
private  int flags
           
(package private) static int GREEDY
           
(package private)  Pattern.GroupHead[] groupNodes
           
(package private) static int INDEPENDENT
           
(package private) static Pattern.Node lastAccept
           
(package private) static int LAZY
           
static int LITERAL
           
(package private)  int localCount
           
(package private) static Pattern.Node lookbehindEnd
           
(package private)  Pattern.Node matchRoot
           
(package private) static int MAX_REPS
           
static int MULTILINE
           
private  String normalizedPattern
           
private  String pattern
           
private  int patternLength
           
(package private) static int POSSESSIVE
           
(package private)  Pattern.Node root
           
private static long serialVersionUID
           
private  int[] temp
           
static int UNICODE_CASE
           
static int UNIX_LINES
           
 
Constructor Summary
private Pattern(String, int)
           
 
Method Summary
private  void accept(int, String)
           
private  void addFlag()
           
private  void append(int, int)
           
private  Pattern.Node atom()
           
private  int c()
           
private static Pattern.CharProperty caseInsensitiveRangeFor(int, int)
           
private  Pattern.CharProperty charPropertyNodeFor(String)
           
private  Pattern.CharProperty clazz(boolean)
           
private  Pattern.Node closure(Pattern.Node)
           
private  void compile()
           
static Pattern compile(String)
           
static Pattern compile(String, int)
           
private  String composeOneStep(String)
           
private static int countChars(CharSequence, int, int)
           
private static int countCodePoints(CharSequence)
           
private  Pattern.Node createGroup(boolean)
           
private  PatternSyntaxException error(String)
           
private  int escape(boolean, boolean)
           
private  Pattern.Node expr(Pattern.Node)
           
private  Pattern.CharProperty family(boolean)
           
private  boolean findSupplementary(int, int)
           
 int flags()
           
private  int getClass(int)
           
private  Pattern.Node group0()
           
private  boolean has(int)
           
private static boolean hasBaseCharacter(Matcher, int, CharSequence)
           
private static boolean inRange(int, int, int)
           
private static Pattern.CharProperty intersection(Pattern.CharProperty, Pattern.CharProperty)
           
private  boolean isLineSeparator(int)
           
private static boolean isSupplementary(int)
           
private static boolean isSurrogate(int)
           
private  void mark(int)
           
 Matcher matcher(CharSequence)
           
static boolean matches(String, CharSequence)
           
private  Pattern.CharProperty newSingle(int)
           
private  Pattern.Node newSlice(int[], int, boolean)
           
private  int next()
           
private  int nextEscaped()
           
private  void normalize()
           
private  int normalizeCharClass(StringBuilder, int)
           
private  int o()
           
private  int parsePastLine()
           
private  int parsePastWhitespace(int)
           
 String pattern()
           
private  int peek()
           
private  int peekPastLine()
           
private  int peekPastWhitespace(int)
           
private static void printObjectTree(Pattern.Node)
           
private  String produceEquivalentAlternation(String)
           
private  String[] producePermutations(String)
           
static String quote(String)
           
private  Pattern.CharProperty range(Pattern.BitClass)
           
private static Pattern.CharProperty rangeFor(int, int)
           
private  int read()
           
private  int readEscaped()
           
private  void readObject(ObjectInputStream)
           
private  Pattern.Node ref(int)
           
private  void RemoveQEQuoting()
           
private  Pattern.Node sequence(Pattern.Node)
           
private static Pattern.CharProperty setDifference(Pattern.CharProperty, Pattern.CharProperty)
           
private  int single()
           
private  int skip()
           
 String[] split(CharSequence)
           
 String[] split(CharSequence, int)
           
private  void subFlag()
           
 String toString()
           
private  int u()
           
private  Pattern.CharProperty unicodeBlockPropertyFor(String)
           
private static Pattern.CharProperty union(Pattern.CharProperty, Pattern.CharProperty)
           
private  void unread()
           
private  int x()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

lastAccept

static Pattern.Node lastAccept

CANON_EQ

public static final int CANON_EQ

INDEPENDENT

static final int INDEPENDENT

normalizedPattern

private transient String normalizedPattern

DOTALL

public static final int DOTALL

patternLength

private transient int patternLength

cursor

private transient int cursor

LAZY

static final int LAZY

temp

private transient int[] temp

COMMENTS

public static final int COMMENTS

capturingGroupCount

transient int capturingGroupCount

POSSESSIVE

static final int POSSESSIVE

groupNodes

transient Pattern.GroupHead[] groupNodes

UNICODE_CASE

public static final int UNICODE_CASE

MAX_REPS

static final int MAX_REPS

compiled

private transient volatile boolean compiled

pattern

private String pattern

LITERAL

public static final int LITERAL

MULTILINE

public static final int MULTILINE

serialVersionUID

private static final long serialVersionUID

accept

static Pattern.Node accept

UNIX_LINES

public static final int UNIX_LINES

matchRoot

transient Pattern.Node matchRoot

flags

private int flags

localCount

transient int localCount

lookbehindEnd

static Pattern.Node lookbehindEnd

root

transient Pattern.Node root

CASE_INSENSITIVE

public static final int CASE_INSENSITIVE

GREEDY

static final int GREEDY

buffer

transient int[] buffer
Constructor Detail

Pattern

private Pattern(String,
                int)
Method Detail

compile

public static Pattern compile(String)

compile

public static Pattern compile(String,
                              int)

pattern

public String pattern()

toString

public String toString()
Overrides:
toString in class Object

matcher

public Matcher matcher(CharSequence)

flags

public int flags()

matches

public static boolean matches(String,
                              CharSequence)

split

public String[] split(CharSequence,
                      int)

split

public String[] split(CharSequence)

quote

public static String quote(String)

readObject

private void readObject(ObjectInputStream)
                 throws IOException,
                        ClassNotFoundException
Throws:
IOException
ClassNotFoundException

normalize

private void normalize()

normalizeCharClass

private int normalizeCharClass(StringBuilder,
                               int)

produceEquivalentAlternation

private String produceEquivalentAlternation(String)

producePermutations

private String[] producePermutations(String)

getClass

private int getClass(int)

composeOneStep

private String composeOneStep(String)

RemoveQEQuoting

private void RemoveQEQuoting()

compile

private void compile()

printObjectTree

private static void printObjectTree(Pattern.Node)

has

private boolean has(int)

accept

private void accept(int,
                    String)

mark

private void mark(int)

peek

private int peek()

read

private int read()

readEscaped

private int readEscaped()

next

private int next()

nextEscaped

private int nextEscaped()

peekPastWhitespace

private int peekPastWhitespace(int)

parsePastWhitespace

private int parsePastWhitespace(int)

parsePastLine

private int parsePastLine()

peekPastLine

private int peekPastLine()

isLineSeparator

private boolean isLineSeparator(int)

skip

private int skip()

unread

private void unread()

error

private PatternSyntaxException error(String)

findSupplementary

private boolean findSupplementary(int,
                                  int)

isSupplementary

private static final boolean isSupplementary(int)

expr

private Pattern.Node expr(Pattern.Node)

sequence

private Pattern.Node sequence(Pattern.Node)

atom

private Pattern.Node atom()

append

private void append(int,
                    int)

ref

private Pattern.Node ref(int)

escape

private int escape(boolean,
                   boolean)

clazz

private Pattern.CharProperty clazz(boolean)

range

private Pattern.CharProperty range(Pattern.BitClass)

single

private int single()

family

private Pattern.CharProperty family(boolean)

unicodeBlockPropertyFor

private Pattern.CharProperty unicodeBlockPropertyFor(String)

charPropertyNodeFor

private Pattern.CharProperty charPropertyNodeFor(String)

group0

private Pattern.Node group0()

createGroup

private Pattern.Node createGroup(boolean)

addFlag

private void addFlag()

subFlag

private void subFlag()

closure

private Pattern.Node closure(Pattern.Node)

c

private int c()

o

private int o()

x

private int x()

u

private int u()

isSurrogate

private static final boolean isSurrogate(int)

countChars

private static final int countChars(CharSequence,
                                    int,
                                    int)

countCodePoints

private static final int countCodePoints(CharSequence)

newSingle

private Pattern.CharProperty newSingle(int)

newSlice

private Pattern.Node newSlice(int[],
                              int,
                              boolean)

inRange

private static boolean inRange(int,
                               int,
                               int)

rangeFor

private static Pattern.CharProperty rangeFor(int,
                                             int)

caseInsensitiveRangeFor

private static Pattern.CharProperty caseInsensitiveRangeFor(int,
                                                            int)

union

private static Pattern.CharProperty union(Pattern.CharProperty,
                                          Pattern.CharProperty)

intersection

private static Pattern.CharProperty intersection(Pattern.CharProperty,
                                                 Pattern.CharProperty)

setDifference

private static Pattern.CharProperty setDifference(Pattern.CharProperty,
                                                  Pattern.CharProperty)

hasBaseCharacter

private static boolean hasBaseCharacter(Matcher,
                                        int,
                                        CharSequence)

JML

JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.