Skip to content

Commit c66cec6

Browse files
committed
javadoc improvements
1 parent 3ee1046 commit c66cec6

File tree

8 files changed

+23
-26
lines changed

8 files changed

+23
-26
lines changed

core/src/main/java/org/everit/jsonvalidator/ArraySchema.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,13 @@
2424

2525
/**
2626
* Array schema validator.
27-
*
28-
* {@link http://json-schema.org/latest/json-schema-validation.html#anchor36 See the according
29-
* specification}.
3027
*/
3128
public class ArraySchema extends Schema {
3229

3330
/**
3431
* Builder class for {@link ArraySchema}.
3532
*/
36-
public static class Builder extends Schema.Builder {
33+
public static class Builder extends Schema.Builder<ArraySchema> {
3734

3835
private boolean requiresArray = true;
3936

core/src/main/java/org/everit/jsonvalidator/CombinedSchema.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,6 @@
2121

2222
/**
2323
* Validator for {@code allOf}, {@code oneOf}, {@code anyOf} schemas.
24-
*
25-
* <p>
26-
* See the following paragraphs of the specification for more details:
27-
* <ul>
28-
* <li>{@link http://json-schema.org/latest/json-schema-validation.html#anchor82}</li>
29-
* <li>{@link http://json-schema.org/latest/json-schema-validation.html#anchor85}</li>
30-
* <li>{@link http://json-schema.org/latest/json-schema-validation.html#anchor88}</li>
31-
* </ul>
32-
* </p>
3324
*/
3425
public class CombinedSchema extends Schema {
3526

core/src/main/java/org/everit/jsonvalidator/EnumSchema.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@
2020
import java.util.Set;
2121

2222
/**
23-
* {@link Enum} schema validator.
23+
* Enum schema validator.
2424
*
25-
* {@link http://json-schema.org/latest/json-schema-validation.html#anchor76 See the according
26-
* specification}.
2725
*/
2826
public class EnumSchema extends Schema {
2927

core/src/main/java/org/everit/jsonvalidator/NotSchema.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919

2020
/**
2121
* {@code Not} schema validator.
22-
*
23-
* {@link http://json-schema.org/latest/json-schema-validation.html#anchor91 See the according
24-
* specification}.
2522
*/
2623
public class NotSchema extends Schema {
2724

core/src/main/java/org/everit/jsonvalidator/ReferenceSchema.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@
1616
package org.everit.jsonvalidator;
1717

1818
/**
19-
* This class is used by {@link org.everit.jsonvalidator.loader.SchemaLoader} to resolve references
20-
* to the root schema, during the construction of the schema.
19+
* This class is used by {@link org.everit.jsonvalidator.loader.SchemaLoader} to resolve JSON
20+
* pointers during the construction of the schema. This class has been made mutable to permit the
21+
* loading of recursive schemas.
2122
*/
2223
public class ReferenceSchema extends Schema {
2324

core/src/main/java/org/everit/jsonvalidator/Schema.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,19 @@ public Builder<S> id(final String id) {
6666
/**
6767
* Constructor.
6868
*/
69-
protected Schema(final Builder builder) {
69+
protected Schema(final Builder<?> builder) {
7070
this.title = builder.title;
7171
this.description = builder.description;
7272
this.id = builder.id;
7373
}
7474

7575
/**
76-
* Validates.
76+
* Performs the schema validation.
77+
*
78+
* @param subject
79+
* the object to be validated
80+
* @throws ValidationException
81+
* if the {@code subject} is invalid against this schema.
7782
*/
7883
public abstract void validate(final Object subject);
7984

core/src/main/java/org/everit/jsonvalidator/StringSchema.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919

2020
/**
2121
* {@code String} schema validator.
22-
*
23-
* {@link http://json-schema.org/latest/json-schema-validation.html#anchor25 See the according
24-
* specification}.
2522
*/
2623
public class StringSchema extends Schema {
2724

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package org.everit.jsonvalidator;
2+
3+
/**
4+
* This package contains classes representing different kinds of JSON schema.
5+
*
6+
* <p>The base class for each schema-type implementation is the {@link org.everit.jsonvalidator.Schema} class. In most cases schema instances
7+
* are created via {@link org.everit.jsonvalidator.loader.SchemaLoader#load(org.json.JSONObject)} invocations, although direct schema
8+
* instantiations - therefore programmatic schema creation - is also possible.</p>
9+
*
10+
* <p>Every {@code Schema} subclass has its separate {@code Builder} class which permits the creation of schemas by chained method calls.
11+
*/

0 commit comments

Comments
 (0)