add skeleton java.util.regex classes

This commit is contained in:
Zsombor 2008-07-13 20:33:51 -06:00 committed by Joel Dice
parent 0ffba474fa
commit 4fed24270b
2 changed files with 181 additions and 0 deletions

View File

@ -0,0 +1,106 @@
/* Copyright (c) 2008, Avian Contributors
Permission to use, copy, modify, and/or distribute this software
for any purpose with or without fee is hereby granted, provided
that the above copyright notice and this permission notice appear
in all copies.
There is NO WARRANTY for this software. See license.txt for
details. */
package java.util.regex;
/**
* This implementation is a skeleton, useful only for compilation. At runtime it
* is need to be replaced by a working implementation, for example one from the
* Apache Harmony project.
*
* @author zsombor
*
*/
public class Matcher {
public boolean matches() {
throw new UnsupportedOperationException();
}
public boolean requireEnd() {
throw new UnsupportedOperationException();
}
public boolean hitEnd() {
throw new UnsupportedOperationException();
}
public boolean lookingAt() {
throw new UnsupportedOperationException();
}
public Matcher reset() {
throw new UnsupportedOperationException();
}
public Matcher reset(CharSequence input) {
throw new UnsupportedOperationException();
}
public int start() {
throw new UnsupportedOperationException();
}
public int start(int group) {
throw new UnsupportedOperationException();
}
public Pattern pattern() {
throw new UnsupportedOperationException();
}
public Matcher region(int start, int end) {
throw new UnsupportedOperationException();
}
public int regionEnd() {
throw new UnsupportedOperationException();
}
public int regionStart() {
throw new UnsupportedOperationException();
}
public String replaceAll(String replacement) {
throw new UnsupportedOperationException();
}
public String replaceFirst(String replacement) {
throw new UnsupportedOperationException();
}
public int end() {
throw new UnsupportedOperationException();
}
public int end(int group) {
throw new UnsupportedOperationException();
}
public boolean find() {
throw new UnsupportedOperationException();
}
public boolean find(int start) {
throw new UnsupportedOperationException();
}
public int groupCount() {
throw new UnsupportedOperationException();
}
public String group() {
throw new UnsupportedOperationException();
}
public String group(int group) {
throw new UnsupportedOperationException();
}
}

View File

@ -0,0 +1,75 @@
/* Copyright (c) 2008, Avian Contributors
Permission to use, copy, modify, and/or distribute this software
for any purpose with or without fee is hereby granted, provided
that the above copyright notice and this permission notice appear
in all copies.
There is NO WARRANTY for this software. See license.txt for
details. */
package java.util.regex;
/**
* This implementation is a skeleton, useful only for compilation. At runtime it
* is need to be replaced by a working implementation, for example one from the
* Apache Harmony project.
*
* @author zsombor
*
*/
public class Pattern {
public static final int UNIX_LINES = 1;
public static final int CASE_INSENSITIVE = 2;
public static final int COMMENTS = 4;
public static final int MULTILINE = 8;
public static final int LITERAL = 16;
public static final int DOTALL = 32;
public static final int UNICODE_CASE = 64;
public static final int CANON_EQ = 128;
private int patternFlags;
private String pattern;
protected Pattern(String pattern, int flags) {
this.pattern = pattern;
this.patternFlags = flags;
}
public static Pattern compile(String regex) {
return new Pattern(regex, 0);
}
public static Pattern compile(String regex, int flags) {
return new Pattern(regex, flags);
}
public int flags() {
return patternFlags;
}
public Matcher matcher(CharSequence input) {
throw new UnsupportedOperationException();
}
public static boolean matches(String regex, CharSequence input) {
return Pattern.compile(regex).matcher(input).matches();
}
public String pattern() {
return pattern;
}
public static String quote(String s) {
throw new UnsupportedOperationException();
}
public String[] split(CharSequence input) {
throw new UnsupportedOperationException();
}
public String[] split(CharSequence input, int limit) {
throw new UnsupportedOperationException();
}
}