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

pmd / pmd / 225

28 Oct 2025 07:44AM UTC coverage: 78.72% (+0.04%) from 78.679%
225

push

github

adangel
[java] Fix #6146: ClassCastException in TypeTestUtil (#6156)

18307 of 24103 branches covered (75.95%)

Branch coverage included in aggregate %.

37 of 39 new or added lines in 11 files covered. (94.87%)

6 existing lines in 1 file now uncovered.

39859 of 49787 relevant lines covered (80.06%)

0.81 hits per line

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

85.51
/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/ExprMirror.java
1
/*
2
 * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3
 */
4

5
package net.sourceforge.pmd.lang.java.types.internal.infer;
6

7
import static net.sourceforge.pmd.lang.java.types.internal.infer.ExprMirror.TypeSpecies.UNKNOWN;
8
import static net.sourceforge.pmd.lang.java.types.internal.infer.ExprMirror.TypeSpecies.getSpecies;
9
import static net.sourceforge.pmd.lang.java.types.internal.infer.MethodResolutionPhase.STRICT;
10

11
import java.util.List;
12
import java.util.function.Predicate;
13

14
import org.checkerframework.checker.nullness.qual.NonNull;
15
import org.checkerframework.checker.nullness.qual.Nullable;
16

17
import net.sourceforge.pmd.lang.java.ast.JavaNode;
18
import net.sourceforge.pmd.lang.java.ast.MethodUsage;
19
import net.sourceforge.pmd.lang.java.symbols.JConstructorSymbol;
20
import net.sourceforge.pmd.lang.java.types.JClassType;
21
import net.sourceforge.pmd.lang.java.types.JMethodSig;
22
import net.sourceforge.pmd.lang.java.types.JTypeMirror;
23
import net.sourceforge.pmd.lang.java.types.JTypeVar;
24
import net.sourceforge.pmd.lang.java.types.OverloadSelectionResult;
25
import net.sourceforge.pmd.lang.java.types.TypeOps;
26
import net.sourceforge.pmd.lang.java.types.TypeSystem;
27
import net.sourceforge.pmd.lang.java.types.TypingContext;
28
import net.sourceforge.pmd.util.OptionalBool;
29

30
/**
31
 * Adapter class to manipulate expressions. The framework
32
 * ideally keeps focus on types and doesn't have a dependency
33
 * on the AST. Only the impl package can have such dependencies.
34
 */
