|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectAnnotateNullable
public class AnnotateNullable
AnnotateNullable reads a Daikon invariant file and determines which reference variables have seen any null values. It writes to standard out an annotation file with those variables. It determines which variables have seen null values by looking at the NonZero invariant. If that invariant is NOT present, then the variable must have been null at least once.
Since only the NonZero invariant is used, Daikon processing time can be significantly reduced by turning off derived variables and all invariants other than daikon.inv.unary.scalar.NonZero. This is not necessary, however, for correct operation.
| Field Summary | |
|---|---|
static boolean |
nonnull_annotations
Adds NonNull annotations as well as Nullable annotations. |
static boolean |
stub_format
Write an output file in the stub class format (see the Checker Framework Manual), instead of in annotation file format. |
| Constructor Summary | |
|---|---|
AnnotateNullable()
|
|
| Method Summary | |
|---|---|
static String |
field_name(VarInfo vi)
Returns the field name of the specified variable. |
static String |
get_annotation(PptTopLevel ppt,
VarInfo vi)
Get the annotation for the specified variable. |
static boolean |
is_static_method(PptTopLevel ppt)
Returns whether or not the method of the specified ppt is static or not. |
static String |
jvm_signature(PptTopLevel ppt)
Returns a JVM signature for the method. |
static void |
main(String[] args)
|
static void |
process_class(PptTopLevel object_ppt)
|
static void |
process_method(PptTopLevel ppt)
Print out the annotations for the specified method. |
static void |
process_obj_fields(PptTopLevel ppt)
Print out the annotations for each field in the object or class. |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static boolean stub_format
public static boolean nonnull_annotations
| Constructor Detail |
|---|
public AnnotateNullable()
| Method Detail |
|---|
public static void main(String[] args)
throws IOException
IOExceptionpublic static void process_class(PptTopLevel object_ppt)
public static String get_annotation(PptTopLevel ppt,
VarInfo vi)
public static void process_method(PptTopLevel ppt)
public static void process_obj_fields(PptTopLevel ppt)
public static String jvm_signature(PptTopLevel ppt)
public static String field_name(VarInfo vi)
public static boolean is_static_method(PptTopLevel ppt)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||