2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / libjava / java / util / regex / Matcher.java
blobef65557b66c8a5486dcc3c0c77cf8c221ce06edb
1 /* Matcher.java --
2 Copyright (C) 2002 Free Software Foundation, Inc.
4 This file is part of GNU Classpath.
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING. If not, write to the
18 Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19 02111-1307 USA.
21 Linking this library statically or dynamically with other modules is
22 making a combined work based on this library. Thus, the terms and
23 conditions of the GNU General Public License cover the whole
24 combination.
26 As a special exception, the copyright holders of this library give you
27 permission to link this library with independent modules to produce an
28 executable, regardless of the license terms of these independent
29 modules, and to copy and distribute the resulting executable under
30 terms of your choice, provided that you also meet, for each linked
31 independent module, the terms and conditions of the license of that
32 module. An independent module is a module which is not derived from
33 or based on this library. If you modify this library, you may extend
34 this exception to your version of the library, but you are not
35 obligated to do so. If you do not wish to do so, delete this
36 exception statement from your version. */
39 package java.util.regex;
41 /**
42 * @author Michael Koch
43 * @since 1.4
45 public class Matcher
47 private Pattern pattern;
49 /**
50 * @param sb The target string buffer
51 * @param replacement The replacement string
53 * @exception IllegalStateException If no match has yet been attempted,
54 * or if the previous match operation failed
55 * @exception IndexOutOfBoundsException If the replacement string refers
56 * to a capturing group that does not exist in the pattern
58 public Matcher appendReplacement (StringBuffer sb, String replacement)
59 throws IllegalStateException
61 throw new Error("Not implemented");
64 /**
65 * @param sb The target string buffer
67 public StringBuffer appendTail (StringBuffer sb)
69 throw new Error("Not implemented");
72 /**
73 * @exception IllegalStateException If no match has yet been attempted,
74 * or if the previous match operation failed
76 public int end ()
77 throws IllegalStateException
79 throw new Error ("Not implemented");
82 /**
83 * @param group The index of a capturing group in this matcher's pattern
85 * @exception IllegalStateException If no match has yet been attempted,
86 * or if the previous match operation failed
87 * @exception IndexOutOfBoundsException If the replacement string refers
88 * to a capturing group that does not exist in the pattern
90 public int end (int group)
91 throws IllegalStateException
93 throw new Error ("Not implemented");
96 public boolean find ()
98 throw new Error ("Not implemented");
102 * @param start The index to start the new pattern matching
104 * @exception IndexOutOfBoundsException If the replacement string refers
105 * to a capturing group that does not exist in the pattern
107 public boolean find (int start)
109 throw new Error ("Not implemented");
113 * @exception IllegalStateException If no match has yet been attempted,
114 * or if the previous match operation failed
116 public String group ()
118 throw new Error ("Not implemented");
122 * @param group The index of a capturing group in this matcher's pattern
124 * @exception IllegalStateException If no match has yet been attempted,
125 * or if the previous match operation failed
126 * @exception IndexOutOfBoundsException If the replacement string refers
127 * to a capturing group that does not exist in the pattern
129 public String group (int group)
130 throws IllegalStateException
132 throw new Error ("Not implemented");
136 * @param replacement The replacement string
138 public String replaceFirst (String replacement)
140 throw new Error ("Not implemented");
144 * @param replacement The replacement string
146 public String replaceAll (String replacement)
148 throw new Error ("Not implemented");
151 public int groupCount ()
153 throw new Error("Not implemented");
156 public boolean lookingAt ()
158 throw new Error("Not implemented");
162 * Attempts to match the entire input sequence against the pattern.
164 * If the match succeeds then more information can be obtained via the
165 * start, end, and group methods.
167 * @see #start
168 * @see #end
169 * @see #group
171 public boolean matches ()
173 throw new Error("Not implemented");
177 * Returns the Pattern that is interpreted by this Matcher
179 public Pattern pattern ()
181 return pattern;
184 public Matcher reset ()
186 throw new Error ("Not implemented");
190 * @param input The new input character sequence
192 public Matcher reset (CharSequence input)
194 throw new Error ("Not implemented");
198 * @param group The index of a capturing group in this matcher's pattern
200 * @exception IllegalStateException If no match has yet been attempted,
201 * or if the previous match operation failed
203 public int start ()
204 throws IllegalStateException
206 throw new Error("Not implemented");
210 * @param group The index of a capturing group in this matcher's pattern
212 * @exception IllegalStateException If no match has yet been attempted,
213 * or if the previous match operation failed
214 * @exception IndexOutOfBoundsException If the replacement string refers
215 * to a capturing group that does not exist in the pattern
217 public int start (int group)
218 throws IllegalStateException
220 throw new Error("Not implemented");