35
public interface ExprMirror {
36

37
    /**
38
     * Returns a node which is used as a location to report messages.
39
     * Do not use this any other way.
40
     */
41
    JavaNode getLocation();
42

43

44
    /**
45
     * If this expression is of a standalone form, returns the type of
46
     * the expression. Otherwise returns null.
47
     *
48
     * <p>Note that standalone types can directly be set on the type
49
     * node.
50
     *
51
     * @return The type of the expression if it is standalone
52
     */
53
    @Nullable JTypeMirror getStandaloneType();
54

55
    /**
56
     * For a standalone expr, finish type inference by computing properties
57
     * that are guarded by the type res lock. For instance for a standalone
58
     * ctor call, the standalone type is trivially known (it's the type node).
59
     * But we still need to do overload resolution.
60
     */
61
    default void finishStandaloneInference(@NonNull JTypeMirror standaloneType) {
62
        // do nothing
63
    }
1✔
64

65

66
    /**
67
     * Set the type of the underlying ast node. Used when we need
68
     * to find out the type of a poly to infer the type of another,
69
     * that way, we don't repeat computation.
70
     */
71
    void setInferredType(JTypeMirror mirror);
72

73
    /** Return the value set in the last call to {@link #setInferredType(JTypeMirror)}. */
74
    @Nullable JTypeMirror getInferredType();
75

76
    /**
77
     * Returns typing information for the lambdas parameters in scope
78
     * in this expression and its subexpressions. When overload resolution
79
     * involves lambdas, we might have to try several target types for each
80
     * lambda. Each of those may give a different type to the lambda parameters,
81
     * and hence, to every expression in the lambda body. These "tentative"
82
     * typing are kept in the {@link TypingContext} object and only
83
     * committed to the AST for the overload that is selected in the end.
84
     */
85
    TypingContext getTypingContext();
86

87
    /**
88
     * Returns the species that this expression produces. The species
89
     * may be known even if the expr is not standalone. For example a
90
     * diamond constructor call is not standalone, but its species is
91
     * obviously REFERENCE.
92
     *
93
     * <p>This is used for specificity tests for lambdas. They use species
94
     * because invocation needs to be done exactly once, and the actual
95
     * type of the expression may differ depending on the selected overload.
96
     * Eg given the signatures {@code <T>foo(Supplier<T>)} and {@code foo(Runnable)},
97
     * the expression {@code foo(() -> new List<>())} must select the supplier
98
     * overload, even before the invocation type of {@code List<>} is known.
99
     * The overload selection compares the expected species of both function
100
     * types (REFERENCE for Supplier, VOID for Runnable), and determines that
101
     * the supplier is more appropriate.
102
     */
103
    default @NonNull TypeSpecies getStandaloneSpecies() {
104
        JTypeMirror std = getStandaloneType();
1✔
105
        return std == null ? UNKNOWN : getSpecies(std);
1!
106
    }
107

108

109
    /**
110
     * Returns true if this mirror and its subexpressions are equivalent
111
     * to the underlying AST node. This is only relevant when making mirrors
112
     * that are not exactly equal to the AST node (eg, omitting explicit type arguments),
113
     * in order to check if the transformation does not change the meaning of the program.
114
     * It verifies that method and constructor calls are overload-selected
115
     * to the same compile-time declaration, and that nested lambdas
116
     * have the same type as in the AST.
117
     *
118
     * <p>This mirror's state, as filled-in during type resolution by
119
     * {@link Infer} using the various setters of {@link ExprMirror}
120
     * interfaces, is compared to the AST's corresponding state. Consequently,
121
     * if this state is missing (meaning, that no overload resolution
122
     * has been run using this mirror), the analysis cannot be performed
123
     * and an exception is thrown.
124
     *
125
     * @throws IllegalStateException If this mirror has not been used for overload resolution
126
     */
127
    boolean isEquivalentToUnderlyingAst();
128

129

130
    /**
131
     * Ground this expression and any expressions that might have been
132
     * assigned a type/ other data during type inference of this node.
133
     * This is called when inference in a parent expression failed, to
134
     * clean up partial data like type inference.
135
     *
136
     * <p>This is only called if the invocation fails, not when testing
137
     * for applicability. The reason is that this is really only relevant
138
     * for lambdas (to reset the type of their parameters), and those are
139
     * not relevant to applicability.
140
     */
141
    default void groundTree() {
142
        setInferredType(ensureNoTypeVariables(getInferredType()));
1✔
143
    }
1✔
144

145
    static JTypeMirror ensureNoTypeVariables(JTypeMirror ty) {
146
        if (ty == null) {
1✔
147
            return null;
1✔
148
        }
149
        return ty.subst(InferenceContext.finalGroundSubst());
1✔
150
    }
151

152
    static JMethodSig ensureNoTypeVariables(JMethodSig ty) {
153
        if (ty == null) {
1!
NEW
154
            return null;
×
155
        }
156
        return ty.subst(InferenceContext.finalGroundSubst());
1✔
157
    }
158

159
    /** A general category of types. */
160
    enum TypeSpecies {
1✔
161
        PRIMITIVE,
1✔
162
        REFERENCE,
1✔
163
        VOID,
1✔
164
        UNKNOWN;
1✔
165

166

167
        public static TypeSpecies getSpecies(JTypeMirror t) {
168
            if (t.isPrimitive()) {
1✔
169
                return PRIMITIVE;
1✔
170
            } else if (t.isVoid()) {
1✔
171
                return VOID;
1✔
172
            } else if (TypeOps.isSpecialUnresolved(t)) {
1!
173
                return UNKNOWN;
×
174
            }
175
            return REFERENCE;
1✔
176
        }
177
    }
178

179

180
    interface PolyExprMirror extends ExprMirror {
181

182

183
        /**
184
         * Returns the class declaration wherein this invocation occurs.
185
         * Returns null if it's unresolved.
186
         */
187
        @NonNull JClassType getEnclosingType();
188

189

190
        @Override
191
        default @Nullable JTypeMirror getStandaloneType() {
192
            return null;
1✔
193
        }
194

195

196
        /**
197
         * If inference failed to determine the type of this node, returns
198
         * a fallback for it. This should not query the context of the expression,
199
         * or nodes whose type is unstable because it may be being inferred.
200
         *
201
         * <p>If no fallback should be used, returns null.
202
         */
203
        default @Nullable JTypeMirror unresolvedType() {
204
            return null;
1✔
205
        }
206
    }
207

208

209
    /** Mirrors a conditional or switch expression. */
210
    interface BranchingMirror extends PolyExprMirror {
211

212
        /**
213
         * Returns true if every result expression matches the given
214
         * predicate.
215
         */
216
        boolean branchesMatch(Predicate<? super ExprMirror> condition);
217

218
        /**
219
         * Record on the AST node that is is a standalone expression.
220
         * This accounts for special cases in the spec which are made
221
         * for numeric and boolean conditional expressions. For those
222
         * types of standalone exprs, the branches may have an additional
223
         * implicit unboxing/widening conversion, that does not depend
224
         * on the usual target type (the context of the ternary itself),
225
         * but just on the other branch.
226
         */
227
        default void setStandalone() {
228
            // do nothing by default
229
        }
1✔
230

231

232
        @Override
233
        default boolean isEquivalentToUnderlyingAst() {
234
            return branchesMatch(ExprMirror::isEquivalentToUnderlyingAst);
×
235
        }
236
    }
237

238
    /**
239
     * Mirror of some expression that targets a functional interface type:
240
     * lambda or method reference.
241
     */
242
    interface FunctionalExprMirror extends PolyExprMirror {
243

244
        /**
245
         * For a method ref or lambda, this is the type of the functional interface.
246
         * E.g. in {@code stringStream.map(String::isEmpty)}, this is
247
         * {@code java.util.function.Function<java.lang.String, java.lang.Boolean>}
248
         *
249
         * <p>May be null if we're resetting some partial data.
250
         */
251
        @Override
252
        void setInferredType(@Nullable JTypeMirror mirror);
253

254

255
        /**
256
         * This is the method that is overridden in getInferredType.
257
         * E.g. in {@code stringStream.map(String::isEmpty)}, this is
258
         * {@code java.util.function.Function<java.lang.String, java.lang.Boolean>.apply(java.lang.String) ->
259
         * java.lang.Boolean}
260
         *
261
         * <p>May be null if we're resetting some partial data.
262
         */
263
        void setFunctionalMethod(@Nullable JMethodSig methodType);
264

265
        /**
266
         * If the matching between this expr and its target type failed,
267
         * finish the inference by setting the data to UNKNOWN, or likely
268
         * values. This is used as a fallback.
269
         *
270
         * @param targetType Target type for the expression, null if there is none
271
         */
272
        void finishFailedInference(@Nullable JTypeMirror targetType);
273
    }
274

275
    /**
276
     * Common interface for {@link InvocationMirror} and {@link MethodRefMirror},
277
     * both of which wrap nods that implement {@link MethodUsage}.
278
     */
279
    interface MethodUsageMirror extends PolyExprMirror {
280

281
        /**
282
         * Set the compile-time declaration that was resolved for this method usage.
283
         */
284
        void setCompileTimeDecl(InvocationMirror.MethodCtDecl methodType);
285

286
        /**
287
         * Return the type in which the search for accessible methods start.
288
         * For method references it is the type of the LHS and is specified by
289
         * the JLS. For method invocations it is the type of the receiver, or
290
         * the type of the enclosing type. For constructor invocations this
291
         * is not defined and will return null.
292
         */
293
        @Nullable JTypeMirror getTypeToSearch();
294
    }
295

296
    /**
297
     * Mirror of a method reference expression.
298
     */
299
    interface MethodRefMirror extends FunctionalExprMirror, MethodUsageMirror {
300

301
        /** True if this references a ctor. */
302
        boolean isConstructorRef();
303

304

305
        /**
306
         * Returns the type to search as defined by the first section of
307
         * <a href="https://docs.oracle.com/javase/specs/jls/se9/html/jls-15.html#jls-15.13.1">JLS§15.13.1</a>
308
         * , except it may also return an array type (the jls makes an exception for it,
309
         * while we don't).
310
         */
311
        @Override
312
        JTypeMirror getTypeToSearch();
313

314

315
        /**
316
         * Returns the type of the left hand-side, if it is not an expression.
317
         * Note that the following qualifier super forms are considered "expressions",
318
         * that have a context-dependent type (depends on the type of the {@code this} expr):
319
         * <pre>
320
         * super :: [TypeArguments] Identifier
321
         * TypeName.super :: [TypeArguments] Identifier
322
         * </pre>
323
         */
324
        @Nullable
325
        JTypeMirror getLhsIfType();
326

327

328
        /**
329
         * Returns the name of the invoked method, or {@link JConstructorSymbol#CTOR_NAME}
330
         * if this is a constructor reference.
331
         */
332
        String getMethodName();
333

334

335
        /** Returns the explicit type arguments (the ones to the right of the "::"). */
336
        @NonNull List<JTypeMirror> getExplicitTypeArguments();
337

338
        /**
339
         * This is the method that is referenced.
340
         * E.g. in {@code stringStream.map(String::isEmpty)}, this is
341
         * {@code java.lang.String.isEmpty() -> boolean}
342
         */
343
        @Override
344
        void setCompileTimeDecl(InvocationMirror.MethodCtDecl methodType);
345

346

347
        /**
348
         * UNRESOLVED_METHOD if not yet computed, null if computed but
349
         * inexact, otherwise the real method.
350
         */
351
        @Nullable
352
        JMethodSig getCachedExactMethod();
353

354

355
        void setCachedExactMethod(@Nullable JMethodSig sig);
356

357
    }
358

359
    /** Mirrors a lambda expression. */
360
    interface LambdaExprMirror extends FunctionalExprMirror {
361

362
        /**
363
         * Returns the types of the explicit parameters. If the lambda
364
         * is implicitly typed, then returns null. If some parameters
365
         * have a var type, returns {@link TypeSystem#UNKNOWN} for those.
366
         *
367
         * <p>Note that a degenerate case of explicitly typed lambda
368
         * expression is a lambda with zero formal parameters.
369
         */
370
        @Nullable List<JTypeMirror> getExplicitParameterTypes();
371

372
        /**
373
         * See {@link #getExplicitParameterTypes()}.
374
         */
375
        default boolean isExplicitlyTyped() {
376
            return getExplicitParameterTypes() != null;
1✔
377
        }
378

379
        /**
380
         * Return the number of parameters of the lambda, regardless of
381
         * whether it's explicitly typed or not.
382
         */
383
        int getParamCount();
384

385

386
        /**
387
         * Returns all the expressions that appear in {@code return}
388
         * statements within the lambda. If this is an expression-bodied
389
         * lambda, returns the expression.
390
         */
391
        Iterable<ExprMirror> getResultExpressions();
392

393

394
        /**
395
         * Returns true if the body is value-compatible {@literal (JLS§15.27.2)}.
396
         * <blockquote>
397
         *     A block lambda body is value-compatible if it cannot complete
398
         *     normally (§14.21) and every return statement in the block
399
         *     has the form return Expression;.
400
         * </blockquote>
401
         */
402
        boolean isValueCompatible();
403

404
        /**
405
         * Returns true if the body is void-compatible {@literal (JLS§15.27.2)}.
406
         * <blockquote>
407
         *     A block lambda body is void-compatible if every return
408
         *     statement in the block has the form return;.
409
         * </blockquote>
410
         */
411
        boolean isVoidCompatible();
412

413
        /**
414
         * Set the currently considered type of the parameters.
415
         * This may change depending on which target type we are currently
416
         * considering. The type of parameters (and therefore the typing context)
417
         * may influence the type of the return values of the lambda.
418
         *
419
         * @param formalParameters formal parameter types of the lambda
420
         */
421
        void updateTypingContext(List<? extends JTypeMirror> formalParameters);
422
    }
423

424
    /**
425
     * Adapter over a method or constructor invocation expression.
426
     */
427
    interface InvocationMirror extends PolyExprMirror, MethodUsageMirror {
428

429

430
        /**
431
         * Enumerates *accessible* method (or ctor) signatures with
432
         * *the same name* as this invocation. Name and accessibility
433
         * will not be checked later.
434
         *
435
         * The details on how to determine this are here:
436
         *
437
         * https://docs.oracle.com/javase/specs/jls/se9/html/jls-15.html#jls-15.12.1
438
         */
439
        Iterable<JMethodSig> getAccessibleCandidates();
440

441

442
        /**
443
         * Returns the erased receiver type. This is only used to adapt the
444
         * {@code Object::getClass} method, other types of invocations don't
445
         * need to implement this.
446
         */
447
        default @Nullable JTypeMirror getErasedReceiverType() {
448
            return null;
×
449
        }
450

451

452
        /**
453
         * Returns the erased receiver type. This is only used for method
454
         * invocations.
455
         */
456
        @Nullable JTypeMirror getReceiverType();
457

458

459
        /**
460
         * Returns the explicit type arguments, eg in {@code Arrays.<String>asList("q")},
461
         * or {@code new <String> Foo("q")}. If none are mentioned, returns an empty list.
462
         */
463
        List<JTypeMirror> getExplicitTypeArguments();
464

465

466
        /**
467
         * @throws IndexOutOfBoundsException If there's no explicit type argument at the given index
468
         */
469
        JavaNode getExplicitTargLoc(int i);
470

471

472
        /**
473
         * Returns the name of the invoked method. If this is a
474
         * constructor call, returns {@link JConstructorSymbol#CTOR_NAME}.
475
         */
476
        String getName();
477

478

479
        /** Returns the expressions corresponding to the arguments of the call. */
480
        List<ExprMirror> getArgumentExpressions();
481

482

483
        /** Return the size of the argument list. */
484
        int getArgumentCount();
485

486

487
        /**
488
         * {@inheritDoc}
489
         *
490
         * @implSpec Should cache this value and return it when {@link #getCtDecl()}
491
         * is called.
492
         */
493
        @Override
494
        void setCompileTimeDecl(MethodCtDecl methodType);
495

496

497
        /**
498
         * Returns the method type set with {@link #setCompileTimeDecl(MethodCtDecl)}
499
         * or null if that method was never called. This is used to perform
500
         * overload resolution exactly once per call site.
501
         */
502
        @Nullable MethodCtDecl getCtDecl();
503

504
        @Override
505
        default @Nullable JTypeMirror getTypeToSearch() {
506
            return getReceiverType();
×
507
        }
508

509

510
        /**
511
         * Information about the overload-resolution for a specific method.
512
         */
513
        class MethodCtDecl implements OverloadSelectionResult {
514
            // note this data is gathered by the MethodCallSite during
515
            // applicability inference, stashed in this object, and
516
            // restored when we do invocation.
517

518
            private final JMethodSig methodType;
519
            private final MethodResolutionPhase resolvePhase;
520
            private final boolean canSkipInvocation;
521
            private final OptionalBool needsUncheckedConversion;
522
            private final boolean failed;
523
            private final @Nullable MethodUsageMirror expr;
524

525
            MethodCtDecl(JMethodSig methodType,
526
                         MethodResolutionPhase resolvePhase,
527
                         boolean canSkipInvocation,
528
                         OptionalBool needsUncheckedConversion,
529
                         boolean failed,
530
                         @Nullable MethodUsageMirror expr) {
1✔
531
                this.methodType = methodType;
1✔
532
                this.resolvePhase = resolvePhase;
1✔
533
                this.canSkipInvocation = canSkipInvocation;
1✔
534
                this.needsUncheckedConversion = needsUncheckedConversion;
1✔
535
                this.failed = failed;
1✔
536
                this.expr = expr;
1✔
537
            }
1✔
538

539
            // package-private:
540

541
            public MethodCtDecl withMethod(JMethodSig method) {
542
                return withMethod(method, failed);
1✔
543
            }
544

545
            MethodCtDecl withMethod(JMethodSig method, boolean failed) {
546
                return new MethodCtDecl(method, resolvePhase, canSkipInvocation, needsUncheckedConversion, failed, expr);
1✔
547
            }
548

549
            public MethodCtDecl withExpr(MethodUsageMirror expr) {
550
                return new MethodCtDecl(methodType, resolvePhase, canSkipInvocation, needsUncheckedConversion, failed, expr);
1✔
551
            }
552

553
            MethodCtDecl asFailed() {
554
                return withMethod(methodType, true);
1✔
555
            }
556

557
            boolean canSkipInvocation() {
558
                return canSkipInvocation;
1✔
559
            }
560

561
            MethodResolutionPhase getResolvePhase() {
562
                return resolvePhase;
1✔
563
            }
564

565
            static MethodCtDecl unresolved(TypeSystem ts) {
566
                return new MethodCtDecl(ts.UNRESOLVED_METHOD, STRICT, true, OptionalBool.UNKNOWN, true, null);
1✔
567
            }
568

569
            // public:
570

571

572
            @Override
573
            public JMethodSig getMethodType() {
574
                return methodType;
1✔
575
            }
576

577
            @Override
578
            public boolean needsUncheckedConversion() {
579
                return needsUncheckedConversion.isTrue();
1✔
580
            }
581

582
            @Override
583
            public boolean isVarargsCall() {
584
                return resolvePhase.requiresVarargs();
1✔
585
            }
586

587
            @Override
588
            public boolean isFailed() {
589
                return failed;
1✔
590
            }
591

592
            @Override
593
            public String toString() {
594
                return "CtDecl[phase=" + resolvePhase + ", method=" + methodType + ']';
×
595
            }
596

597
            @Override
598
            public @Nullable JTypeMirror getTypeToSearch() {
599
                return expr != null ? expr.getTypeToSearch() : null;
1✔
600
            }
601
        }
602
    }
603

604
    /**
605
     * An invocation mirror reflecting a constructor invocation expression.
606
     */
607
    interface CtorInvocationMirror extends InvocationMirror {
608

609
        /**
610
         * Return the type name being instantiated. If the constructor call
611
         * is a diamond invocation (or no type args), returns the generic type declaration.
612
         * Otherwise returns the parameterised type. If the call declares
613
         * an anonymous class, then this does *not* return the anonymous
614
         * type, but its explicit supertype.
615
         *
616
         * <ul>
617
         *  <li>e.g. for {@code new ArrayList<>()}, returns {@code ArrayList<T>}.
618
         *  <li>e.g. for {@code new ArrayList()}, returns {@code ArrayList}.
619
         *  <li>e.g. for {@code new ArrayList<String>()}, returns {@code ArrayList<String>}.
620
         *  <li>e.g. for {@code new Runnable() {}} (anonymous), returns {@code Runnable}.
621
         * </ul>
622
         *
623
         * <p>Note that this returns a {@link JClassType} in valid code.
624
         * Other return values may be eg {@link TypeSystem#UNKNOWN}, or
625
         * a {@link JTypeVar}, but indicate malformed code.
626
         */
627
        @NonNull JTypeMirror getNewType();
628

629
        /**
630
         * True if this creates an anonymous class. Since java 9 those
631
         * can also be diamond-inferred.
632
         */
633
        boolean isAnonymous();
634

635
        /**
636
         * Return true if this is a diamond constructor call. In that
637
         * case the type parameters of the created instance must be inferred.
638
         * Returns false if the constructor call mentions no type arguments.
639
         * <ul>
640
         *  <li>e.g. for {@code new ArrayList<>()}, returns true.
641
         *  <li>e.g. for {@code new ArrayList()}, returns false.
642
         *  <li>e.g. for {@code new ArrayList<String>()}, returns false.
643
         * </ul>
644
         */
645
        boolean isDiamond();
646

647

648
        /**
649
         * {@inheritDoc}
650
         *
651
         * <p>Returns the constructor of the {@link #getNewType()}. If
652
         * this is an anonymous class declaration implementing an interface,
653
         * then returns the constructors of class {@link Object}.
654
         *
655
         * <p>This default implementation uses {@link #getAccessibleCandidates(JTypeMirror)},
656
         * which should be implemented instead.
657
         */
658
        @Override
659
        default Iterable<JMethodSig> getAccessibleCandidates() {
660
            return getAccessibleCandidates(getNewType());
1✔
661
        }
662

663
        /**
664
         * Returns the accessible candidates for this node, as if {@link #getNewType()}
665
         * returned the type passed as parameter. Since candidates depend on the
666
         * new type, this allows us to write simple "spy" wrappers to redo an invocation
667
         * in different conditions (ie, pretending the newtype is the parameter)
668
         *
669
         * @param newType Assumed value of {@link #getNewType()}
670
         */
671
        Iterable<JMethodSig> getAccessibleCandidates(JTypeMirror newType);
672

673

674
        /** Must return {@link JConstructorSymbol#CTOR_NAME}. */
675
        @Override
676
        default String getName() {
677
            return JConstructorSymbol.CTOR_NAME;
×
678
        }
679

680

681
    }
682
}
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