manual - The Checker Framework: Custom pluggable types for...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: The Checker Framework: Custom pluggable types for Java http://types.cs.washington.edu/checker-framework/ Version 1.2.5.1 (6 Feb 2012) For the impatient: Section 1.2 (page 10) describes how to install and use pluggable type-checkers. 2 Contents 1 Introduction 9 1.1 How it works: Pluggable types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.2 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.3 Example use: detecting a null pointer bug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2 Using a checker 12 2.1 Writing annotations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.1.1 Distributing your annotated project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.2 Running a checker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.2.1 Summary of command-line options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.2.2 Checker auto-discovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.3 What the checker guarantees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.4 Tips about writing annotations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.4.1 How to get started annotating legacy code . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.4.2 Do not annotate local variables unless necessary . . . . . . . . . . . . . . . . . . . . . . . . 16 2.4.3 Annotations indicate normal behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.4.4 Subclasses must respect superclass annotations . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.4.5 Annotations on constructor invocations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.4.6 When to use (and not use) type qualifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.4.7 What to do if a checker issues a warning about your code . . . . . . . . . . . . . . . . . . . . 18 3 Nullness checker 19 3.1 What the Nullness checker checks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 3.2 Nullness annotations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 3.2.1 Nullness qualifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 3.2.2 Nullness method annotations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 3.2.3 Rawness qualifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.2.4 Map key qualifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3.3 Writing nullness annotations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3.3.1 Implicit qualifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Implicit qualifiers ....
View Full Document

Page1 / 121

manual - The Checker Framework: Custom pluggable types for...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online