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

burningwave / reflection / #97

27 Nov 2026 08:15PM UTC coverage: 74.528%. Remained the same
#97

push

Roberto-Gentili
Set the version to 4.6.0-SNAPSHOT. Releasing new version

790 of 1060 relevant lines covered (74.53%)

0.75 hits per line

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

50.0
/src/main/java/org/burningwave/reflection/Criteria.java
1
/*
2
 * This file is part of Burningwave Reflection.
3
 *
4
 * Author: Roberto Gentili
5
 *
6
 * Hosted at: https://github.com/burningwave/reflection
7
 *
8
 * --
9
 *
10
 * The MIT License (MIT)
11
 *
12
 * Copyright (c) 2022 Roberto Gentili
13
 *
14
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
15
 * documentation files (the "Software"), to deal in the Software without restriction, including without
16
 * limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
17
 * the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
18
 * conditions:
19
 *
20
 * The above copyright notice and this permission notice shall be included in all copies or substantial
21
 * portions of the Software.
22
 *
23
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
24
 * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
25
 * EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
26
 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
27
 * OR OTHER DEALINGS IN THE SOFTWARE.
28
 */
29
package org.burningwave.reflection;
30

31
/**
32
 * The base class of the criteria of this library: it has all the logic operations of the criteria of Burningwave Common
33
 * and creates the new criteria through {@link Constructors}, so that their constructors do not need to be accessible.
34
 *
35
 * @param <E> the type of the elements to test
36
 * @param <C> the type of the criteria
37
 * @param <T> the type of the test context
38
 */
39
@SuppressWarnings("unchecked")
40
public class Criteria<E, C extends Criteria<E, C, T>, T extends Criteria.TestContext<E, C>> extends org.burningwave.Criteria<E, C, T> {
1 ✔
41

42
        /**
43
         * Creates a new criteria of the class of this one, through {@link Constructors#newInstanceOf(Class, Object...)}.
44
         *
45
         * @return the new criteria
46
         */
47
        @Override
48
        protected C newInstance() {
49
                return (C)Constructors.INSTANCE.newInstanceOf(this.getClass());
1 ✔
50
        }
51

52
        /**
53
         * The base class of the simple criteria of this library, whose predicates receive only the element to test: it
54
         * creates the new criteria as {@link Criteria} does.
55
         *
56
         * @param <E> the type of the elements to test
57
         * @param <C> the type of the criteria
58
         */
59
        public static class Simple<E, C extends Simple<E, C>> extends org.burningwave.Criteria.Simple<E, C>{
×
60

61
                /**
62
                 * Creates a new criteria of the class of this one, through
63
                 * {@link Constructors#newInstanceOf(Class, Object...)}.
64
                 *
65
                 * @return the new criteria
66
                 */
67
                @Override
68
                protected C newInstance() {
69
                        return (C)Constructors.INSTANCE.newInstanceOf(this.getClass());
×
70
                }
71

72
        }
73

74
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc