public class StaticAnalysis extends DefaultASTVisitor
InvalidProgramException
errors
from any AST static analysis pass. Errors found during static analysis are
usually not fatal to further analysis, and can be gathered and reported at
the end of the static analysis phase of compilation.Constructor and Description |
---|
StaticAnalysis() |
Modifier and Type | Method and Description |
---|---|
static void |
addError(InvalidProgramException ex)
Report an
InvalidProgramException error. |
static void |
addError(String msg)
Report an error message to be saved for later aggregation.
|
static List<String> |
getErrors()
Retrieve a list of all errors encountered by any
StaticAnalysis
subclass thus far. |
static String |
getErrorString()
Retrieve a message including all errors encountered by any
StaticAnalysis subclass thus far. |
static void |
resetErrors()
Clear all existing errors
|
defaultInVisit, defaultPostVisit, defaultPreVisit, inVisit, postVisit, postVisit, postVisit, postVisit, postVisit, postVisit, postVisit, postVisit, postVisit, postVisit, postVisit, postVisit, postVisit, postVisit, postVisit, postVisit, preVisit, preVisit, preVisit, preVisit, preVisit, preVisit, preVisit, preVisit, preVisit, preVisit, preVisit, preVisit, preVisit, preVisit, preVisit, preVisit
public static void addError(InvalidProgramException ex)
InvalidProgramException
error. This error is saved
for later aggregation. This method is typically called from within
a catch
block in a method of a StaticAnalysis
subclass.ex
- Exception containing message to addpublic static void addError(String msg)
msg
- Message to addpublic static void resetErrors()
public static List<String> getErrors()
StaticAnalysis
subclass thus far.public static String getErrorString()
StaticAnalysis
subclass thus far.Copyright © 2019. All rights reserved.