From 59b4ceb3c9316492a8980a9b7edc618098168b4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jyri-Matti=20La=CC=88hteenma=CC=88ki?= Date: Tue, 16 Jan 2024 15:28:07 +0200 Subject: [PATCH] tuple39 --- .../utils/meta/CommonMetadataProcessor.java | 2 ++ .../solita/utils/meta/MetaConstructors.java | 25 ++++++++++++++++++ .../fi/solita/utils/meta/MetaMethods.java | 26 +++++++++++++++++++ 3 files changed, 53 insertions(+) diff --git a/src/main/java/fi/solita/utils/meta/CommonMetadataProcessor.java b/src/main/java/fi/solita/utils/meta/CommonMetadataProcessor.java index 734e10f..1406d6f 100644 --- a/src/main/java/fi/solita/utils/meta/CommonMetadataProcessor.java +++ b/src/main/java/fi/solita/utils/meta/CommonMetadataProcessor.java @@ -407,6 +407,7 @@ public Class getClassForMethods(int argCount) { case 36: return MetaMethods.M36.class; case 37: return MetaMethods.M37.class; case 38: return MetaMethods.M38.class; + case 39: return MetaMethods.M39.class; } throw new RuntimeException("Not implemented: F" + argCount); } @@ -458,6 +459,7 @@ public Class getClassForConstructors(int argCount) { case 36: return MetaConstructors.C36.class; case 37: return MetaConstructors.C37.class; case 38: return MetaConstructors.C38.class; + case 39: return MetaConstructors.C39.class; } throw new RuntimeException("Not implemented: F" + argCount); } diff --git a/src/main/java/fi/solita/utils/meta/MetaConstructors.java b/src/main/java/fi/solita/utils/meta/MetaConstructors.java index 73b80e6..5d1b8f1 100644 --- a/src/main/java/fi/solita/utils/meta/MetaConstructors.java +++ b/src/main/java/fi/solita/utils/meta/MetaConstructors.java @@ -981,4 +981,29 @@ public String toString() { return doToString(clazz, argClasses); } } + + public static abstract class C39 extends Function39 implements MetaConstructor,R> { + private transient Constructor $r; + private final Class clazz; + private final Class[] argClasses; + public C39(Class clazz, Class... argClasses) { + this.clazz = clazz; + this.argClasses = argClasses; + } + @Override + public List> getConstructorParameterTypes() { + return Collections.unmodifiableList(Arrays.asList(argClasses)); + } + @Override + public Constructor getMember() { + if ($r == null) { + $r = doGetMember(clazz, argClasses); + } + return $r; + } + @Override + public String toString() { + return doToString(clazz, argClasses); + } + } } diff --git a/src/main/java/fi/solita/utils/meta/MetaMethods.java b/src/main/java/fi/solita/utils/meta/MetaMethods.java index 23ce2f4..e996e04 100644 --- a/src/main/java/fi/solita/utils/meta/MetaMethods.java +++ b/src/main/java/fi/solita/utils/meta/MetaMethods.java @@ -1007,4 +1007,30 @@ public final String toString() { return doToString(clazz, name); } } + + public static abstract class M39 extends Function39 implements MetaMethod,R> { + private transient Method $r; + private final Class clazz; + private final String name; + private final Class[] argClasses; + public M39(Class clazz, String name, Class... argClasses) { + this.clazz = clazz; + this.name = name; + this.argClasses = argClasses; + } + @Override + public final Method getMember() { + if ($r == null) { + $r = doGetMember(clazz, name, argClasses); + } + return $r; + } + public final String getName() { + return name; + } + @Override + public final String toString() { + return doToString(clazz, name); + } + } }