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

pmd / pmd / 277

27 Nov 2025 01:37PM UTC coverage: 78.778% (+0.03%) from 78.749%
277

push

github

adangel
[java] UseArraysAsList: skip when if-statements (#6228)

18419 of 24233 branches covered (76.01%)

Branch coverage included in aggregate %.

40090 of 50038 relevant lines covered (80.12%)

0.81 hits per line

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

28.57
/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/symbols/JTypeParameterSymbol.java
1
/*
2
 * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3
 */
4

5

6
package net.sourceforge.pmd.lang.java.symbols;
7

8
import java.lang.reflect.Modifier;
9

10
import org.checkerframework.checker.nullness.qual.NonNull;
11

12
import net.sourceforge.pmd.lang.java.ast.ASTTypeParameter;
13
import net.sourceforge.pmd.lang.java.types.JTypeMirror;
14
import net.sourceforge.pmd.lang.java.types.JTypeVar;
15

16

17
/**
18
 * Represents the declaration of a type variable, ie a type parameter. Type variables are reference
19
 * types, but not class or interface types. They're also not declared with the same node. For those
20
 * reasons this type of references is distinct from {@link JClassSymbol}.
21
 *
22
 * @since 7.0.0
23
 */
24
public interface JTypeParameterSymbol extends JTypeDeclSymbol, BoundToNode<ASTTypeParameter> {
25

26

27
    /**
28
     * Returns the {@link JClassSymbol} or {@link JMethodSymbol} which declared
29
     * this type parameter.
30
     */
31
    JTypeParameterOwnerSymbol getDeclaringSymbol();
32

33

34
    JTypeVar getTypeMirror();
35

36
    /**
37
     * Returns the upper bound of this type variable. This may be an
38
     * intersection type. If the variable is unbounded, returns Object.
39
     */
40
    JTypeMirror computeUpperBound();
41

42

43
    @Override
44
    default @NonNull String getPackageName() {
45
        return getDeclaringSymbol().getPackageName();
1✔
46
    }
47

48

49
    @Override
50
    default int getModifiers() {
51
        return getDeclaringSymbol().getModifiers() | Modifier.ABSTRACT | Modifier.FINAL;
×
52
    }
53

54
    @Override
55
    default @NonNull JClassSymbol getEnclosingClass() {
56
        JTypeParameterOwnerSymbol ownerSymbol = getDeclaringSymbol();
×
57
        return ownerSymbol instanceof JClassSymbol ? (JClassSymbol) ownerSymbol : ownerSymbol.getEnclosingClass();
×
58
    }
59

60

61
    @Override
62
    default <R, P> R acceptVisitor(SymbolVisitor<R, P> visitor, P param) {
63
        return visitor.visitTypeParam(this, param);
1✔
64
    }
65
}
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