Package spoon.reflect.visitor
Class ModelConsistencyChecker
java.lang.Object
spoon.reflect.visitor.CtScanner
spoon.reflect.visitor.ModelConsistencyChecker
- All Implemented Interfaces:
CtVisitor
This scanner checks that a program model is consistent with regards to the
parent elements (children must have the right parent). This class can be used
to validate that a program transformation does not harm the model integrity,
and also to automatically fix it when possible.
-
Constructor Summary
ConstructorDescriptionModelConsistencyChecker(Environment environment, boolean fixInconsistencies, boolean fixNullParents)
Creates a new model consistency checker. -
Method Summary
Methods inherited from class spoon.reflect.visitor.CtScanner
scan, scan, scan, scan, scan, scan, scan, visitCtAnnotation, visitCtAnnotationFieldAccess, visitCtAnnotationMethod, visitCtAnnotationType, visitCtAnonymousExecutable, visitCtArrayRead, visitCtArrayTypeReference, visitCtArrayWrite, visitCtAssert, visitCtAssignment, visitCtBinaryOperator, visitCtBlock, visitCtBreak, visitCtCase, visitCtCatch, visitCtCatchVariable, visitCtCatchVariableReference, visitCtClass, visitCtCodeSnippetExpression, visitCtCodeSnippetStatement, visitCtComment, visitCtCompilationUnit, visitCtConditional, visitCtConstructor, visitCtConstructorCall, visitCtContinue, visitCtDo, visitCtEnum, visitCtEnumValue, visitCtExecutableReference, visitCtExecutableReferenceExpression, visitCtField, visitCtFieldRead, visitCtFieldReference, visitCtFieldWrite, visitCtFor, visitCtForEach, visitCtIf, visitCtImport, visitCtInterface, visitCtIntersectionTypeReference, visitCtInvocation, visitCtJavaDoc, visitCtJavaDocTag, visitCtLambda, visitCtLiteral, visitCtLocalVariable, visitCtLocalVariableReference, visitCtMethod, visitCtModule, visitCtModuleReference, visitCtModuleRequirement, visitCtNewArray, visitCtNewClass, visitCtOperatorAssignment, visitCtPackage, visitCtPackageDeclaration, visitCtPackageExport, visitCtPackageReference, visitCtParameter, visitCtParameterReference, visitCtProvidedService, visitCtRecord, visitCtRecordComponent, visitCtReturn, visitCtStatementList, visitCtSuperAccess, visitCtSwitch, visitCtSwitchExpression, visitCtSynchronized, visitCtTextBlock, visitCtThisAccess, visitCtThrow, visitCtTry, visitCtTryWithResource, visitCtTypeAccess, visitCtTypeMemberWildcardImportReference, visitCtTypeParameter, visitCtTypeParameterReference, visitCtTypePattern, visitCtTypeReference, visitCtUnaryOperator, visitCtUnboundVariableReference, visitCtUsedService, visitCtVariableRead, visitCtVariableWrite, visitCtWhile, visitCtWildcardReference, visitCtYieldStatement
-
Constructor Details
-
ModelConsistencyChecker
public ModelConsistencyChecker(Environment environment, boolean fixInconsistencies, boolean fixNullParents)Creates a new model consistency checker.- Parameters:
environment
- the environment where to report errorsfixInconsistencies
- automatically fix the inconsistencies rather than reporting warnings (to report warnings, set this to false)fixNullParents
- automatically fix the null parents rather than reporting warnings (to report warnings, set this to false)
-
-
Method Details