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 String methodname, SnowballProgram methodobject) {
8 this.s_size = s.length();
9 this.s = s.toCharArray();
10 this.substring_i = substring_i;
11 this.result = result;
12 this.methodobject = methodobject;
13 if (methodname.length() == 0) {
14 this.method = null;
15 } else {
16 try {
17 this.method = methodobject.getClass().
18 getDeclaredMethod(methodname, new Class[0]);
19 } catch (NoSuchMethodException e) {
20 throw new RuntimeException(e);
21 }
22 }
23 }
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 };