• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

torand / jsonschema2java / 18399814123

10 Oct 2025 07:35AM UTC coverage: 78.214% (-0.9%) from 79.157%
18399814123

push

github

torand
fix: bean validation annotations on primitive subtypes of compound pojo property types now generated

287 of 413 branches covered (69.49%)

Branch coverage included in aggregate %.

440 of 533 new or added lines in 26 files covered. (82.55%)

1 existing line in 1 file now uncovered.

808 of 987 relevant lines covered (81.86%)

4.75 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

75.0
/src/main/java/io/github/torand/jsonschema2java/model/AnnotationInfo.java
1
/*
2
 * Copyright (c) 2024-2025 Tore Eide Andersen
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *      http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16
package io.github.torand.jsonschema2java.model;
17

18
/**
19
 * Describes an annotation.
20
 * @param annotation the annotation.
21
 * @param imports the imports required by the annotation.
22
 */
23
public record AnnotationInfo(
9✔
24
    String annotation,
25
    ImportInfo imports
26
) implements ImportsSupplier {
27
    /**
28
     * Constructs an {@link AnnotationInfo} object.
29
     */
30
    public AnnotationInfo() {
NEW
31
        this(null, ImportInfo.empty());
×
NEW
32
    }
×
33

34
    /**
35
     * Constructs an {@link AnnotationInfo} object.
36
     * @param annotation the annoation.
37
     */
38
    public AnnotationInfo(String annotation) {
39
        this(annotation, ImportInfo.empty());
4✔
40
    }
1✔
41

42
    /**
43
     * Constructs an {@link AnnotationInfo} object.
44
     * @param annotation the annotation.
45
     * @param annotationImport the import required by the annotation.
46
     */
47
    public AnnotationInfo(String annotation, String annotationImport) {
48
        this(annotation, ImportInfo.empty().withAddedNormalImport(annotationImport));
6✔
49
    }
1✔
50

51
    /**
52
     * Returns a new {@link AnnotationInfo} object with specified normal import added.
53
     * @param normalImport the import to add.
54
     * @return the new and updated {@link AnnotationInfo} object.
55
     */
56
    public AnnotationInfo withAddedNormalImport(String normalImport) {
57
        return new AnnotationInfo(annotation, imports.withAddedNormalImport(normalImport));
10✔
58
    }
59
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc