⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 annotations.html

📁 JSP页面代码排错
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<html><head>      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">   <title>&#31532;10&#31456; &#12450;&#12494;&#12486;&#12540;&#12471;&#12519;&#12531;</title><meta name="generator" content="DocBook XSL Stylesheets V1.71.1"><link rel="start" 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">&#21069;&#12398;&#12506;&#12540;&#12472;</a>&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="rejarForAnalysis.html">&#27425;&#12398;&#12506;&#12540;&#12472;</a></td></tr></table><hr></div><div class="chapter" lang="ja"><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><strong class="command">edu.umd.cs.findbugs.annotations.CheckForNull</strong></span></span></dt><dd><span><strong class="command">[Target]</strong></span> Field, Method, Parameter    <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><strong class="command">edu.umd.cs.findbugs.annotations.CheckReturnValue</strong></span></span></dt><dd><span><strong class="command">[Target]</strong></span> Method, Constructor    <div class="variablelist"><dl><dt><span class="term"><span><strong class="command">[Parameter]</strong></span></span></dt><dd><p>              <span><strong class="command">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>              <span><strong class="command">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><strong class="command">edu.umd.cs.findbugs.annotations.DefaultAnnotation</strong></span></span></dt><dd><span><strong class="command">[Target]</strong></span> Type, Package    <div class="variablelist"><dl><dt><span class="term"><span><strong class="command">[Parameter]</strong></span></span></dt><dd><p>              <span><strong class="command">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>              <span><strong class="command">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>Indicates that all members of the class or package should be annotated with the defaultvalue of the supplied annotation classes. This would be used for behavior annotationssuch as @NonNull, @CheckForNull, or @CheckReturnValue. In particular, you can use@DefaultAnnotation(NonNull.class) on a class or package, and then use @Nullable onlyon those parameters, methods or fields that you want to allow to be null.      </p></dd><dt><span class="term"><span><strong class="command">edu.umd.cs.findbugs.annotations.DefaultAnnotationForFields</strong></span></span></dt><dd><span><strong class="command">[Target]</strong></span> Type, Package    <div class="variablelist"><dl><dt><span class="term"><span><strong class="command">[Parameter]</strong></span></span></dt><dd><p>              <span><strong class="command">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>              <span><strong class="command">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>This is same as the DefaultAnnotation except it only applys to fields.      </p></dd><dt><span class="term"><span><strong class="command">edu.umd.cs.findbugs.annotations.DefaultAnnotationForMethods</strong></span></span></dt><dd><span><strong class="command">[Target]</strong></span> Type, Package    <div class="variablelist"><dl><dt><span class="term"><span><strong class="command">[Parameter]</strong></span></span></dt><dd><p>              <span><strong class="command">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>              <span><strong class="command">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>This is same as the DefaultAnnotation except it only applys to methods.      </p></dd><dt><span class="term"><span><strong class="command">edu.umd.cs.findbugs.annotations.DefaultAnnotationForParameters</strong></span></span></dt><dd><span><strong class="command">[Target]</strong></span> Type, Package    <div class="variablelist"><dl><dt><span class="term"><span><strong class="command">[Parameter]</strong></span></span></dt><dd><p>              <span><strong class="command">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>              <span><strong class="command">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>This is same as the DefaultAnnotation except it only applys to method parameters.      </p></dd><dt><span class="term"><span><strong class="command">edu.umd.cs.findbugs.annotations.NonNull</strong></span></span></dt><dd><span><strong class="command">[Target]</strong></span> Field, Method, Parameter    <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><strong class="command">edu.umd.cs.findbugs.annotations.Nullable</strong></span></span></dt><dd><span><strong class="command">[Target]</strong></span> Field, Method, Parameter    <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>In pratice this annotation is useful only for overriding an overarching NonNull

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -