Debian Codegraph @

docs/apidocs/org/jboss/logging/annotations/Producer.html

raw symbols SCIP
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <!-- NewPage -->
3 <html lang="en">
4 <head>
5 <!-- Generated by javadoc -->
6 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
7 <title>Producer (JBoss Logging I18n Documentation 2.2.1.Final API)</title>
8 <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
9 <script type="text/javascript" src="../../../../script.js"></script>
10 </head>
11 <body>
12 <script type="text/javascript"><!--
13 try {
14 if (location.href.indexOf('is-external=true') == -1) {
15 parent.document.title="Producer (JBoss Logging I18n Documentation 2.2.1.Final API)";
16 }
17 }
18 catch(err) {
19 }
20 //-->
21 </script>
22 <noscript>
23 <div>JavaScript is disabled on your browser.</div>
24 </noscript>
25 <!-- ========= START OF TOP NAVBAR ======= -->
26 <div class="topNav"><a name="navbar.top">
27 <!-- -->
28 </a>
29 <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
30 <a name="navbar.top.firstrow">
31 <!-- -->
32 </a>
33 <ul class="navList" title="Navigation">
34 <li><a href="../../../../org/jboss/logging/annotations/package-summary.html">Package</a></li>
35 <li class="navBarCell1Rev">Class</li>
36 <li><a href="class-use/Producer.html">Use</a></li>
37 <li><a href="package-tree.html">Tree</a></li>
38 <li><a href="../../../../deprecated-list.html">Deprecated</a></li>
39 <li><a href="../../../../index-all.html">Index</a></li>
40 <li><a href="../../../../help-doc.html">Help</a></li>
41 </ul>
42 <div class="aboutLanguage">JBoss Logging Tools, 2.2.1.Final</div>
43 </div>
44 <div class="subNav">
45 <ul class="navList">
46 <li><a href="../../../../org/jboss/logging/annotations/Pos.html" title="annotation in org.jboss.logging.annotations"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
47 <li><a href="../../../../org/jboss/logging/annotations/Properties.html" title="annotation in org.jboss.logging.annotations"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
48 </ul>
49 <ul class="navList">
50 <li><a href="../../../../index.html?org/jboss/logging/annotations/Producer.html" target="_top">Frames</a></li>
51 <li><a href="Producer.html" target="_top">No&nbsp;Frames</a></li>
52 </ul>
53 <ul class="navList" id="allclasses_navbar_top">
54 <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
55 </ul>
56 <div>
57 <script type="text/javascript"><!--
58 allClassesLink = document.getElementById("allclasses_navbar_top");
59 if(window==top) {
60 allClassesLink.style.display = "block";
61 }
62 else {
63 allClassesLink.style.display = "none";
64 }
65 //-->
66 </script>
67 </div>
68 <div>
69 <ul class="subNavList">
70 <li>Summary:&nbsp;</li>
71 <li>Field&nbsp;|&nbsp;</li>
72 <li>Required&nbsp;|&nbsp;</li>
73 <li>Optional</li>
74 </ul>
75 <ul class="subNavList">
76 <li>Detail:&nbsp;</li>
77 <li>Field&nbsp;|&nbsp;</li>
78 <li>Element</li>
79 </ul>
80 </div>
81 <a name="skip.navbar.top">
82 <!-- -->
83 </a></div>
84 <!-- ========= END OF TOP NAVBAR ========= -->
85 <!-- ======== START OF CLASS DATA ======== -->
86 <div class="header">
87 <div class="subTitle">org.jboss.logging.annotations</div>
88 <h2 title="Annotation Type Producer" class="title">Annotation Type Producer</h2>
89 </div>
90 <div class="contentContainer">
91 <div class="description">
92 <ul class="blockList">
93 <li class="blockList">
94 <hr>
95 <br>
96 <pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Target.html?is-external=true" title="class or interface in java.lang.annotation">@Target</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Target.html?is-external=true#value--" title="class or interface in java.lang.annotation">value</a>=<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/ElementType.html?is-external=true#PARAMETER" title="class or interface in java.lang.annotation">PARAMETER</a>)
97 <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Retention.html?is-external=true" title="class or interface in java.lang.annotation">@Retention</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Retention.html?is-external=true#value--" title="class or interface in java.lang.annotation">value</a>=<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/RetentionPolicy.html?is-external=true#CLASS" title="class or interface in java.lang.annotation">CLASS</a>)
98 <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Documented.html?is-external=true" title="class or interface in java.lang.annotation">@Documented</a>
99 public @interface <span class="memberNameLabel">Producer</span></pre>
100 <div class="block">Identifies a parameter has the ability to produce a <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang"><code>Throwable</code></a> or a super type of a <code>Throwable</code>. The
101 parameter type must be a <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Function.html?is-external=true" title="class or interface in java.util.function"><code>Function</code></a> or a <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/BiFunction.html?is-external=true" title="class or interface in java.util.function"><code>BiFunction</code></a>.
102 <p>
103 For a <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Function.html?is-external=true" title="class or interface in java.util.function"><code>Function</code></a> the input parameter must be a <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang"><code>String</code></a> which will be the message
104 associated with the method. The result type must <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang"><code>Throwable</code></a> or a super type of a <code>Throwable</code>.
105 </p>
106
107 <p>
108 For a <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/BiFunction.html?is-external=true" title="class or interface in java.util.function"><code>BiFunction</code></a> one of the input parameters must be a <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang"><code>String</code></a> which will be the
109 message associated with the method. The other input parameter must be a <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang"><code>Throwable</code></a> or a super type of a
110 <code>Throwable</code> and must be assignable from the parameter annotated with <a href="../../../../org/jboss/logging/annotations/Cause.html" title="annotation in org.jboss.logging.annotations"><code>Cause</code></a>. The result type must
111 <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang"><code>Throwable</code></a> or a super type of a <code>Throwable</code>.
112 </p>
113
114 <p>
115 <strong>Example</strong>
116 <code>
117 <pre>
118 &#64;Message(&quot;The operation failed due to %s&quot;)
119 <T extends RuntimeException> T operationFailed(@Producer Function<String, T> function, String op);
120
121 &#64;Message(&quot;The operation failed due to %s&quot;)
122 <T extends RuntimeException> T operationFailed(@Producer BiFunction<String, Throwable, T> function, @Cause Throwable cause, String op);
123
124 </pre>
125 </code>
126 </p>
127
128 <p>
129 <strong>Example Usage</strong>
130 <code>
131 <pre>
132 throw Bundle.MESSAGES.operationFailed(IllegalArgumentException::new, &quot;start&quot;);
133
134 throw Bundle.MESSAGES.operationFailed(IllegalStateException::new, cause, &quot;start&quot;);
135
136 </pre>
137 </code>
138 </p></div>
139 <dl>
140 <dt><span class="simpleTagLabel">Author:</span></dt>
141 <dd><a href="mailto:[email protected]">James R. Perkins</a></dd>
142 </dl>
143 </li>
144 </ul>
145 </div>
146 </div>
147 <!-- ========= END OF CLASS DATA ========= -->
148 <!-- ======= START OF BOTTOM NAVBAR ====== -->
149 <div class="bottomNav"><a name="navbar.bottom">
150 <!-- -->
151 </a>
152 <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
153 <a name="navbar.bottom.firstrow">
154 <!-- -->
155 </a>
156 <ul class="navList" title="Navigation">
157 <li><a href="../../../../org/jboss/logging/annotations/package-summary.html">Package</a></li>
158 <li class="navBarCell1Rev">Class</li>
159 <li><a href="class-use/Producer.html">Use</a></li>
160 <li><a href="package-tree.html">Tree</a></li>
161 <li><a href="../../../../deprecated-list.html">Deprecated</a></li>
162 <li><a href="../../../../index-all.html">Index</a></li>
163 <li><a href="../../../../help-doc.html">Help</a></li>
164 </ul>
165 <div class="aboutLanguage">JBoss Logging Tools, 2.2.1.Final</div>
166 </div>
167 <div class="subNav">
168 <ul class="navList">
169 <li><a href="../../../../org/jboss/logging/annotations/Pos.html" title="annotation in org.jboss.logging.annotations"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
170 <li><a href="../../../../org/jboss/logging/annotations/Properties.html" title="annotation in org.jboss.logging.annotations"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
171 </ul>
172 <ul class="navList">
173 <li><a href="../../../../index.html?org/jboss/logging/annotations/Producer.html" target="_top">Frames</a></li>
174 <li><a href="Producer.html" target="_top">No&nbsp;Frames</a></li>
175 </ul>
176 <ul class="navList" id="allclasses_navbar_bottom">
177 <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
178 </ul>
179 <div>
180 <script type="text/javascript"><!--
181 allClassesLink = document.getElementById("allclasses_navbar_bottom");
182 if(window==top) {
183 allClassesLink.style.display = "block";
184 }
185 else {
186 allClassesLink.style.display = "none";
187 }
188 //-->
189 </script>
190 </div>
191 <div>
192 <ul class="subNavList">
193 <li>Summary:&nbsp;</li>
194 <li>Field&nbsp;|&nbsp;</li>
195 <li>Required&nbsp;|&nbsp;</li>
196 <li>Optional</li>
197 </ul>
198 <ul class="subNavList">
199 <li>Detail:&nbsp;</li>
200 <li>Field&nbsp;|&nbsp;</li>
201 <li>Element</li>
202 </ul>
203 </div>
204 <a name="skip.navbar.bottom">
205 <!-- -->
206 </a></div>
207 <!-- ======== END OF BOTTOM NAVBAR ======= -->
208 <p class="legalCopy"><small>Copyright &#169; 2019 <a href="http://www.jboss.org">JBoss by Red Hat</a>. All rights reserved.</small></p>
209 </body>
210 </html>