• 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

83.33
/src/main/java/io/github/torand/jsonschema2java/model/EntityInfo.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
import java.util.List;
19
import java.util.Set;
20
import java.util.TreeSet;
21

22
import static java.util.Collections.emptyList;
23

24
/**
25
 * Defines basic information about an entity.
26
 */
27
public interface EntityInfo {
28

29
    /**
30
     * Gets the complete set of normal imports for this entity and its sub-entities.
31
     * @return the aggregated set of normal imports.
32
     */
33
    Set<String> aggregatedNormalImports();
34

35
    /**
36
     * Gets the complete set of static imports for this entity and its sub-entities.
37
     * @return the aggregated set of static imports.
38
     */
39
    Set<String> aggregatedStaticImports();
40

41
    /**
42
     * Gets the complete set of all imports for this entity and its sub-entities.
43
     * @return the aggregated set of all imports.
44
     */
45
    default Set<String> aggregatedImports() {
46
        Set<String> imports = new TreeSet<>();
4✔
47
        imports.addAll(aggregatedNormalImports());
5✔
48
        imports.addAll(aggregatedStaticImports());
5✔
49
        return imports;
2✔
50
    }
51

52
    /**
53
     * Gets the annotations decorating this entity.
54
     * @return the annotations decorating this entity.
55
     */
56
    default List<AnnotationInfo> annotations() {
NEW
57
        return emptyList();
×
58
    }
59

60
    /**
61
     * Gets the annotations decorating this entity, formatted as strings.
62
     * @return the annotation strings decorating this entity.
63
     */
64
    default List<String> annotationsAsStrings() {
65
        return annotations().stream().map(AnnotationInfo::annotation).toList();
7✔
66
    }
67
}
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