mirror of
https://github.com/corda/corda.git
synced 2025-01-23 12:58:35 +00:00
add skeleton java.util.regex classes
This commit is contained in:
parent
0ffba474fa
commit
4fed24270b
106
classpath/java/util/regex/Matcher.java
Normal file
106
classpath/java/util/regex/Matcher.java
Normal 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();
|
||||
}
|
||||
}
|
75
classpath/java/util/regex/Pattern.java
Normal file
75
classpath/java/util/regex/Pattern.java
Normal 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();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user