// At most, check the first 250 lines - this sounds reasonable to me
53
53
int maxLine = Math.min(buffer.getLineCount(),250);
54
import gnu.regexp.RE;
55
import gnu.regexp.REMatch;
54
import java.util.regex.Pattern;
55
import java.util.regex.Matcher;
56
56
// Build the regex - based on the offical java language spec.
57
RE regex = new RE("^\\s*(public|protected|private|static|abstract|final|native|synchronized|transient|volatile|strictfp)?\\s*(class|interface)\\s*([^ {/]*)");