1<html><head>
2      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3   <title>&#31532;10&#31456; &#12450;&#12494;&#12486;&#12540;&#12471;&#12519;&#12531;</title><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="FindBugs&#8482; &#12510;&#12491;&#12517;&#12450;&#12523;"><link rel="up" href="index.html" title="FindBugs&#8482; &#12510;&#12491;&#12517;&#12450;&#12523;"><link rel="prev" href="analysisprops.html" title="&#31532;9&#31456; &#20998;&#26512;&#12503;&#12525;&#12497;&#12486;&#12451;&#12540;"><link rel="next" href="rejarForAnalysis.html" title="&#31532;11&#31456; rejarForAnalysis &#12398;&#20351;&#29992;&#26041;&#27861;"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">&#31532;10&#31456; &#12450;&#12494;&#12486;&#12540;&#12471;&#12519;&#12531;</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="analysisprops.html">&#25147;&#12427;</a>&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="rejarForAnalysis.html">&#27425;&#12408;</a></td></tr></table><hr></div><div class="chapter" title="&#31532;10&#31456; &#12450;&#12494;&#12486;&#12540;&#12471;&#12519;&#12531;"><div class="titlepage"><div><div><h2 class="title"><a name="annotations"></a>&#31532;10&#31456; &#12450;&#12494;&#12486;&#12540;&#12471;&#12519;&#12531;</h2></div></div></div><p><span class="application">FindBugs</span> &#12399;&#12356;&#12367;&#12388;&#12363;&#12398;&#12450;&#12494;&#12486;&#12540;&#12471;&#12519;&#12531;&#12434;&#12469;&#12509;&#12540;&#12488;&#12375;&#12390;&#12356;&#12414;&#12377;&#12290;&#38283;&#30330;&#32773;&#12398;&#24847;&#22259;&#12434;&#26126;&#30906;&#12395;&#12377;&#12427;&#12371;&#12392;&#12391;&#12289; FindBugs &#12399;&#12424;&#12426;&#30340;&#30906;&#12395;&#35686;&#21578;&#12434;&#30330;&#34892;&#12377;&#12427;&#12371;&#12392;&#12364;&#12391;&#12365;&#12414;&#12377;&#12290;&#12450;&#12494;&#12486;&#12540;&#12471;&#12519;&#12531;&#12434;&#20351;&#29992;&#12377;&#12427;&#12383;&#12417;&#12395;&#12399; Java 5 &#12364;&#24517;&#35201;&#12391;&#12354;&#12426;&#12289; annotations.jar &#12362;&#12424;&#12403; jsr305.jar &#12501;&#12449;&#12452;&#12523;&#12434;&#12467;&#12531;&#12497;&#12452;&#12523;&#26178;&#12398;&#12463;&#12521;&#12473;&#12497;&#12473;&#12395;&#21547;&#12417;&#12427;&#24517;&#35201;&#12364;&#12354;&#12426;&#12414;&#12377;&#12290;</p><div class="variablelist"><dl><dt><span class="term"><span class="command"><strong>edu.umd.cs.findbugs.annotations.CheckForNull</strong></span></span></dt><dd><span class="command"><strong>[Target]</strong></span> Field, Method, Parameter
4    <p>&#12450;&#12494;&#12486;&#12540;&#12471;&#12519;&#12531;&#12434;&#12388;&#12369;&#12383;&#35201;&#32032;&#12399;&#12289; null &#12391;&#12354;&#12427;&#21487;&#33021;&#24615;&#12364;&#12354;&#12426;&#12414;&#12377;&#12290;&#12375;&#12383;&#12364;&#12387;&#12390;&#12289;&#24403;&#35442;&#35201;&#32032;&#12434;&#20351;&#29992;&#12377;&#12427;&#38555;&#12399; null &#12481;&#12455;&#12483;&#12463;&#12434;&#12377;&#12427;&#12409;&#12365;&#12391;&#12377;&#12290;&#12371;&#12398;&#12450;&#12494;&#12486;&#12540;&#12471;&#12519;&#12531;&#12434;&#12513;&#12477;&#12483;&#12489;&#12395;&#36969;&#29992;&#12377;&#12427;&#12392;&#12289;&#12513;&#12477;&#12483;&#12489;&#12398;&#25147;&#12426;&#20516;&#12395;&#36969;&#29992;&#12373;&#12428;&#12414;&#12377;&#12290;</p></dd><dt><span class="term"><span class="command"><strong>edu.umd.cs.findbugs.annotations.CheckReturnValue</strong></span></span></dt><dd><span class="command"><strong>[Target]</strong></span> Method, Constructor
5    <div class="variablelist"><dl><dt><span class="term"><span class="command"><strong>[Parameter]</strong></span></span></dt><dd><p>
6              <span class="command"><strong>priority:</strong></span> &#35686;&#21578;&#12398;&#20778;&#20808;&#24230;&#12434;&#25351;&#23450;&#12375;&#12414;&#12377; (HIGH, MEDIUM, LOW, IGNORE) &#12290;&#12487;&#12501;&#12457;&#12523;&#12488;&#20516; :MEDIUM&#12290;</p><p>
7              <span class="command"><strong>explanation:</strong></span>&#25147;&#12426;&#20516;&#12434;&#12481;&#12455;&#12483;&#12463;&#12375;&#12394;&#12369;&#12400;&#12394;&#12425;&#12394;&#12356;&#29702;&#30001;&#12434;&#12486;&#12461;&#12473;&#12488;&#12391;&#35500;&#26126;&#12375;&#12414;&#12377;&#12290;&#12487;&#12501;&#12457;&#12523;&#12488;&#20516; :""&#12290;</p></dd></dl></div><p>&#12371;&#12398;&#12450;&#12494;&#12486;&#12540;&#12471;&#12519;&#12531;&#12434;&#20351;&#29992;&#12375;&#12390;&#12289;&#21628;&#20986;&#12375;&#24460;&#12395;&#25147;&#12426;&#20516;&#12434;&#12481;&#12455;&#12483;&#12463;&#12377;&#12409;&#12365;&#12513;&#12477;&#12483;&#12489;&#12434;&#34920;&#12377;&#12371;&#12392;&#12364;&#12391;&#12365;&#12414;&#12377;&#12290;</p></dd><dt><span class="term"><span class="command"><strong>edu.umd.cs.findbugs.annotations.DefaultAnnotation</strong></span></span></dt><dd><span class="command"><strong>[Target]</strong></span> Type, Package
8    <div class="variablelist"><dl><dt><span class="term"><span class="command"><strong>[Parameter]</strong></span></span></dt><dd><p>
9              <span class="command"><strong>value:</strong></span>&#12450;&#12494;&#12486;&#12540;&#12471;&#12519;&#12531;&#12463;&#12521;&#12473;&#12398;class&#12458;&#12502;&#12472;&#12455;&#12463;&#12488;&#12290;&#35079;&#25968;&#12398;&#12463;&#12521;&#12473;&#12434;&#25351;&#23450;&#12377;&#12427;&#12371;&#12392;&#12364;&#12391;&#12365;&#12414;&#12377;&#12290;</p><p>
10              <span class="command"><strong>priority:</strong></span>&#30465;&#30053;&#26178;&#12398;&#20778;&#20808;&#24230;&#12434;&#25351;&#23450;&#12375;&#12414;&#12377; (HIGH, MEDIUM, LOW, IGNORE) &#12290;&#12487;&#12501;&#12457;&#12523;&#12488;&#20516; :MEDIUM&#12290;</p></dd></dl></div><p>
11Indicates that all members of the class or package should be annotated with the default
12value of the supplied annotation classes. This would be used for behavior annotations
13such as @NonNull, @CheckForNull, or @CheckReturnValue. In particular, you can use
14@DefaultAnnotation(NonNull.class) on a class or package, and then use @Nullable only
15on those parameters, methods or fields that you want to allow to be null.
16      </p></dd><dt><span class="term"><span class="command"><strong>edu.umd.cs.findbugs.annotations.DefaultAnnotationForFields</strong></span></span></dt><dd><span class="command"><strong>[Target]</strong></span> Type, Package
17    <div class="variablelist"><dl><dt><span class="term"><span class="command"><strong>[Parameter]</strong></span></span></dt><dd><p>
18              <span class="command"><strong>value:</strong></span>&#12450;&#12494;&#12486;&#12540;&#12471;&#12519;&#12531;&#12463;&#12521;&#12473;&#12398;class&#12458;&#12502;&#12472;&#12455;&#12463;&#12488;&#12290;&#35079;&#25968;&#12398;&#12463;&#12521;&#12473;&#12434;&#25351;&#23450;&#12377;&#12427;&#12371;&#12392;&#12364;&#12391;&#12365;&#12414;&#12377;&#12290;</p><p>
19              <span class="command"><strong>priority:</strong></span>&#30465;&#30053;&#26178;&#12398;&#20778;&#20808;&#24230;&#12434;&#25351;&#23450;&#12375;&#12414;&#12377; (HIGH, MEDIUM, LOW, IGNORE) &#12290;&#12487;&#12501;&#12457;&#12523;&#12488;&#20516; :MEDIUM&#12290;</p></dd></dl></div><p>
20This is same as the DefaultAnnotation except it only applys to fields.
21      </p></dd><dt><span class="term"><span class="command"><strong>edu.umd.cs.findbugs.annotations.DefaultAnnotationForMethods</strong></span></span></dt><dd><span class="command"><strong>[Target]</strong></span> Type, Package
22    <div class="variablelist"><dl><dt><span class="term"><span class="command"><strong>[Parameter]</strong></span></span></dt><dd><p>
23              <span class="command"><strong>value:</strong></span>&#12450;&#12494;&#12486;&#12540;&#12471;&#12519;&#12531;&#12463;&#12521;&#12473;&#12398;class&#12458;&#12502;&#12472;&#12455;&#12463;&#12488;&#12290;&#35079;&#25968;&#12398;&#12463;&#12521;&#12473;&#12434;&#25351;&#23450;&#12377;&#12427;&#12371;&#12392;&#12364;&#12391;&#12365;&#12414;&#12377;&#12290;</p><p>
24              <span class="command"><strong>priority:</strong></span>&#30465;&#30053;&#26178;&#12398;&#20778;&#20808;&#24230;&#12434;&#25351;&#23450;&#12375;&#12414;&#12377; (HIGH, MEDIUM, LOW, IGNORE) &#12290;&#12487;&#12501;&#12457;&#12523;&#12488;&#20516; :MEDIUM&#12290;</p></dd></dl></div><p>
25This is same as the DefaultAnnotation except it only applys to methods.
26      </p></dd><dt><span class="term"><span class="command"><strong>edu.umd.cs.findbugs.annotations.DefaultAnnotationForParameters</strong></span></span></dt><dd><span class="command"><strong>[Target]</strong></span> Type, Package
27    <div class="variablelist"><dl><dt><span class="term"><span class="command"><strong>[Parameter]</strong></span></span></dt><dd><p>
28              <span class="command"><strong>value:</strong></span>&#12450;&#12494;&#12486;&#12540;&#12471;&#12519;&#12531;&#12463;&#12521;&#12473;&#12398;class&#12458;&#12502;&#12472;&#12455;&#12463;&#12488;&#12290;&#35079;&#25968;&#12398;&#12463;&#12521;&#12473;&#12434;&#25351;&#23450;&#12377;&#12427;&#12371;&#12392;&#12364;&#12391;&#12365;&#12414;&#12377;&#12290;</p><p>
29              <span class="command"><strong>priority:</strong></span>&#30465;&#30053;&#26178;&#12398;&#20778;&#20808;&#24230;&#12434;&#25351;&#23450;&#12375;&#12414;&#12377; (HIGH, MEDIUM, LOW, IGNORE) &#12290;&#12487;&#12501;&#12457;&#12523;&#12488;&#20516; :MEDIUM&#12290;</p></dd></dl></div><p>
30This is same as the DefaultAnnotation except it only applys to method parameters.
31      </p></dd><dt><span class="term"><span class="command"><strong>edu.umd.cs.findbugs.annotations.NonNull</strong></span></span></dt><dd><span class="command"><strong>[Target]</strong></span> Field, Method, Parameter
32    <p>&#12450;&#12494;&#12486;&#12540;&#12471;&#12519;&#12531;&#12434;&#12388;&#12369;&#12383;&#35201;&#32032;&#12399;&#12289; null &#12391;&#12354;&#12387;&#12390;&#12399;&#12356;&#12369;&#12414;&#12379;&#12435;&#12290;&#12450;&#12494;&#12486;&#12540;&#12471;&#12519;&#12531;&#12434;&#12388;&#12369;&#12383;&#12501;&#12451;&#12540;&#12523;&#12489;&#12399;&#12289;&#27083;&#31689;&#23436;&#20102;&#24460; null &#12391;&#12354;&#12387;&#12390;&#12399;&#12356;&#12369;&#12414;&#12379;&#12435;&#12290;&#12450;&#12494;&#12486;&#12540;&#12471;&#12519;&#12531;&#12434;&#12388;&#12369;&#12383;&#12513;&#12477;&#12483;&#12489;&#12399;&#12289; null &#12391;&#12399;&#12394;&#12356;&#20516;&#12434;&#25147;&#12426;&#20516;&#12392;&#12375;&#12394;&#12369;&#12428;&#12400;&#12394;&#12426;&#12414;&#12379;&#12435;&#12290;</p></dd><dt><span class="term"><span class="command"><strong>edu.umd.cs.findbugs.annotations.Nullable</strong></span></span></dt><dd><span class="command"><strong>[Target]</strong></span> Field, Method, Parameter
33    <p>&#12450;&#12494;&#12486;&#12540;&#12471;&#12519;&#12531;&#12434;&#12388;&#12369;&#12383;&#35201;&#32032;&#12399;&#12289; null &#12391;&#12354;&#12387;&#12390;&#12399;&#12356;&#12369;&#12414;&#12379;&#12435;&#12290;In general, this means developers will have to read the documentation to determine when a null value is acceptable and whether it is neccessary to check for a null value. FindBugs will treat the annotated items as though they had no annotation.</p><p>
34In pratice this annotation is useful only for overriding an overarching NonNull
35annotation.
36      </p></dd><dt><span class="term"><span class="command"><strong>edu.umd.cs.findbugs.annotations.OverrideMustInvoke</strong></span></span></dt><dd><span class="command"><strong>[Target]</strong></span> Method
37    <div class="variablelist"><dl><dt><span class="term"><span class="command"><strong>[Parameter]</strong></span></span></dt><dd><p>
38              <span class="command"><strong>value:</strong></span>Specify when the super invocation should be
39              performed (FIRST, ANYTIME, LAST). Default value:ANYTIME.
40            </p></dd></dl></div><p>
41Used to annotate a method that, if overridden, must (or should) be invoke super
42in the overriding method. Examples of such methods include finalize() and clone().
43The argument to the method indicates when the super invocation should occur:
44at any time, at the beginning of the overriding method, or at the end of the overriding method.
45(This anotation is not implmemented in FindBugs as of September 8, 2006).
46      </p></dd><dt><span class="term"><span class="command"><strong>edu.umd.cs.findbugs.annotations.PossiblyNull</strong></span></span></dt><dd><p>
47This annotation is deprecated. Use CheckForNull instead.
48      </p></dd><dt><span class="term"><span class="command"><strong>edu.umd.cs.findbugs.annotations.SuppressWarnings</strong></span></span></dt><dd><span class="command"><strong>[Target]</strong></span> Type, Field, Method, Parameter, Constructor, Package
49    <div class="variablelist"><dl><dt><span class="term"><span class="command"><strong>[Parameter]</strong></span></span></dt><dd><p>
50              <span class="command"><strong>value:</strong></span>The name of the warning. More than one name can be specified.
51            </p><p>
52              <span class="command"><strong>justification:</strong></span>Reason why the warning should be ignored. &#12487;&#12501;&#12457;&#12523;&#12488;&#20516; :""&#12290;</p></dd></dl></div><p>
53The set of warnings that are to be suppressed by the compiler in the annotated element.
54Duplicate names are permitted.  The second and successive occurrences of a name are ignored.
55The presence of unrecognized warning names is <span class="emphasis"><em>not</em></span> an error: Compilers
56must ignore any warning names they do not recognize. They are, however, free to emit a
57warning if an annotation contains an unrecognized warning name. Compiler vendors should
58document the warning names they support in conjunction with this annotation type. They
59are encouraged to cooperate to ensure that the same names work across multiple compilers.
60      </p></dd><dt><span class="term"><span class="command"><strong>edu.umd.cs.findbugs.annotations.UnknownNullness</strong></span></span></dt><dd><span class="command"><strong>[Target]</strong></span> Field, Method, Parameter
61    <p>
62Used to indicate that the nullness of the target is unknown, or my vary in unknown ways in subclasses.
63      </p></dd><dt><span class="term"><span class="command"><strong>edu.umd.cs.findbugs.annotations.UnknownNullness</strong></span></span></dt><dd><span class="command"><strong>[Target]</strong></span> Field, Method, Parameter
64    <p>
65Used to indicate that the nullness of the target is unknown, or my vary in unknown ways in subclasses.
66      </p></dd></dl></div><p>&#12414;&#12383;&#12289; <span class="application">FindBugs</span> &#27425;&#12395;&#31034;&#12377;&#12450;&#12494;&#12486;&#12540;&#12471;&#12519;&#12531;&#12418;&#12469;&#12509;&#12540;&#12488;&#12375;&#12390;&#12356;&#12414;&#12377;&#12290; :</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">net.jcip.annotations.GuardedBy</li><li class="listitem">net.jcip.annotations.Immutable</li><li class="listitem">net.jcip.annotations.NotThreadSafe</li><li class="listitem">net.jcip.annotations.ThreadSafe</li></ul></div><p>
67</p><p><a class="ulink" href="http://jcip.net/" target="_top">Java Concurrency in Practice</a> &#12398; <a class="ulink" href="http://jcip.net/annotations/doc/index.html" target="_top"> API &#12489;&#12461;&#12517;&#12513;&#12531;&#12488;</a> &#12434;&#21442;&#29031;&#12375;&#12390;&#12367;&#12384;&#12373;&#12356;&#12290;</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="analysisprops.html">&#25147;&#12427;</a>&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;<a accesskey="n" href="rejarForAnalysis.html">&#27425;&#12408;</a></td></tr><tr><td width="40%" align="left" valign="top">&#31532;9&#31456; &#20998;&#26512;&#12503;&#12525;&#12497;&#12486;&#12451;&#12540;&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">&#12507;&#12540;&#12512;</a></td><td width="40%" align="right" valign="top">&nbsp;&#31532;11&#31456; rejarForAnalysis &#12398;&#20351;&#29992;&#26041;&#27861;</td></tr></table></div></body></html>