/
annotationprocessor.pot
559 lines (477 loc) · 18 KB
/
annotationprocessor.pot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
# SOME DESCRIPTIVE TITLE.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2011-11-14 10:37+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <kde-i18n-doc@kde.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#. Tag: title
#: annotationprocessor.xml:24
#, no-c-format
msgid "Annotation Processor"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:26
#, no-c-format
msgid "Have you ever caught yourself by unintentionally doing things like"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:31
#, no-c-format
msgid "specifying constraint annotations at unsupported data types (e.g. by annotating a String with @Past)"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:36
#, no-c-format
msgid "annotating the setter of a JavaBean property (instead of the getter method)"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:41
#, no-c-format
msgid "annotating static fields/methods with constraint annotations (which is not supported)?"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:46
#, no-c-format
msgid "Then the Hibernate Validator Annotation Processor is the right thing for you. It helps preventing such mistakes by plugging into the build process and raising compilation errors whenever constraint annotations are incorrectly used."
msgstr ""
#. Tag: para
#: annotationprocessor.xml:52
#, no-c-format
msgid "You can find the Hibernate Validator Annotation Processor as part of the distribution bundle on <ulink url=\"http://sourceforge.net/projects/hibernate/files/hibernate-validator\">Sourceforge</ulink> or in the JBoss Maven Repository (see <xref linkend=\"example-jboss-maven-url\"/>) under the GAV org.hibernate:hibernate-validator-annotation-processor."
msgstr ""
#. Tag: title
#: annotationprocessor.xml:61
#, no-c-format
msgid "Prerequisites"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:63
#, no-c-format
msgid "The Hibernate Validator Annotation Processor is based on the \"Pluggable Annotation Processing API\" as defined by <ulink url=\"http://jcp.org/en/jsr/detail?id=269\">JSR 269</ulink>. This API is part of the Java Platform since Java 6. So be sure to use this or a later version."
msgstr ""
#. Tag: title
#: annotationprocessor.xml:71
#, no-c-format
msgid "Features"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:73
#, no-c-format
msgid "As of Hibernate Validator &version; the Hibernate Validator Annotation Processor checks that:"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:78
#, no-c-format
msgid "constraint annotations are allowed for the type of the annotated element"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:83
#, no-c-format
msgid "only non-static fields or methods are annotated with constraint annotations"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:88
#, no-c-format
msgid "only non-primitive fields or methods are annotated with @Valid"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:93
#, no-c-format
msgid "only such methods are annotated with constraint annotations which are valid JavaBeans getter methods (optionally, see below)"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:99
#, no-c-format
msgid "only such annotation types are annotated with constraint annotations which are constraint annotations themselves"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:104
#, no-c-format
msgid "definition of dynamic default group sequence with @GroupSequenceProvider is valid"
msgstr ""
#. Tag: title
#: annotationprocessor.xml:111
#, no-c-format
msgid "Options"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:113
#, no-c-format
msgid "The behavior of the Hibernate Validator Annotation Processor can be controlled using the <ulink url=\"http://java.sun.com/javase/6/docs/technotes/tools/windows/javac.html#options\">processor options</ulink> listed in table<xref linkend=\"table_processor_options\"/>:"
msgstr ""
#. Tag: title
#: annotationprocessor.xml:120
#, no-c-format
msgid "Hibernate Validator Annotation Processor options"
msgstr ""
#. Tag: entry
#: annotationprocessor.xml:125
#, no-c-format
msgid "Option"
msgstr ""
#. Tag: entry
#: annotationprocessor.xml:127
#, no-c-format
msgid "Explanation"
msgstr ""
#. Tag: varname
#: annotationprocessor.xml:133
#, no-c-format
msgid "diagnosticKind"
msgstr ""
#. Tag: entry
#: annotationprocessor.xml:135
#, no-c-format
msgid "Controls how constraint problems are reported. Must be the string representation of one of the values from the enum <classname>javax.tools.Diagnostic.Kind</classname>, e.g. <classname>WARNING</classname>. A value of <classname>ERROR</classname> will cause compilation to halt whenever the AP detects a constraint problem. Defaults to <classname>ERROR</classname>."
msgstr ""
#. Tag: varname
#: annotationprocessor.xml:145
#, no-c-format
msgid "methodConstraintsSupported"
msgstr ""
#. Tag: entry
#: annotationprocessor.xml:147
#, no-c-format
msgid "Controls whether constraints are allowed at methods of any kind. Must be set to <varname>true</varname> when working with method level constraints as supported by Hibernate Validator. Can be set to <varname>false</varname> to allow constraints only at JavaBeans getter methods as defined by the Bean Validation API. Defaults to <varname>true</varname>."
msgstr ""
#. Tag: varname
#: annotationprocessor.xml:156
#, no-c-format
msgid "verbose"
msgstr ""
#. Tag: entry
#: annotationprocessor.xml:158
#, no-c-format
msgid "Controls whether detailed processing information shall be displayed or not, useful for debugging purposes. Must be either <varname>true</varname> or <varname>false</varname>. Defaults to <varname>false</varname>."
msgstr ""
#. Tag: title
#: annotationprocessor.xml:169
#, no-c-format
msgid "Using the Annotation Processor"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:171
#, no-c-format
msgid "This section shows in detail how to integrate the Hibernate Validator Annotation Processor into command line builds (javac, Ant, Maven) as well as IDE-based builds (Eclipse, IntelliJ IDEA, NetBeans)."
msgstr ""
#. Tag: title
#: annotationprocessor.xml:177
#, no-c-format
msgid "Command line builds"
msgstr ""
#. Tag: title
#: annotationprocessor.xml:180
#, no-c-format
msgid "javac"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:182
#, no-c-format
msgid "When compiling on the command line using <ulink url=\"http://java.sun.com/javase/6/docs/technotes/guides/javac/index.html\">javac</ulink>, specify the following JARs using the \"processorpath\" option:"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:188 annotationprocessor.xml:303 annotationprocessor.xml:397
#, no-c-format
msgid "validation-api-&bvVersion;.jar"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:192 annotationprocessor.xml:307 annotationprocessor.xml:401
#, no-c-format
msgid "hibernate-validator-&version;.jar"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:196 annotationprocessor.xml:311 annotationprocessor.xml:405
#, no-c-format
msgid "hibernate-validator-annotation-processor-&version;.jar"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:200
#, no-c-format
msgid "The following listing shows an example. The processor will be detected automatically by the compiler and invoked during compilation."
msgstr ""
#. Tag: title
#: annotationprocessor.xml:205
#, no-c-format
msgid "Using the annotation processor with javac"
msgstr ""
#. Tag: programlisting
#: annotationprocessor.xml:207
#, no-c-format
msgid ""
"javac src/main/java/org/hibernate/validator/ap/demo/Car.java \\\n"
" -cp /path/to/validation-api-&bvVersion;.jar \\\n"
" -processorpath /path/to/validation-api-&bvVersion;.jar:/path/to/hibernate-validator-&version;:/path/to/hibernate-validator-annotation-processor-&version;.jar"
msgstr ""
#. Tag: title
#: annotationprocessor.xml:212
#, no-c-format
msgid "Apache Ant"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:214
#, no-c-format
msgid "Similar to directly working with javac, the annotation processor can be added as as compiler argument when invoking the <ulink url=\"http://ant.apache.org/manual/CoreTasks/javac.html\">javac task</ulink> for <ulink url=\"http://ant.apache.org/\">Apache Ant</ulink>:"
msgstr ""
#. Tag: title
#: annotationprocessor.xml:221
#, no-c-format
msgid "Using the annotation processor with Ant"
msgstr ""
#. Tag: programlisting
#: annotationprocessor.xml:223
#, no-c-format
msgid ""
"<javac srcdir=\"src/main\"\n"
" destdir=\"build/classes\"\n"
" classpath=\"/path/to/validation-api-&bvVersion;.jar\">\n"
" <compilerarg value=\"-processorpath\" />\n"
" <compilerarg value=\"/path/to/validation-api-&bvVersion;.jar:/path/to/hibernate-validator-&version;:/path/to/hibernate-validator-annotation-processor-&version;.jar\"/>\n"
"</javac>"
msgstr ""
#. Tag: title
#: annotationprocessor.xml:228
#, no-c-format
msgid "Maven"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:230
#, no-c-format
msgid "There are several options for integrating the annotation processor with <ulink url=\"http://maven.apache.org/\">Apache Maven</ulink>. Generally it is sufficient to add the Hibernate Validator Annotation Processor as dependency to your project:"
msgstr ""
#. Tag: title
#: annotationprocessor.xml:236
#, no-c-format
msgid "Adding the HV Annotation Processor as dependency"
msgstr ""
#. Tag: programlisting
#: annotationprocessor.xml:238
#, no-c-format
msgid ""
"...\n"
"<dependency>\n"
" <groupId>org.hibernate</groupId>\n"
" <artifactId>hibernate-validator-annotation-processor</artifactId>\n"
" <version>&version;</version>\n"
" <scope>compile</scope>\n"
"</dependency>\n"
"..."
msgstr ""
#. Tag: para
#: annotationprocessor.xml:241
#, no-c-format
msgid "The processor will then be executed automatically by the compiler. This basically works, but comes with the disadavantage that in some cases messages from the annotation processor are not displayed (see <ulink url=\"http://jira.codehaus.org/browse/MCOMPILER-66\">MCOMPILER-66</ulink>)."
msgstr ""
#. Tag: para
#: annotationprocessor.xml:247
#, no-c-format
msgid "Another option is using the <ulink url=\"http://code.google.com/p/maven-annotation-plugin/\">Maven Annotation Plugin</ulink>. At the time of this writing the plugin is not yet available in any of the well-known repositories. Therefore you have to add the project's own repository to your settings.xml or pom.xml:"
msgstr ""
#. Tag: title
#: annotationprocessor.xml:255
#, no-c-format
msgid "Adding the Maven Annotation Plugin repository"
msgstr ""
#. Tag: programlisting
#: annotationprocessor.xml:257
#, no-c-format
msgid ""
"...\n"
"<pluginRepositories>\n"
" <pluginRepository>\n"
" <id>maven-annotation-plugin-repo</id>\n"
" <url>http://maven-annotation-plugin.googlecode.com/svn/trunk/mavenrepo</url>\n"
" </pluginRepository>\n"
"</pluginRepositories>\n"
"..."
msgstr ""
#. Tag: para
#: annotationprocessor.xml:258
#, no-c-format
msgid "Now disable the standard annotation processing performed by the compiler plugin and configure the annotation plugin by specifying an execution and adding the Hibernate Validator Annotation Processor as plugin dependency (that way the AP is not visible on the project's actual classpath):"
msgstr ""
#. Tag: title
#: annotationprocessor.xml:265
#, no-c-format
msgid "Configuring the Maven Annotation Plugin"
msgstr ""
#. Tag: programlisting
#: annotationprocessor.xml:267
#, no-c-format
msgid ""
"...\n"
"<plugin>\n"
" <artifactId>maven-compiler-plugin</artifactId>\n"
" <configuration>\n"
" <source>1.6</source>\n"
" <target>1.6</target>\n"
" <compilerArgument>-proc:none</compilerArgument>\n"
" </configuration>\n"
"</plugin>\n"
"<plugin>\n"
" <groupId>org.bsc.maven</groupId>\n"
" <artifactId>maven-processor-plugin</artifactId>\n"
" <version>1.3.4</version>\n"
" <executions>\n"
" <execution>\n"
" <id>process</id>\n"
" <goals>\n"
" <goal>process</goal>\n"
" </goals>\n"
" <phase>process-sources</phase>\n"
" </execution>\n"
" </executions>\n"
" <dependencies>\n"
" <dependency>\n"
" <groupId>org.hibernate</groupId>\n"
" <artifactId>hibernate-validator-annotation-processor</artifactId>\n"
" <version>&version;</version>\n"
" <scope>compile</scope>\n"
" </dependency>\n"
" </dependencies>\n"
"</plugin>\n"
"..."
msgstr ""
#. Tag: title
#: annotationprocessor.xml:273
#, no-c-format
msgid "IDE builds"
msgstr ""
#. Tag: title
#: annotationprocessor.xml:276
#, no-c-format
msgid "Eclipse"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:278
#, no-c-format
msgid "Do the following to use the annotation processor within the <ulink url=\"http://www.eclipse.org/\">Eclipse</ulink> IDE:"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:283 annotationprocessor.xml:388
#, no-c-format
msgid "Right-click your project, choose \"Properties\""
msgstr ""
#. Tag: para
#: annotationprocessor.xml:287
#, no-c-format
msgid "Go to \"Java Compiler\" and make sure, that \"Compiler compliance level\" is set to \"1.6\". Otherwise the processor won't be activated"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:293
#, no-c-format
msgid "Go to \"Java Compiler - Annotation Processing\" and choose \"Enable annotation processing\""
msgstr ""
#. Tag: para
#: annotationprocessor.xml:298
#, no-c-format
msgid "Go to \"Java Compiler - Annotation Processing - Factory Path\" and add the following JARs:"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:317
#, no-c-format
msgid "Confirm the workspace rebuild"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:321
#, no-c-format
msgid "You now should see any annotation problems as regular error markers within the editor and in the \"Problem\" view:"
msgstr ""
#. Tag: title
#: annotationprocessor.xml:333
#, no-c-format
msgid "IntelliJ IDEA"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:335
#, no-c-format
msgid "The following steps must be followed to use the annotation processor within <ulink url=\"http://www.jetbrains.com/idea/\">IntelliJ IDEA</ulink> (version 9 and above):"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:341
#, no-c-format
msgid "Go to \"File\", then \"Settings\","
msgstr ""
#. Tag: para
#: annotationprocessor.xml:345
#, no-c-format
msgid "Expand the node \"Compiler\", then \"Annotation Processors\""
msgstr ""
#. Tag: para
#: annotationprocessor.xml:350
#, no-c-format
msgid "Choose \"Enable annotation processing\" and enter the following as \"Processor path\": /path/to/validation-api-&bvVersion;.jar:/path/to/hibernate-validator-&version;.jar:/path/to/hibernate-validator-annotation-processor-&version;.jar"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:356
#, no-c-format
msgid "Add the processor's fully qualified name <classname>org.hibernate.validator.ap.ConstraintValidationProcessor</classname> to the \"Annotation Processors\" list"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:362
#, no-c-format
msgid "If applicable add you module to the \"Processed Modules\" list"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:367
#, no-c-format
msgid "Rebuilding your project then should show any erronous constraint annotations:"
msgstr ""
#. Tag: title
#: annotationprocessor.xml:379
#, no-c-format
msgid "NetBeans"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:381
#, no-c-format
msgid "Starting with version 6.9, also the <ulink url=\"http://www.netbeans.org/\">NetBeans</ulink> IDE supports using annotation processors within the IDE build. To do so, do the following:"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:392
#, no-c-format
msgid "Go to \"Libraries\", tab \"Processor\", and add the following JARs:"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:411
#, no-c-format
msgid "Go to \"Build - Compiling\", select \"Enable Annotation Processing\" and \"Enable Annotation Processing in Editor\". Add the annotation processor by specifying its fully qualified name <classname>org.hibernate.validator.ap.ConstraintValidationProcessor</classname>"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:418
#, no-c-format
msgid "Any constraint annotation problems will then be marked directly within the editor:"
msgstr ""
#. Tag: title
#: annotationprocessor.xml:432
#, no-c-format
msgid "Known issues"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:434
#, no-c-format
msgid "The following known issues exist as of May 2010:"
msgstr ""
#. Tag: para
#: annotationprocessor.xml:438
#, no-c-format
msgid "<ulink url=\"http://opensource.atlassian.com/projects/hibernate/browse/HV-308\">HV-308</ulink>: Additional validators registered for a constraint <ulink url=\"http://docs.jboss.org/hibernate/stable/validator/reference/en/html_single/#d0e1957\">using XML</ulink> are not evaluated by the annotation processor."
msgstr ""
#. Tag: para
#: annotationprocessor.xml:446
#, no-c-format
msgid "Sometimes custom constraints can't be <ulink url=\"http://opensource.atlassian.com/projects/hibernate/browse/HV-293\">properly evaluated</ulink> when using the processor within Eclipse. Cleaning the project can help in these situations. This seems to be an issue with the Eclipse JSR 269 API implementation, but further investigation is required here."
msgstr ""
#. Tag: para
#: annotationprocessor.xml:455
#, no-c-format
msgid "When using the processor within Eclipse, the check of dynamic default group sequence definitions doesn't work. After further investigation, it seems to be an issue with the Eclipse JSR 269 API implementation."
msgstr ""