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

raphw / byte-buddy / #791

16 Aug 2025 09:47PM UTC coverage: 85.128% (+0.001%) from 85.127%
#791

push

raphw
[release] Release new version

29558 of 34722 relevant lines covered (85.13%)

0.85 hits per line

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

83.33
/byte-buddy-dep/src/main/java/net/bytebuddy/description/method/ParameterList.java
1
/*
2
 * Copyright 2014 - Present Rafael Winterhalter
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 net.bytebuddy.description.method;
17

18
import net.bytebuddy.build.AccessControllerPlugin;
19
import net.bytebuddy.description.ByteCodeElement;
20
import net.bytebuddy.description.type.TypeDefinition;
21
import net.bytebuddy.description.type.TypeDescription;
22
import net.bytebuddy.description.type.TypeList;
23
import net.bytebuddy.matcher.ElementMatcher;
24
import net.bytebuddy.matcher.FilterableList;
25
import net.bytebuddy.utility.dispatcher.JavaDispatcher;
26

27
import java.lang.reflect.Constructor;
28
import java.lang.reflect.Method;
29
import java.security.PrivilegedAction;
30
import java.util.ArrayList;
31
import java.util.Arrays;
32
import java.util.List;
33

34
/**
35
 * Represents a list of parameters of a method or a constructor.
36
 *
37
 * @param <T> The type of parameter descriptions represented by this list.
38
 */
