Skip to content

Commit dbfeb40

Browse files
committed
Replacing all <code> usages with {@code}
1 parent a877249 commit dbfeb40

38 files changed

+288
-288
lines changed

src/main/java/javax/validation/Configuration.java

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
/**
2121
* Receives configuration information, selects the appropriate
22-
* Bean Validation provider and builds the appropriate <code>ValidatorFactory</code>.
22+
* Bean Validation provider and builds the appropriate {@code ValidatorFactory}.
2323
* <p/>
2424
* Usage:
2525
* <pre>
@@ -33,20 +33,20 @@
3333
* By default, the configuration information is retrieved from
3434
* <i>META-INF/validation.xml</i>.
3535
* It is possible to override the configuration retrieved from the XML file
36-
* by using one or more of the <code>Configuration</code> methods.
36+
* by using one or more of the {@code Configuration} methods.
3737
* <p/>
3838
* The {@link ValidationProviderResolver} is specified at configuration time
3939
* (see {@link javax.validation.spi.ValidationProvider}).
40-
* If none is explicitly requested, the default <code>ValidationProviderResolver</code> is used.
40+
* If none is explicitly requested, the default {@code ValidationProviderResolver} is used.
4141
* <p/>
4242
* The provider is selected in the following way:
4343
* <ul>
4444
* <li>if a specific provider is requested programmatically using
45-
* <code>Validation.byProvider(Class)</code>, find the first provider implementing
45+
* {@code Validation.byProvider(Class)}, find the first provider implementing
4646
* the provider class requested and use it</li>
4747
* <li>if a specific provider is requested in <i>META-INF/validation.xml</i>,
4848
* find the first provider implementing the provider class requested and use it</li>
49-
* <li>otherwise, use the first provider returned by the <code>ValidationProviderResolver</code></li>
49+
* <li>otherwise, use the first provider returned by the {@code ValidationProviderResolver}</li>
5050
* </ul>
5151
* <p/>
5252
* Implementations are not meant to be thread-safe.
@@ -61,33 +61,33 @@ public interface Configuration<T extends Configuration<T>> {
6161
* method is called.
6262
* This method is typically useful for containers that parse
6363
* <i>META-INF/validation.xml</i> themselves and pass the information
64-
* via the <code>Configuration</code> methods.
64+
* via the {@code Configuration} methods.
6565
*
66-
* @return <code>this</code> following the chaining method pattern.
66+
* @return {@code this} following the chaining method pattern.
6767
*/
6868
T ignoreXmlConfiguration();
6969

7070
/**
7171
* Defines the message interpolator used. Has priority over the configuration
7272
* based message interpolator.
73-
* If <code>null</code> is passed, the default message interpolator is used
73+
* If {@code null} is passed, the default message interpolator is used
7474
* (defined in XML or the specification default).
7575
*
7676
* @param interpolator message interpolator implementation.
7777
*
78-
* @return <code>this</code> following the chaining method pattern.
78+
* @return {@code this} following the chaining method pattern.
7979
*/
8080
T messageInterpolator(MessageInterpolator interpolator);
8181

8282
/**
8383
* Defines the traversable resolver used. Has priority over the configuration
8484
* based traversable resolver.
85-
* If <code>null</code> is passed, the default traversable resolver is used
85+
* If {@code null} is passed, the default traversable resolver is used
8686
* (defined in XML or the specification default).
8787
*
8888
* @param resolver traversable resolver implementation.
8989
*
90-
* @return <code>this</code> following the chaining method pattern.
90+
* @return {@code this} following the chaining method pattern.
9191
*/
9292
T traversableResolver(TraversableResolver resolver);
9393

