public class TypeOutputtingChecker extends BaseTypeChecker
TypeElement
. In particular it tests that the
types read from classfiles are the same to the ones from java files.
For testing, you need to do the following:
java -processor org.checkerframework.common.util.debug.TypeOutputtingChecker [source-file]
java org.checkerframework.common.util.debug.TypeOutputtingChecker [qualified-name]
Modifier and Type | Class and Description |
---|---|
static class |
TypeOutputtingChecker.GeneralAnnotatedTypeFactory
Stores any explicit annotation in AnnotatedTypeMirrors.
|
static class |
TypeOutputtingChecker.Visitor
Prints the types of the class and all of its enclosing fields, methods, and inner classes.
|
currentRoot, DETAILS_SEPARATOR, elementsWithSuppressedWarnings, errsOnLastExit, messager, messagesProperties, MSGS_FILE, OPTION_SEPARATOR, parentChecker, SUPPRESS_ALL_MESSAGE_KEY, SUPPRESS_ALL_PREFIX, trees, UNNEEDED_SUPPRESSION_KEY, upstreamCheckerNames, visitor
processingEnv
Constructor and Description |
---|
TypeOutputtingChecker() |
Modifier and Type | Method and Description |
---|---|
protected BaseTypeVisitor<?> |
createSourceVisitor()
Returns the appropriate visitor that type-checks the compilation unit according to the type
system rules.
|
static void |
main(String[] args)
Main entry point.
|
protected static void |
printClassType(TypeElement typeElt,
AnnotatedTypeFactory atypeFactory)
Prints the types of the class and all of its enclosing fields, methods, and inner classes.
|
void |
run(@CanonicalName String[] args)
Run the test.
|
getAnnotationProvider, getChecker, getContext, getImmediateSubcheckerClasses, getOptions, getRelatedClassName, getSubchecker, getSubcheckers, getSupportedLintOptions, getSupportedOptions, getTreePathCacher, getTypeFactory, getTypeFactoryOfSubchecker, getVisitor, initChecker, invokeConstructorFor, printOrStoreMessage, processArg, setRoot, shouldAddShutdownHook, shouldResolveReflection, shutdownHook, typeProcess, typeProcessingOver, warnUnneededSuppressions
addOptions, createSupportedLintOptions, expandCFOptions, fullMessageOf, getBooleanOption, getBooleanOption, getElementUtils, getLintOption, getLintOption, getMessagesProperties, getOption, getOption, getOptionConfiguration, getParentChecker, getProcessingEnvironment, getProperties, getStandardSuppressWarningsPrefixes, getSupportedAnnotationTypes, getSupportedSourceVersion, getSuppressWarningsPrefixes, getTreeUtils, getTypeUtils, getUpstreamCheckerNames, hasOption, init, message, printOrStoreMessage, printStats, report, reportError, reportWarning, setLintOption, setParentChecker, setProcessingEnvironment, setSupportedLintOptions, shouldSkipDefs, shouldSkipDefs, shouldSkipUses, shouldSkipUses, shouldSuppressWarnings, shouldSuppressWarnings, typeProcessingStart, useConservativeDefault, warnUnneededSuppressions
getCompilerLog, process
getCompletions, isInitialized
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getElementUtils, getOptionConfiguration, getProcessingEnvironment, getTreeUtils, getTypeUtils
protected BaseTypeVisitor<?> createSourceVisitor()
BaseTypeChecker
This implementation uses the checker naming convention to create the appropriate visitor.
If no visitor is found, it returns an instance of BaseTypeVisitor
. It reflectively
invokes the constructor that accepts this checker and the compilation unit tree (in that
order) as arguments.
Subclasses have to override this method to create the appropriate visitor if they do not follow the checker naming convention.
createSourceVisitor
in class BaseTypeChecker
public static void main(String[] args)
args
- command-line argumentspublic void run(@CanonicalName String[] args)
args
- command-line argumentsprotected static void printClassType(TypeElement typeElt, AnnotatedTypeFactory atypeFactory)