| 1 | |
package org.tartarus.snowball; |
| 2 | |
|
| 3 | |
import java.lang.reflect.Method; |
| 4 | |
|
| 5 | |
public class Among { |
| 6 | |
public Among (String s, int substring_i, int result, |
| 7 | 0 | String methodname, SnowballProgram methodobject) { |
| 8 | 0 | this.s_size = s.length(); |
| 9 | 0 | this.s = s.toCharArray(); |
| 10 | 0 | this.substring_i = substring_i; |
| 11 | 0 | this.result = result; |
| 12 | 0 | this.methodobject = methodobject; |
| 13 | 0 | if (methodname.length() == 0) { |
| 14 | 0 | this.method = null; |
| 15 | |
} else { |
| 16 | |
try { |
| 17 | 0 | this.method = methodobject.getClass(). |
| 18 | |
getDeclaredMethod(methodname, new Class[0]); |
| 19 | 0 | } catch (NoSuchMethodException e) { |
| 20 | 0 | throw new RuntimeException(e); |
| 21 | 0 | } |
| 22 | |
} |
| 23 | 0 | } |
| 24 | |
|
| 25 | |
public final int s_size; |
| 26 | |
public final char[] s; |
| 27 | |
public final int substring_i; |
| 28 | |
public final int result; |
| 29 | |
public final Method method; |
| 30 | |
public final SnowballProgram methodobject; |
| 31 | |
}; |