public static boolean isTypeIncludedIn(TypeName value, Type... types) {
for (Type item : types) {
if (value.equals(typeName(item))) {
return true;
}
}
return false;
}
it prompts:
Found "boolean", expected one of ";" "@" "class" "enum" "interface" "module" "open" "record" (line 1,col 8).
Can I parse only a java method, not a class?It seems that the method parseBodyDeclaration defined in Javaparser can be used. But I don't know how to modify JavaLanguageFrontend.java file. Please give me some advice.Thanks a lot!
When I am parsing the following file:
it prompts: Found "boolean", expected one of ";" "@" "class" "enum" "interface" "module" "open" "record" (line 1,col 8).
Can I parse only a java method, not a class?It seems that the method parseBodyDeclaration defined in Javaparser can be used. But I don't know how to modify JavaLanguageFrontend.java file. Please give me some advice.Thanks a lot!