File tree Expand file tree Collapse file tree 3 files changed +21
-2
lines changed
src/main/java/eth/likespro/commons/reflection Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Original file line number Diff line number Diff line change 1- Enhance EncodableResult with additional utility methods and documentation
1+ Add ReflectionUtils class with a .boxed() method to box primitives
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ plugins {
55}
66
77group = ' eth.likespro'
8- version = ' 1.6 .0'
8+ version = ' 1.7 .0'
99
1010sourceCompatibility = 17
1111targetCompatibility = 17
Original file line number Diff line number Diff line change 1+ package eth.likespro.commons.reflection
2+
3+ import java.lang.reflect.Type
4+
5+ class ReflectionUtils {
6+ companion object {
7+ fun Type.boxed (): Type = when (this ) {
8+ java.lang.Boolean .TYPE -> java.lang.Boolean ::class .java
9+ java.lang.Byte .TYPE -> java.lang.Byte ::class .java
10+ java.lang.Short .TYPE -> java.lang.Short ::class .java
11+ java.lang.Character .TYPE -> java.lang.Character ::class .java
12+ java.lang.Integer .TYPE -> java.lang.Integer ::class .java
13+ java.lang.Long .TYPE -> java.lang.Long ::class .java
14+ java.lang.Float .TYPE -> java.lang.Float ::class .java
15+ java.lang.Double .TYPE -> java.lang.Double ::class .java
16+ else -> this
17+ }
18+ }
19+ }
You can’t perform that action at this time.
0 commit comments