@@ -99,7 +99,7 @@ public interface Configuration<T extends Configuration<T>> {
9999
*
100100
* @param constraintValidatorFactory constraint factory implementation.
101101
*
102-
* @return <code>this</code> following the chaining method pattern.
102+
* @return {@code this} following the chaining method pattern.
103103
*/
104104
T constraintValidatorFactory(ConstraintValidatorFactory constraintValidatorFactory);
105105

@@ -111,7 +111,7 @@ public interface Configuration<T extends Configuration<T>> {
111111
*
112112
* @param parameterNameProvider Parameter name provider implementation.
113113
*
114-
* @return <code>this</code> following the chaining method pattern.
114+
* @return {@code this} following the chaining method pattern.
115115
*/
116116
T parameterNameProvider(ParameterNameProvider parameterNameProvider);
117117

@@ -120,14 +120,14 @@ public interface Configuration<T extends Configuration<T>> {
120120
* XML format.
121121
* <p/>
122122
* The stream should be closed by the client API after the
123-
* <code>ValidatorFactory</code> has been built. The Bean Validation provider
123+
* {@code ValidatorFactory} has been built. The Bean Validation provider
124124
* must not close the stream.
125125
*
126126
* @param stream XML mapping stream.
127127
*
128-
* @return <code>this</code> following the chaining method pattern.
128+
* @return {@code this} following the chaining method pattern.
129129
*
130-
* @throws IllegalArgumentException if <code>stream</code> is null
130+
* @throws IllegalArgumentException if {@code stream} is null
131131
*/
132132
T addMapping(InputStream stream);
133133

@@ -140,12 +140,12 @@ public interface Configuration<T extends Configuration<T>> {
140140
* Note: Using this non type-safe method is generally not recommended.
141141
* <p/>
142142
* It is more appropriate to use, if available, the type-safe equivalent provided
143-
* by a specific provider via its <code>Configuration</code> subclass.
144-
* <code>ValidatorFactory factory = Validation.byProvider(ACMEPrivoder.class)
143+
* by a specific provider via its {@code Configuration} subclass.
144+
* <pre>{@code ValidatorFactory factory = Validation.byProvider(ACMEProvider.class)
145145
* .configure()
146146
* .providerSpecificProperty(ACMEState.FAST)
147-
* .buildValidatorFactory();
148-
* </code>
147+
* .buildValidatorFactory();}
148+
* </pre>
149149
* This method is typically used by containers parsing <i>META-INF/validation.xml</i>
150150
* themselves and injecting the state to the Configuration object.
151151
* <p/>
@@ -158,15 +158,15 @@ public interface Configuration<T extends Configuration<T>> {
158158
* @param name property name.
159159
* @param value property value.
160160
*
161-
* @return <code>this</code> following the chaining method pattern.
161+
* @return {@code this} following the chaining method pattern.
162162
*
163-
* @throws IllegalArgumentException if <code>name</code> is null
163+
* @throws IllegalArgumentException if {@code name} is null
164164
*/
165165
T addProperty(String name, String value);
166166

167167
/**
168-
* Return an implementation of the <code>MessageInterpolator</code> interface
169-
* following the default <code>MessageInterpolator</code> defined in the
168+
* Return an implementation of the {@code MessageInterpolator} interface
169+
* following the default {@code MessageInterpolator} defined in the
170170
* specification:
171171
* <ul>
172172
* <li>use the ValidationMessages resource bundle to load keys</li>
@@ -178,8 +178,8 @@ public interface Configuration<T extends Configuration<T>> {
178178
MessageInterpolator getDefaultMessageInterpolator();
179179

180180
/**
181-
* Return an implementation of the <code>TraversableResolver</code> interface
182-
* following the default <code>TraversableResolver</code> defined in the
181+
* Return an implementation of the {@code TraversableResolver} interface
182+
* following the default {@code TraversableResolver} defined in the
183183
* specification:
184184
* <ul>
185185
* <li>if Java Persistence is available in the runtime environment,
@@ -195,25 +195,25 @@ public interface Configuration<T extends Configuration<T>> {
195195
TraversableResolver getDefaultTraversableResolver();
196196

197197
/**
198-
* Return an implementation of the <code>ConstraintValidatorFactory</code> interface
199-
* following the default <code>ConstraintValidatorFactory</code> defined in the
198+
* Return an implementation of the {@code ConstraintValidatorFactory} interface
199+
* following the default {@code ConstraintValidatorFactory} defined in the
200200
* specification:
201201
* <ul>
202-
* <li>uses the public no-arg constructor of the <code>ConstraintValidator</code></li>
202+
* <li>uses the public no-arg constructor of the {@code ConstraintValidator}</li>
203203
* </ul>
204204
*
205205
* @return default ConstraintValidatorFactory implementation compliant with the specification
206206
*/
207207
ConstraintValidatorFactory getDefaultConstraintValidatorFactory();
208208

209209
/**
210-
* Return an implementation of the <code>ParameterNameProvider</code>
211-
* interface following the default <code>ParameterNameProvider</code>
210+
* Return an implementation of the {@code ParameterNameProvider}
211+
* interface following the default {@code ParameterNameProvider}
212212
* defined in the specification:
213213
* <ul>
214-
* <li>returns names in the form <code>arg&lt;PARAMETER_INDEX&gt;</code>
215-
* where <code>PARAMETER_INDEX</code> starts at 0 for the first parameter,
216-
* e.g. <code>arg0</code>, <code>arg1</code> etc.</code></li>
214+
* <li>returns names in the form {@code arg&lt;PARAMETER_INDEX&gt;}
215+
* where {@code PARAMETER_INDEX} starts at 0 for the first parameter,
216+
* e.g. {@code arg0}, {@code arg1} etc.</li>
217217
* </ul>
218218
*
219219
* @return default ParameterNameProvider implementation compliant with
@@ -231,7 +231,7 @@ public interface Configuration<T extends Configuration<T>> {
231231
ConfigurationSource getConfigurationSource();
232232

233233
/**
234-
* Build a <code>ValidatorFactory</code> implementation.
234+
* Build a {@code ValidatorFactory} implementation.
235235
*
236236
* @return ValidatorFactory
237237
*

src/main/java/javax/validation/Constraint.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
/**
2828
* Link between a constraint annotation and its constraint validation implementations.
2929
* <p/>
30-
* A given constraint annotation should be annotated by a <code>@Constraint</code>
30+
* A given constraint annotation should be annotated by a {@code @Constraint}
3131
* annotation which refers to its list of constraint validation implementations.
3232
*
3333
* @author Emmanuel Bernard
@@ -39,8 +39,8 @@
3939
@Retention(RUNTIME)
4040
public @interface Constraint {
4141
/**
42-
* <code>ConstraintValidator</code> classes must reference distinct target types.
43-
* If two <code>ConstraintValidator</code> refer to the same type,
42+
* {@code ConstraintValidator} classes must reference distinct target types.
43+
* If two {@code ConstraintValidator} refer to the same type,
4444
* an exception will occur.
4545
*
4646
* @return array of ConstraintValidator classes implementing the constraint

src/main/java/javax/validation/ConstraintValidator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ public interface ConstraintValidator<A extends Annotation, T> {
4646

4747
/**
4848
* Implement the validation logic.
49-
* The state of <code>value</code> must not be altered.
49+
* The state of {@code value} must not be altered.
5050
*
5151
* This method can be accessed concurrently, thread-safety must be ensured
5252
* by the implementation.
5353
*
5454
* @param value object to validate
5555
* @param context context in which the constraint is evaluated
5656
*
57-
* @return false if <code>value</code> does not pass the constraint
57+
* @return false if {@code value} does not pass the constraint
5858
*/
5959
boolean isValid(T value, ConstraintValidatorContext context);
6060
}

0 commit comments

Comments
 (0)