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

AuthMe / ConfigMe / 7041999669

30 Nov 2023 04:25AM UTC coverage: 99.413%. Remained the same
7041999669

Pull #401

github

web-flow
Bump actions/setup-java from 3 to 4

Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3 to 4.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Pull Request #401: Bump actions/setup-java from 3 to 4

527 of 540 branches covered (0.0%)

1524 of 1533 relevant lines covered (99.41%)

4.57 hits per line

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

100.0
/src/main/java/ch/jalu/configme/beanmapper/leafvaluehandler/LeafValueHandler.java
1
package ch.jalu.configme.beanmapper.leafvaluehandler;
2

3
import ch.jalu.configme.beanmapper.context.ExportContext;
4
import ch.jalu.configme.beanmapper.context.MappingContext;
5
import org.jetbrains.annotations.NotNull;
6
import org.jetbrains.annotations.Nullable;
7

8
/**
9
 * The leaf value handler is used in {@link ch.jalu.configme.beanmapper.MapperImpl} to convert "simple" values that
10
 * were read from a resource to its desired type.
11
 * <p>
12
 * The bean mapper handles complex types such as maps and collections, and recursively calls the bean mapping process
13
 * accordingly. This class complements the mapper by halting this process and providing "leaf values" to be set into
14
 * Java beans.
15
 * <p>
16
 * The default implementation is {@link LeafValueHandlerImpl}. With the aid of {@link MapperLeafType} entries, it
17
 * provides conversions for the leaf types it supports. To implement additional conversions, implement your own
18
 * {@link MapperLeafType} implementations and add them to {@link LeafValueHandlerImpl}. Alternatively, you can create
19
 * your own implementation of this interface if you need more control over the conversion process.
20
 */
21
public interface LeafValueHandler {
22

23
    /**
24
     * Converts the given value to the target type (as defined by the mapping context), if supported. Otherwise,
25
     * null is returned. If a value is returned, its type is guaranteed to match the target type.
26
     *
27
     * @param value the value to convert (read from a property resource)
28
     * @param mappingContext mapping context with the target type
29
     * @return the converted value, or null if not applicable
30
     */
31
    @Nullable Object convert(@Nullable Object value, @NotNull MappingContext mappingContext);
32

33
    /**
34
     * Converts the value of a property to a value suitable for exporting. This method converts the opposite
35
     * way of {@link #convert}. Null is returned if this leaf value handler does not support the object's type.
36
     *
37
     * @param value the value to convert
38
     * @param exportContext the export context (usually not needed)
39
     * @return the value suitable for exporting, or null if not applicable
40
     */
41
    @Nullable Object toExportValue(@Nullable Object value, @NotNull ExportContext exportContext);
42

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

© 2025 Coveralls, Inc