|
124 | 124 |
|
125 | 125 |
|
126 | 126 | The Base Checker |
127 | | -(more precisely, the \refclass{framework/common/basetype}{BaseTypeChecker}) |
| 127 | +(more precisely, the \refclass{common/basetype}{BaseTypeChecker}) |
128 | 128 | enforces the standard subtyping rules. |
129 | 129 | The Subtyping Checker is a simple use of the Base Checker that supports |
130 | 130 | providing type qualifiers on the command line. |
|
951 | 951 |
|
952 | 952 | A checker's entry point is a subclass of |
953 | 953 | \refclass{framework/source}{SourceChecker}, and is usually a direct subclass |
954 | | -of either \refclass{framework/common/basetype}{BaseTypeChecker} or |
| 954 | +of either \refclass{common/basetype}{BaseTypeChecker} or |
955 | 955 | \refclass{framework/source}{AggregateChecker}. |
956 | 956 | This entry |
957 | 957 | point, which we call the checker class, serves two |
|
991 | 991 | a type system named Foo, the compiler |
992 | 992 | interface (checker), the visitor, and the annotated type factory are |
993 | 993 | named as \<FooChecker>, \<FooVisitor>, and \<FooAnnotatedTypeFactory>. |
994 | | -\refclass{framework/common/basetype}{BaseTypeChecker} uses the convention to |
| 994 | +\refclass{common/basetype}{BaseTypeChecker} uses the convention to |
995 | 995 | reflectively construct the components. Otherwise, the checker writer |
996 | 996 | must specify the component classes for construction. |
997 | 997 |
|
|
1101 | 1101 | MyChecker needs to use. |
1102 | 1102 |
|
1103 | 1103 | Override |
1104 | | -\<MyChecker.\refmethodterse{framework/common/basetype}{BaseTypeChecker}{getImmediateSubcheckerClasses}{()}> |
| 1104 | +\<MyChecker.\refmethodterse{framework/source}{SourceChecker}{getImmediateSubcheckerClasses}{()}> |
1105 | 1105 | to return a list of the checkers that MyChecker depends on. Every one of |
1106 | 1106 | them will be run before MyChecker is run. One of MyChecker's subcheckers |
1107 | 1107 | may itself be a compound checker, and multiple checkers may declare a |
|
1112 | 1112 | it) by querying their \refclass{framework/type}{AnnotatedTypeFactory} to |
1113 | 1113 | determine the types of variables. Obtain the \<AnnotatedTypeFactory> by |
1114 | 1114 | calling |
1115 | | -\refmethodterse{framework/common/basetype}{BaseTypeChecker}{getTypeFactoryOfSubcheckerOrNull}{(java.lang.Class)}. |
| 1115 | +\refmethodterse{common/basetype}{BaseTypeChecker}{getTypeFactoryOfSubcheckerOrNull}{(java.lang.Class)}. |
1116 | 1116 |
|
1117 | 1117 | An example of a compound checker is |
1118 | 1118 | \refclass{checker/signedness}{SignednessChecker} |
|
1181 | 1181 | \subsubsectionAndLabel{Default Options}{creating-providing-command-line-options-default-options} |
1182 | 1182 |
|
1183 | 1183 | The default options passed to a custom checker may be customized by overriding the |
1184 | | -\refmethodterse{framework/common/basetype}{BaseTypeChecker}{getOptions}{()} method in the |
| 1184 | +\refmethodterse{common/basetype}{BaseTypeChecker}{getOptions}{()} method in the |
1185 | 1185 | custom checker class. |
1186 | 1186 |
|
1187 | 1187 | For example, to ignore the \<introduce.eliminate> warnings raised by the |
1188 | 1188 | Optional Checker (Chapter~\ref{optional-checker}), override |
1189 | | -\refmethodterse{framework/common/basetype}{BaseTypeChecker}{getOptions}{()} as follows: |
| 1189 | +\refmethodterse{common/basetype}{BaseTypeChecker}{getOptions}{()} as follows: |
1190 | 1190 |
|
1191 | 1191 | \begin{Verbatim} |
1192 | 1192 | @Override |
|
0 commit comments