Class JavacParseResult<T extends Tree>
java.lang.Object
org.checkerframework.javacutil.javacparse.JavacParseResult<T>
- Type Parameters:
T- the type of the Java code being parsed
Represents the result of parsing Java code (a file or a subpart thereof).
-
Constructor Summary
ConstructorsConstructorDescriptionJavacParseResult(T tree, List<Diagnostic<? extends JavaFileObject>> diagnostics) Create a JavacParseResult. -
Method Summary
Modifier and TypeMethodDescriptionfinal List<Diagnostic<? extends JavaFileObject>> Returns the diagnostics.final StringReturns all the parse error messages, concatenated.final TgetTree()Returns the parse tree.final booleanReturns true if at least one diagnostic is a parse error.toString()
-
Constructor Details
-
JavacParseResult
Create a JavacParseResult.- Parameters:
tree- the parse treediagnostics- the diagnostics
-
-
Method Details
-
getTree
Returns the parse tree.- Returns:
- the parse tree
-
getDiagnostics
Returns the diagnostics.- Returns:
- the diagnostics
-
hasParseError
public final boolean hasParseError()Returns true if at least one diagnostic is a parse error.- Returns:
- true if at least one diagnostic is a parse error
-
getParseErrorMessages
Returns all the parse error messages, concatenated. May return an empty string.- Returns:
- all the parse error messages, concatenated
-
toString
-