• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2014 The Android Open Source Project
3  * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5  *
6  * This code is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License version 2 only, as
8  * published by the Free Software Foundation.  Oracle designates this
9  * particular file as subject to the "Classpath" exception as provided
10  * by Oracle in the LICENSE file that accompanied this code.
11  *
12  * This code is distributed in the hope that it will be useful, but WITHOUT
13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15  * version 2 for more details (a copy is included in the LICENSE file that
16  * accompanied this code).
17  *
18  * You should have received a copy of the GNU General Public License version
19  * 2 along with this work; if not, write to the Free Software Foundation,
20  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21  *
22  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
23  * or visit www.oracle.com if you need additional information or have any
24  * questions.
25  */
26 
27 package java.util.regex;
28 
29 import dalvik.annotation.compat.UnsupportedAppUsage;
30 
31 @SuppressWarnings({"unchecked", "deprecation", "all"})
32 public final class Matcher implements java.util.regex.MatchResult {
33 
Matcher(java.util.regex.Pattern parent, java.lang.CharSequence text)34     Matcher(java.util.regex.Pattern parent, java.lang.CharSequence text) {
35         throw new RuntimeException("Stub!");
36     }
37 
pattern()38     public java.util.regex.Pattern pattern() {
39         throw new RuntimeException("Stub!");
40     }
41 
toMatchResult()42     public java.util.regex.MatchResult toMatchResult() {
43         throw new RuntimeException("Stub!");
44     }
45 
usePattern(java.util.regex.Pattern newPattern)46     public java.util.regex.Matcher usePattern(java.util.regex.Pattern newPattern) {
47         throw new RuntimeException("Stub!");
48     }
49 
reset()50     public java.util.regex.Matcher reset() {
51         throw new RuntimeException("Stub!");
52     }
53 
reset(java.lang.CharSequence input)54     public java.util.regex.Matcher reset(java.lang.CharSequence input) {
55         throw new RuntimeException("Stub!");
56     }
57 
start()58     public int start() {
59         throw new RuntimeException("Stub!");
60     }
61 
start(int group)62     public int start(int group) {
63         throw new RuntimeException("Stub!");
64     }
65 
start(java.lang.String name)66     public int start(java.lang.String name) {
67         throw new RuntimeException("Stub!");
68     }
69 
end()70     public int end() {
71         throw new RuntimeException("Stub!");
72     }
73 
end(int group)74     public int end(int group) {
75         throw new RuntimeException("Stub!");
76     }
77 
end(java.lang.String name)78     public int end(java.lang.String name) {
79         throw new RuntimeException("Stub!");
80     }
81 
group()82     public java.lang.String group() {
83         throw new RuntimeException("Stub!");
84     }
85 
group(int group)86     public java.lang.String group(int group) {
87         throw new RuntimeException("Stub!");
88     }
89 
group(java.lang.String name)90     public java.lang.String group(java.lang.String name) {
91         throw new RuntimeException("Stub!");
92     }
93 
groupCount()94     public int groupCount() {
95         throw new RuntimeException("Stub!");
96     }
97 
matches()98     public boolean matches() {
99         throw new RuntimeException("Stub!");
100     }
101 
find()102     public boolean find() {
103         throw new RuntimeException("Stub!");
104     }
105 
find(int start)106     public boolean find(int start) {
107         throw new RuntimeException("Stub!");
108     }
109 
lookingAt()110     public boolean lookingAt() {
111         throw new RuntimeException("Stub!");
112     }
113 
quoteReplacement(java.lang.String s)114     public static java.lang.String quoteReplacement(java.lang.String s) {
115         throw new RuntimeException("Stub!");
116     }
117 
appendReplacement( java.lang.StringBuffer sb, java.lang.String replacement)118     public java.util.regex.Matcher appendReplacement(
119             java.lang.StringBuffer sb, java.lang.String replacement) {
120         throw new RuntimeException("Stub!");
121     }
122 
appendEvaluated(java.lang.StringBuffer buffer, java.lang.String s)123     private void appendEvaluated(java.lang.StringBuffer buffer, java.lang.String s) {
124         throw new RuntimeException("Stub!");
125     }
126 
appendTail(java.lang.StringBuffer sb)127     public java.lang.StringBuffer appendTail(java.lang.StringBuffer sb) {
128         throw new RuntimeException("Stub!");
129     }
130 
replaceAll(java.lang.String replacement)131     public java.lang.String replaceAll(java.lang.String replacement) {
132         throw new RuntimeException("Stub!");
133     }
134 
replaceFirst(java.lang.String replacement)135     public java.lang.String replaceFirst(java.lang.String replacement) {
136         throw new RuntimeException("Stub!");
137     }
138 
region(int start, int end)139     public java.util.regex.Matcher region(int start, int end) {
140         throw new RuntimeException("Stub!");
141     }
142 
regionStart()143     public int regionStart() {
144         throw new RuntimeException("Stub!");
145     }
146 
regionEnd()147     public int regionEnd() {
148         throw new RuntimeException("Stub!");
149     }
150 
hasTransparentBounds()151     public boolean hasTransparentBounds() {
152         throw new RuntimeException("Stub!");
153     }
154 
useTransparentBounds(boolean b)155     public java.util.regex.Matcher useTransparentBounds(boolean b) {
156         throw new RuntimeException("Stub!");
157     }
158 
hasAnchoringBounds()159     public boolean hasAnchoringBounds() {
160         throw new RuntimeException("Stub!");
161     }
162 
useAnchoringBounds(boolean b)163     public java.util.regex.Matcher useAnchoringBounds(boolean b) {
164         throw new RuntimeException("Stub!");
165     }
166 
toString()167     public java.lang.String toString() {
168         throw new RuntimeException("Stub!");
169     }
170 
hitEnd()171     public boolean hitEnd() {
172         throw new RuntimeException("Stub!");
173     }
174 
requireEnd()175     public boolean requireEnd() {
176         throw new RuntimeException("Stub!");
177     }
178 
getTextLength()179     int getTextLength() {
180         throw new RuntimeException("Stub!");
181     }
182 
getSubSequence(int beginIndex, int endIndex)183     java.lang.CharSequence getSubSequence(int beginIndex, int endIndex) {
184         throw new RuntimeException("Stub!");
185     }
186 
reset(java.lang.CharSequence input, int start, int end)187     private java.util.regex.Matcher reset(java.lang.CharSequence input, int start, int end) {
188         throw new RuntimeException("Stub!");
189     }
190 
resetForInput()191     private void resetForInput() {
192         throw new RuntimeException("Stub!");
193     }
194 
ensureMatch()195     private void ensureMatch() {
196         throw new RuntimeException("Stub!");
197     }
198 
getMatchedGroupIndex(java.lang.String name)199     private int getMatchedGroupIndex(java.lang.String name) {
200         throw new RuntimeException("Stub!");
201     }
202 
getMatchedGroupIndex0(long patternAddr, java.lang.String name)203     private static native int getMatchedGroupIndex0(long patternAddr, java.lang.String name);
204 
findImpl(long addr, int startIndex, int[] offsets)205     private static native boolean findImpl(long addr, int startIndex, int[] offsets);
206 
findNextImpl(long addr, int[] offsets)207     private static native boolean findNextImpl(long addr, int[] offsets);
208 
getNativeFinalizer()209     private static native long getNativeFinalizer();
210 
groupCountImpl(long addr)211     private static native int groupCountImpl(long addr);
212 
hitEndImpl(long addr)213     private static native boolean hitEndImpl(long addr);
214 
lookingAtImpl(long addr, int[] offsets)215     private static native boolean lookingAtImpl(long addr, int[] offsets);
216 
matchesImpl(long addr, int[] offsets)217     private static native boolean matchesImpl(long addr, int[] offsets);
218 
nativeSize()219     private static native int nativeSize();
220 
openImpl(long patternAddr)221     private static native long openImpl(long patternAddr);
222 
requireEndImpl(long addr)223     private static native boolean requireEndImpl(long addr);
224 
setInputImpl(long addr, java.lang.String s, int start, int end)225     private static native void setInputImpl(long addr, java.lang.String s, int start, int end);
226 
useAnchoringBoundsImpl(long addr, boolean value)227     private static native void useAnchoringBoundsImpl(long addr, boolean value);
228 
useTransparentBoundsImpl(long addr, boolean value)229     private static native void useTransparentBoundsImpl(long addr, boolean value);
230 
231     private long address;
232 
233     boolean anchoringBounds = true;
234 
235     @UnsupportedAppUsage
236     int appendPos = 0; // 0x0
237 
238     int from;
239 
240     int[] groups;
241 
242     private boolean matchFound;
243 
244     private java.lang.Runnable nativeFinalizer;
245 
246     private java.lang.CharSequence originalInput;
247 
248     private java.util.regex.Pattern parentPattern;
249 
250     private static final libcore.util.NativeAllocationRegistry registry;
251 
252     static {
253         registry = null;
254     }
255 
256     java.lang.String text;
257 
258     int to;
259 
260     boolean transparentBounds = false;
261 
262     @SuppressWarnings({"unchecked", "deprecation", "all"})
263     static final class OffsetBasedMatchResult implements java.util.regex.MatchResult {
264 
OffsetBasedMatchResult(java.lang.String input, int[] offsets)265         OffsetBasedMatchResult(java.lang.String input, int[] offsets) {
266             throw new RuntimeException("Stub!");
267         }
268 
start()269         public int start() {
270             throw new RuntimeException("Stub!");
271         }
272 
start(int group)273         public int start(int group) {
274             throw new RuntimeException("Stub!");
275         }
276 
end()277         public int end() {
278             throw new RuntimeException("Stub!");
279         }
280 
end(int group)281         public int end(int group) {
282             throw new RuntimeException("Stub!");
283         }
284 
group()285         public java.lang.String group() {
286             throw new RuntimeException("Stub!");
287         }
288 
group(int group)289         public java.lang.String group(int group) {
290             throw new RuntimeException("Stub!");
291         }
292 
groupCount()293         public int groupCount() {
294             throw new RuntimeException("Stub!");
295         }
296 
297         private final java.lang.String input;
298 
299         {
300             input = null;
301         }
302 
303         private final int[] offsets;
304 
305         {
306             offsets = new int[0];
307         }
308     }
309 }
310