39
public interface ParameterList<T extends ParameterDescription> extends FilterableList<T, ParameterList<T>> {
40

41
    /**
42
     * Transforms this list of parameters into a list of the types of the represented parameters.
43
     *
44
     * @return A list of types representing the parameters of this list.
45
     */
46
    TypeList.Generic asTypeList();
47

48
    /**
49
     * Transforms the list of parameter descriptions into a list of detached tokens. All types that are matched by the provided
50
     * target type matcher are substituted by {@link net.bytebuddy.dynamic.TargetType}.
51
     *
52
     * @param matcher A matcher that indicates type substitution.
53
     * @return The transformed token list.
54
     */
55
    ByteCodeElement.Token.TokenList<ParameterDescription.Token> asTokenList(ElementMatcher<? super TypeDescription> matcher);
56

57
    /**
58
     * Returns this list of these parameter descriptions resolved to their defined shape.
59
     *
60
     * @return A list of parameters in their defined shape.
61
     */
62
    ParameterList<ParameterDescription.InDefinedShape> asDefined();
63

64
    /**
65
     * Checks if all parameters in this list define both an explicit name and an explicit modifier.
66
     *
67
     * @return {@code true} if all parameters in this list define both an explicit name and an explicit modifier.
68
     */
69
    boolean hasExplicitMetaData();
70

71
    /**
72
     * An base implementation for a {@link ParameterList}.
73
     *
74
     * @param <S> The type of parameter descriptions represented by this list.
75
     */
76
    abstract class AbstractBase<S extends ParameterDescription> extends FilterableList.AbstractBase<S, ParameterList<S>> implements ParameterList<S> {
1✔
77

78
        /**
79
         * {@inheritDoc}
80
         */
81
        public boolean hasExplicitMetaData() {
82
            int size = size();
1✔
83
            for (int index = 0; index < size; index++) { // Avoid iterator on potential hot path.
1✔
84
                ParameterDescription parameterDescription = get(index);
1✔
85
                if (!parameterDescription.isNamed() || !parameterDescription.hasModifiers()) {
1✔
86
                    return false;
1✔
87
                }
88
            }
89
            return true;
1✔
90
        }
91

92
        /**
93
         * {@inheritDoc}
94
         */
95
        public ByteCodeElement.Token.TokenList<ParameterDescription.Token> asTokenList(ElementMatcher<? super TypeDescription> matcher) {
96
            int size = size();
1✔
97
            List<ParameterDescription.Token> tokens = new ArrayList<ParameterDescription.Token>(size);
1✔
98
            for (int index = 0; index < size; index++) {  // Avoid iterator on potential hot path.
1✔
99
                tokens.add(get(index).asToken(matcher));
1✔
100
            }
101
            return new ByteCodeElement.Token.TokenList<ParameterDescription.Token>(tokens);
1✔
102
        }
103

104
        /**
105
         * {@inheritDoc}
106
         */
107
        public TypeList.Generic asTypeList() {
108
            int size = size();
1✔
109
            List<TypeDescription.Generic> types = new ArrayList<TypeDescription.Generic>(size);
1✔
110
            for (int index = 0; index < size; index++) { // Avoid iterator on potential hot path.
1✔
111
                types.add(get(index).getType());
1✔
112
            }
113
            return new TypeList.Generic.Explicit(types);
1✔
114
        }
115

116
        /**
117
         * {@inheritDoc}
118
         */
119
        public ParameterList<ParameterDescription.InDefinedShape> asDefined() {
120
            int size = size();
1✔
121
            List<ParameterDescription.InDefinedShape> declaredForms = new ArrayList<ParameterDescription.InDefinedShape>(size);
1✔
122
            for (int index = 0; index < size; index++) { // Avoid iterator on potential hot path.
1✔
123
                declaredForms.add(get(index).asDefined());
1✔
124
            }
125
            return new Explicit<ParameterDescription.InDefinedShape>(declaredForms);
1✔
126
        }
127

128
        @Override
129
        protected ParameterList<S> wrap(List<S> values) {
130
            return new Explicit<S>(values);
1✔
131
        }
132
    }
133

134
    /**
135
     * Represents a list of parameters for an executable, i.e. a {@link java.lang.reflect.Method} or {@link java.lang.reflect.Constructor}.
136
     *
137
     * @param <T> The type of the {@code java.lang.reflect.Executable} that this list represents.
138
     */
139
    abstract class ForLoadedExecutable<T> extends AbstractBase<ParameterDescription.InDefinedShape> {
140

141
        /**
142
         * The dispatcher used creating parameter list instances and for accessing {@code java.lang.reflect.Executable} instances.
143
         */
144
        protected static final Executable EXECUTABLE = doPrivileged(JavaDispatcher.of(Executable.class));
1✔
145

146
        /**
147
         * The executable for which a parameter list is represented.
148
         */
149
        protected final T executable;
150

151
        /**
152
         * The parameter annotation source to query.
153
         */
154
        protected final ParameterDescription.ForLoadedParameter.ParameterAnnotationSource parameterAnnotationSource;
155

156
        /**
157
         * The number of parameters of this executable, 0 if the size was not yet computed, or -1 if the list is empty.
158
         * This avoids recomputation what can lead to an unreasonable performance impact if placed on a hot execution
159
         * path. This field is not volatile as the result is stable and can be recomputed from different threads.
160
         */
161
        private int size;
162

163
        /**
164
         * Creates a new description for a loaded executable.
165
         *
166
         * @param executable                The executable for which a parameter list is represented.
167
         * @param parameterAnnotationSource The parameter annotation source to query.
168
         */
169
        protected ForLoadedExecutable(T executable, ParameterDescription.ForLoadedParameter.ParameterAnnotationSource parameterAnnotationSource) {
1✔
170
            this.executable = executable;
1✔
171
            this.parameterAnnotationSource = parameterAnnotationSource;
1✔
172
        }
1✔
173

174
        /**
175
         * A proxy for {@code java.security.AccessController#doPrivileged} that is activated if available.
176
         *
177
         * @param action The action to execute from a privileged context.
178
         * @param <T>    The type of the action's resolved value.
179
         * @return The action's resolved value.
180
         */
181
        @AccessControllerPlugin.Enhance
182
        private static <T> T doPrivileged(PrivilegedAction<T> action) {
183
            return action.run();
×
184
        }
185

186
        /**
187
         * Creates a new list that describes the parameters of the given {@link Constructor}.
188
         *
189
         * @param constructor The constructor for which the parameters should be described.
190
         * @return A list describing the constructor's parameters.
191
         */
192
        public static ParameterList<ParameterDescription.InDefinedShape> of(Constructor<?> constructor) {
193
            return of(constructor, new ParameterDescription.ForLoadedParameter.ParameterAnnotationSource.ForLoadedConstructor(constructor));
×
194
        }
195

196
        /**
197
         * Creates a new list that describes the parameters of the given {@link Constructor}.
198
         *
199
         * @param constructor               The constructor for which the parameters should be described.
200
         * @param parameterAnnotationSource The parameter annotation source to query.
201
         * @return A list describing the constructor's parameters.
202
         */
203
        public static ParameterList<ParameterDescription.InDefinedShape> of(Constructor<?> constructor,
204
                                                                            ParameterDescription.ForLoadedParameter.ParameterAnnotationSource parameterAnnotationSource) {
205
            return EXECUTABLE.isInstance(constructor)
1✔
206
                    ? new OfConstructor(constructor, parameterAnnotationSource)
207
                    : new OfLegacyVmConstructor(constructor, parameterAnnotationSource);
208
        }
209

210
        /**
211
         * Creates a new list that describes the parameters of the given {@link Method}.
212
         *
213
         * @param method The method for which the parameters should be described.
214
         * @return A list describing the method's parameters.
215
         */
216
        public static ParameterList<ParameterDescription.InDefinedShape> of(Method method) {
217
            return of(method, new ParameterDescription.ForLoadedParameter.ParameterAnnotationSource.ForLoadedMethod(method));
×
218
        }
219

220
        /**
221
         * Creates a new list that describes the parameters of the given {@link Method}.
222
         *
223
         * @param method                    The method for which the parameters should be described.
224
         * @param parameterAnnotationSource The parameter annotation source to query.
225
         * @return A list describing the method's parameters.
226
         */
227
        public static ParameterList<ParameterDescription.InDefinedShape> of(Method method,
228
                                                                            ParameterDescription.ForLoadedParameter.ParameterAnnotationSource parameterAnnotationSource) {
229
            return EXECUTABLE.isInstance(method)
1✔
230
                    ? new OfMethod(method, parameterAnnotationSource)
231
                    : new OfLegacyVmMethod(method, parameterAnnotationSource);
232
        }
233

234
        /**
235
         * {@inheritDoc}
236
         */
237
        public int size() {
238
            int size = this.size;
1✔
239
            if (size == 0) {
1✔
240
                int actual = EXECUTABLE.getParameterCount(executable);
1✔
241
                this.size = size = actual == 0 ? -1 : actual;
1✔
242
            }
243
            return size == -1 ? 0 : size;
1✔
244
        }
245

246
        /**
247
         * A dispatcher for creating descriptions of parameter lists and for evaluating the size of an {@code java.lang.reflect.Executable}'s parameters.
248
         */
249
        @JavaDispatcher.Proxied("java.lang.reflect.Executable")
250
        protected interface Executable {
251

252
            /**
253
             * Checks if the supplied instance is a {@code java.lang.reflect.Executable}.
254
             *
255
             * @param value The value to check for being a {@code java.lang.reflect.Executable}.
256
             * @return {@code true} if the supplied instance is a {@code java.lang.reflect.Executable}.
257
             */
258
            @JavaDispatcher.Instance
259
            boolean isInstance(Object value);
260

261
            /**
262
             * Returns the amount of parameters of a given executable..
263
             *
264
             * @param executable The executable for which the amount of parameters should be found.
265
             * @return The amount of parameters of the given executable.
266
             */
267
            int getParameterCount(Object executable);
268

269
            /**
270
             * Returns the parameters of an executable.
271
             *
272
             * @param value The executable to introspect.
273
             * @return An array of the parameters of the supplied executable.
274
             */
275
            Object[] getParameters(Object value);
276
        }
277

278
        /**
279
         * Describes the list of {@link Constructor} parameters on a modern VM.
280
         */
281
        protected static class OfConstructor extends ForLoadedExecutable<Constructor<?>> {
282

283
            /**
284
             * Creates a new description of the parameters of a constructor.
285
             *
286
             * @param constructor               The constructor that is represented by this instance.
287
             * @param parameterAnnotationSource The parameter annotation source to query.
288
             */
289
            protected OfConstructor(Constructor<?> constructor, ParameterDescription.ForLoadedParameter.ParameterAnnotationSource parameterAnnotationSource) {
290
                super(constructor, parameterAnnotationSource);
1✔
291
            }
1✔
292

293
            /**
294
             * {@inheritDoc}
295
             */
296
            public ParameterDescription.InDefinedShape get(int index) {
297
                return new ParameterDescription.ForLoadedParameter.OfConstructor(executable, index, parameterAnnotationSource);
1✔
298
            }
299
        }
300

301
        /**
302
         * Describes the list of {@link Method} parameters on a modern VM.
303
         */
304
        protected static class OfMethod extends ForLoadedExecutable<Method> {
305

306
            /**
307
             * Creates a new description of the parameters of a method.
308
             *
309
             * @param method                    The method that is represented by this instance.
310
             * @param parameterAnnotationSource The parameter annotation source to query.
311
             */
312
            protected OfMethod(Method method, ParameterDescription.ForLoadedParameter.ParameterAnnotationSource parameterAnnotationSource) {
313
                super(method, parameterAnnotationSource);
1✔
314
            }
1✔
315

316
            /**
317
             * {@inheritDoc}
318
             */
319
            public ParameterDescription.InDefinedShape get(int index) {
320
                return new ParameterDescription.ForLoadedParameter.OfMethod(executable, index, parameterAnnotationSource);
1✔
321
            }
322
        }
323

324
        /**
325
         * Represents a list of constructor parameters on virtual machines where the {@code java.lang.reflect.Parameter}
326
         * type is not available.
327
         */
328
        protected static class OfLegacyVmConstructor extends ParameterList.AbstractBase<ParameterDescription.InDefinedShape> {
329

330
            /**
331
             * The represented constructor.
332
             */
333
            private final Constructor<?> constructor;
334

335
            /**
336
             * An array of this method's parameter types.
337
             */
338
            private final Class<?>[] parameterType;
339

340
            /**
341
             * The parameter annotation source to query.
342
             */
343
            private final ParameterDescription.ForLoadedParameter.ParameterAnnotationSource parameterAnnotationSource;
344

345
            /**
346
             * Creates a legacy representation of a constructor's parameters.
347
             *
348
             * @param constructor               The constructor to represent.
349
             * @param parameterAnnotationSource The parameter annotation source to query.
350
             */
351
            protected OfLegacyVmConstructor(Constructor<?> constructor, ParameterDescription.ForLoadedParameter.ParameterAnnotationSource parameterAnnotationSource) {
×
352
                this.constructor = constructor;
×
353
                this.parameterType = constructor.getParameterTypes();
×
354
                this.parameterAnnotationSource = parameterAnnotationSource;
×
355
            }
×
356

357
            /**
358
             * {@inheritDoc}
359
             */
360
            public ParameterDescription.InDefinedShape get(int index) {
361
                return new ParameterDescription.ForLoadedParameter.OfLegacyVmConstructor(constructor, index, parameterType, parameterAnnotationSource);
×
362
            }
363

364
            /**
365
             * {@inheritDoc}
366
             */
367
            public int size() {
368
                return parameterType.length;
×
369
            }
370
        }
371

372
        /**
373
         * Represents a list of method parameters on virtual machines where the {@code java.lang.reflect.Parameter}
374
         * type is not available.
375
         */
376
        protected static class OfLegacyVmMethod extends ParameterList.AbstractBase<ParameterDescription.InDefinedShape> {
377

378
            /**
379
             * The represented method.
380
             */
381
            private final Method method;
382

383
            /**
384
             * An array of this method's parameter types.
385
             */
386
            private final Class<?>[] parameterType;
387

388
            /**
389
             * The parameter annotation source to query.
390
             */
391
            private final ParameterDescription.ForLoadedParameter.ParameterAnnotationSource parameterAnnotationSource;
392

393
            /**
394
             * Creates a legacy representation of a method's parameters.
395
             *
396
             * @param method                    The method to represent.
397
             * @param parameterAnnotationSource The parameter annotation source to query.
398
             */
399
            protected OfLegacyVmMethod(Method method, ParameterDescription.ForLoadedParameter.ParameterAnnotationSource parameterAnnotationSource) {
×
400
                this.method = method;
×
401
                this.parameterType = method.getParameterTypes();
×
402
                this.parameterAnnotationSource = parameterAnnotationSource;
×
403
            }
×
404

405
            /**
406
             * {@inheritDoc}
407
             */
408
            public ParameterDescription.InDefinedShape get(int index) {
409
                return new ParameterDescription.ForLoadedParameter.OfLegacyVmMethod(method, index, parameterType, parameterAnnotationSource);
×
410
            }
411

412
            /**
413
             * {@inheritDoc}
414
             */
415
            public int size() {
416
                return parameterType.length;
×
417
            }
418
        }
419
    }
420

421
    /**
422
     * A list of explicitly provided parameter descriptions.
423
     *
424
     * @param <S> The type of parameter descriptions represented by this list.
425
     */
426
    class Explicit<S extends ParameterDescription> extends AbstractBase<S> {
427

428
        /**
429
         * The list of parameter descriptions that are represented by this list.
430
         */
431
        private final List<? extends S> parameterDescriptions;
432

433
        /**
434
         * Creates a new list of explicit parameter descriptions.
435
         *
436
         * @param parameterDescription The list of parameter descriptions that are represented by this list.
437
         */
438
        @SuppressWarnings("unchecked")
439
        public Explicit(S... parameterDescription) {
440
            this(Arrays.asList(parameterDescription));
1✔
441
        }
1✔
442

443
        /**
444
         * Creates a new list of explicit parameter descriptions.
445
         *
446
         * @param parameterDescriptions The list of parameter descriptions that are represented by this list.
447
         */
448
        public Explicit(List<? extends S> parameterDescriptions) {
1✔
449
            this.parameterDescriptions = parameterDescriptions;
1✔
450
        }
1✔
451

452
        /**
453
         * {@inheritDoc}
454
         */
455
        public S get(int index) {
456
            return parameterDescriptions.get(index);
1✔
457
        }
458

459
        /**
460
         * {@inheritDoc}
461
         */
462
        public int size() {
463
            return parameterDescriptions.size();
1✔
464
        }
465

466
        /**
467
         * A parameter list representing parameters without meta data or annotations.
468
         */
469
        public static class ForTypes extends ParameterList.AbstractBase<ParameterDescription.InDefinedShape> {
470

471
            /**
472
             * The method description that declares the parameters.
473
             */
474
            private final MethodDescription.InDefinedShape methodDescription;
475

476
            /**
477
             * A list of detached types representing the parameters.
478
             */
479
            private final List<? extends TypeDefinition> typeDefinitions;
480

481
            /**
482
             * Creates a new parameter type list.
483
             *
484
             * @param methodDescription The method description that declares the parameters.
485
             * @param typeDefinition    A list of detached types representing the parameters.
486
             */
487
            public ForTypes(MethodDescription.InDefinedShape methodDescription, TypeDefinition... typeDefinition) {
488
                this(methodDescription, Arrays.asList(typeDefinition));
1✔
489
            }
1✔
490

491
            /**
492
             * Creates a new parameter type list.
493
             *
494
             * @param methodDescription The method description that declares the parameters.
495
             * @param typeDefinitions   A list of detached types representing the parameters.
496
             */
497
            public ForTypes(MethodDescription.InDefinedShape methodDescription, List<? extends TypeDefinition> typeDefinitions) {
1✔
498
                this.methodDescription = methodDescription;
1✔
499
                this.typeDefinitions = typeDefinitions;
1✔
500
            }
1✔
501

502
            /**
503
             * {@inheritDoc}
504
             */
505
            public ParameterDescription.InDefinedShape get(int index) {
506
                int offset = methodDescription.isStatic() ? 0 : 1;
1✔
507
                for (int previous = 0; previous < index; previous++) {
1✔
508
                    offset += typeDefinitions.get(previous).getStackSize().getSize();
1✔
509
                }
510
                return new ParameterDescription.Latent(methodDescription, typeDefinitions.get(index).asGenericType(), index, offset);
1✔
511
            }
512

513
            /**
514
             * {@inheritDoc}
515
             */
516
            public int size() {
517
                return typeDefinitions.size();
1✔
518
            }
519
        }
520
    }
521

522
    /**
523
     * A list of parameter descriptions for a list of detached tokens. For the returned parameter, each token is attached to its parameter representation.
524
     */
525
    class ForTokens extends AbstractBase<ParameterDescription.InDefinedShape> {
526

527
        /**
528
         * The method that is declaring the represented token.
529
         */
530
        private final MethodDescription.InDefinedShape declaringMethod;
531

532
        /**
533
         * The list of tokens to represent.
534
         */
535
        private final List<? extends ParameterDescription.Token> tokens;
536

537
        /**
538
         * Creates a new parameter list for the provided tokens.
539
         *
540
         * @param declaringMethod The method that is declaring the represented token.
541
         * @param tokens          The list of tokens to represent.
542
         */
543
        public ForTokens(MethodDescription.InDefinedShape declaringMethod, List<? extends ParameterDescription.Token> tokens) {
1✔
544
            this.declaringMethod = declaringMethod;
1✔
545
            this.tokens = tokens;
1✔
546
        }
1✔
547

548
        /**
549
         * {@inheritDoc}
550
         */
551
        public ParameterDescription.InDefinedShape get(int index) {
552
            int offset = declaringMethod.isStatic() ? 0 : 1;
1✔
553
            for (ParameterDescription.Token token : tokens.subList(0, index)) {
1✔
554
                offset += token.getType().getStackSize().getSize();
1✔
555
            }
1✔
556
            return new ParameterDescription.Latent(declaringMethod, tokens.get(index), index, offset);
1✔
557
        }
558

559
        /**
560
         * {@inheritDoc}
561
         */
562
        public int size() {
563
            return tokens.size();
1✔
564
        }
565
    }
566

567
    /**
568
     * A list of parameter descriptions that yields {@link net.bytebuddy.description.method.ParameterDescription.TypeSubstituting}.
569
     */
570
    class TypeSubstituting extends AbstractBase<ParameterDescription.InGenericShape> {
571

572
        /**
573
         * The method that is declaring the transformed parameters.
574
         */
575
        private final MethodDescription.InGenericShape declaringMethod;
576

577
        /**
578
         * The untransformed parameters that are represented by this list.
579
         */
580
        private final List<? extends ParameterDescription> parameterDescriptions;
581

582
        /**
583
         * The visitor to apply to the parameter types before returning them.
584
         */
585
        private final TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor;
586

587
        /**
588
         * The number of parameters of this executable, 0 if the size was not yet computed, or -1 if the list is empty.
589
         * This avoids recomputation what can lead to an unreasonable performance impact if placed on a hot execution
590
         * path. This field is not volatile as the result is stable and can be recomputed from different threads.
591
         */
592
        private int size;
593

594
        /**
595
         * Creates a new type substituting parameter list.
596
         *
597
         * @param declaringMethod       The method that is declaring the transformed parameters.
598
         * @param parameterDescriptions The untransformed parameters that are represented by this list.
599
         * @param visitor               The visitor to apply to the parameter types before returning them.
600
         */
601
        public TypeSubstituting(MethodDescription.InGenericShape declaringMethod,
602
                                List<? extends ParameterDescription> parameterDescriptions,
603
                                TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor) {
1✔
604
            this.declaringMethod = declaringMethod;
1✔
605
            this.parameterDescriptions = parameterDescriptions;
1✔
606
            this.visitor = visitor;
1✔
607
        }
1✔
608

609
        /**
610
         * {@inheritDoc}
611
         */
612
        public ParameterDescription.InGenericShape get(int index) {
613
            return new ParameterDescription.TypeSubstituting(declaringMethod, parameterDescriptions.get(index), visitor);
1✔
614
        }
615

616
        /**
617
         * {@inheritDoc}
618
         */
619
        public int size() {
620
            int size = this.size;
1✔
621
            if (size == 0) {
1✔
622
                int actual = parameterDescriptions.size();
1✔
623
                this.size = size = actual == 0 ? -1 : actual;
1✔
624
            }
625
            return size == -1 ? 0 : size;
1✔
626
        }
627
    }
628

629
    /**
630
     * An empty list of parameters.
631
     *
632
     * @param <S> The type of parameter descriptions represented by this list.
633
     */
634
    class Empty<S extends ParameterDescription> extends FilterableList.Empty<S, ParameterList<S>> implements ParameterList<S> {
1✔
635

636
        /**
637
         * {@inheritDoc}
638
         */
639
        public boolean hasExplicitMetaData() {
640
            return true;
1✔
641
        }
642

643
        /**
644
         * {@inheritDoc}
645
         */
646
        public TypeList.Generic asTypeList() {
647
            return new TypeList.Generic.Empty();
1✔
648
        }
649

650
        /**
651
         * {@inheritDoc}
652
         */
653
        public ByteCodeElement.Token.TokenList<ParameterDescription.Token> asTokenList(ElementMatcher<? super TypeDescription> matcher) {
654
            return new ByteCodeElement.Token.TokenList<ParameterDescription.Token>();
1✔
655
        }
656

657
        /**
658
         * {@inheritDoc}
659
         */
660
        @SuppressWarnings("unchecked")
661
        public ParameterList<ParameterDescription.InDefinedShape> asDefined() {
662
            return (ParameterList<ParameterDescription.InDefinedShape>) this;
1✔
663
        }
664
    }
665
}
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