public static void isValidMethDecl(String line) {
final String classTempForMeth = "class T { %s{} }";
String classString = String.format(classTempForMeth, line);
try {
CompilationUnit cu = parse(classString);
VoidVisitorAdapter visitor = new VoidVisitorAdapter() {
};
cu.accept(visitor, null);
} catch (ParseException e) {
throw new RuntimeException(
"the line does not seem to be a valid method declaration: "