From f108b3a6a7a7d7cc734c7ca1bdf1167b593224e6 Mon Sep 17 00:00:00 2001 From: Sam Gammon Date: Fri, 15 Mar 2024 16:59:25 -0700 Subject: [PATCH] feat: add support for jpms - chore: add mvn build wrapper - chore: add java9-compliant implementations where needed - chore: remove `Automatic-Module-Name` Fixes and closes leangen/geantyref#28 Signed-off-by: Sam Gammon --- pom.xml | 4 +++- .../io/leangen/geantyref/AnnotatedArrayTypeImpl.java | 5 +++++ .../geantyref/AnnotatedParameterizedTypeImpl.java | 5 +++++ .../leangen/geantyref/AnnotatedTypeVariableImpl.java | 5 +++++ .../leangen/geantyref/AnnotatedWildcardTypeImpl.java | 5 +++++ src/main/java/module-info.java | 12 ++++++++++++ 6 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 src/main/java/module-info.java diff --git a/pom.xml b/pom.xml index aa848aa..8ef4a8a 100644 --- a/pom.xml +++ b/pom.xml @@ -59,7 +59,9 @@ maven-compiler-plugin 3.12.1 - 8 + 9 + 9 + 9 diff --git a/src/main/java/io/leangen/geantyref/AnnotatedArrayTypeImpl.java b/src/main/java/io/leangen/geantyref/AnnotatedArrayTypeImpl.java index cc72c1a..58c5a2a 100644 --- a/src/main/java/io/leangen/geantyref/AnnotatedArrayTypeImpl.java +++ b/src/main/java/io/leangen/geantyref/AnnotatedArrayTypeImpl.java @@ -45,4 +45,9 @@ public int hashCode() { public String toString() { return componentType.toString() + " " + annotationsString() + "[]"; } + + @Override + public AnnotatedType getAnnotatedOwnerType() { + return null; + } } diff --git a/src/main/java/io/leangen/geantyref/AnnotatedParameterizedTypeImpl.java b/src/main/java/io/leangen/geantyref/AnnotatedParameterizedTypeImpl.java index ecbd5a2..b64a405 100644 --- a/src/main/java/io/leangen/geantyref/AnnotatedParameterizedTypeImpl.java +++ b/src/main/java/io/leangen/geantyref/AnnotatedParameterizedTypeImpl.java @@ -57,4 +57,9 @@ public String toString() { typeName.append(rawName); return annotationsString() + typeName + "<" + typesString(typeArguments) + ">"; } + + @Override + public AnnotatedType getAnnotatedOwnerType() { + return null; + } } diff --git a/src/main/java/io/leangen/geantyref/AnnotatedTypeVariableImpl.java b/src/main/java/io/leangen/geantyref/AnnotatedTypeVariableImpl.java index 7f94eb0..d41254a 100644 --- a/src/main/java/io/leangen/geantyref/AnnotatedTypeVariableImpl.java +++ b/src/main/java/io/leangen/geantyref/AnnotatedTypeVariableImpl.java @@ -46,4 +46,9 @@ public boolean equals(Object other) { public String toString() { return annotationsString() + ((TypeVariable) type).getName(); } + + @Override + public AnnotatedType getAnnotatedOwnerType() { + return null; + } } diff --git a/src/main/java/io/leangen/geantyref/AnnotatedWildcardTypeImpl.java b/src/main/java/io/leangen/geantyref/AnnotatedWildcardTypeImpl.java index e046fc4..5587493 100644 --- a/src/main/java/io/leangen/geantyref/AnnotatedWildcardTypeImpl.java +++ b/src/main/java/io/leangen/geantyref/AnnotatedWildcardTypeImpl.java @@ -87,4 +87,9 @@ private static void validateBounds(WildcardType type, AnnotatedType[] lowerBound } } } + + @Override + public AnnotatedType getAnnotatedOwnerType() { + return null; + } } diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java new file mode 100644 index 0000000..7a45cb6 --- /dev/null +++ b/src/main/java/module-info.java @@ -0,0 +1,12 @@ +/* + * License: Apache License, Version 2.0 + * See the LICENSE file in the root directory or at apache.org. + */ + +/** + * GenTyRef - Type reflection library for Java + */ +module io.leangen.geantyref { + requires static java.desktop; + exports io.leangen.geantyref; +}