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

TAKETODAY / today-infrastructure / 20847030722

09 Jan 2026 09:15AM UTC coverage: 84.443%. Remained the same
20847030722

push

github

TAKETODAY
:memo: 版权声明更新

62276 of 78862 branches covered (78.97%)

Branch coverage included in aggregate %.

147107 of 169096 relevant lines covered (87.0%)

3.71 hits per line

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

0.0
today-context/src/main/java/infra/context/annotation/MetadataReaderConsumer.java
1
/*
2
 * Copyright 2017 - 2026 the TODAY authors.
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
 *      https://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

17
package infra.context.annotation;
18

19
import java.io.IOException;
20
import java.util.Objects;
21
import java.util.function.Consumer;
22

23
import infra.core.type.classreading.MetadataReader;
24
import infra.core.type.classreading.MetadataReaderFactory;
25

26
/**
27
 * MetadataReader Consumer
28
 *
29
 * @author <a href="https://github.com/TAKETODAY">Harry Yang</a>
30
 * @see MetadataReader
31
 * @since 4.0 2021/12/18 15:19
32
 */
33
@FunctionalInterface
34
public interface MetadataReaderConsumer {
35

36
  /**
37
   * Performs this operation on the given argument.
38
   *
39
   * @param metadataReader the metadata reader for the target class
40
   * @param factory a factory for obtaining metadata readers
41
   * for other classes (such as superclasses and interfaces)
42
   */
43
  void accept(MetadataReader metadataReader, MetadataReaderFactory factory) throws IOException;
44

45
  /**
46
   * Returns a composed {@code Consumer} that performs, in sequence, this
47
   * operation followed by the {@code after} operation. If performing either
48
   * operation throws an exception, it is relayed to the caller of the
49
   * composed operation.  If performing this operation throws an exception,
50
   * the {@code after} operation will not be performed.
51
   *
52
   * @param after the operation to perform after this operation
53
   * @return a composed {@code Consumer} that performs in sequence this
54
   * operation followed by the {@code after} operation
55
   * @throws NullPointerException if {@code after} is null
56
   * @see java.util.function.Consumer#andThen(Consumer)
57
   */
58
  default MetadataReaderConsumer andThen(MetadataReaderConsumer after) {
59
    Objects.requireNonNull(after);
×
60
    return (metadataReader, factory) -> {
×
61
      accept(metadataReader, factory);
×
62
      after.accept(metadataReader, factory);
×
63
    };
×
64
  }
65

66
}
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