Skip to content

Commit

Permalink
add Tuple37
Browse files Browse the repository at this point in the history
  • Loading branch information
jyrimatti committed Sep 21, 2023
1 parent 7d13665 commit d1d7e85
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 154 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>fi.solita.utils</groupId>
<artifactId>meta-utils</artifactId>
<version>0.12.24</version>
<version>0.12.25</version>
<build>
<resources>
<resource>
Expand Down Expand Up @@ -36,7 +36,7 @@
<dependency>
<groupId>fi.solita.utils</groupId>
<artifactId>functional-utils</artifactId>
<version>0.12.37</version>
<version>0.12.39</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ public Class<? extends Apply> getClassForMethods(int argCount) {
case 34: return MetaMethods.M34.class;
case 35: return MetaMethods.M35.class;
case 36: return MetaMethods.M36.class;
case 37: return MetaMethods.M37.class;
}
throw new RuntimeException("Not implemented: F" + argCount);
}
Expand Down Expand Up @@ -427,6 +428,7 @@ public Class<? extends Apply> getClassForConstructors(int argCount) {
case 34: return MetaConstructors.C34.class;
case 35: return MetaConstructors.C35.class;
case 36: return MetaConstructors.C36.class;
case 37: return MetaConstructors.C37.class;
}
throw new RuntimeException("Not implemented: F" + argCount);
}
Expand Down
107 changes: 30 additions & 77 deletions src/main/java/fi/solita/utils/meta/MetaConstructors.java
Original file line number Diff line number Diff line change
@@ -1,88 +1,16 @@
package fi.solita.utils.meta;

import static fi.solita.utils.functional.Functional.mkString;
import static fi.solita.utils.functional.FunctionalA.map;
import fi.solita.utils.functional.*;
import fi.solita.utils.meta.generators.Content;

import java.lang.reflect.Constructor;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;

import fi.solita.utils.functional.Function0;
import fi.solita.utils.functional.Function1;
import fi.solita.utils.functional.Function10;
import fi.solita.utils.functional.Function11;
import fi.solita.utils.functional.Function12;
import fi.solita.utils.functional.Function13;
import fi.solita.utils.functional.Function14;
import fi.solita.utils.functional.Function15;
import fi.solita.utils.functional.Function16;
import fi.solita.utils.functional.Function17;
import fi.solita.utils.functional.Function18;
import fi.solita.utils.functional.Function19;
import fi.solita.utils.functional.Function2;
import fi.solita.utils.functional.Function20;
import fi.solita.utils.functional.Function21;
import fi.solita.utils.functional.Function22;
import fi.solita.utils.functional.Function23;
import fi.solita.utils.functional.Function24;
import fi.solita.utils.functional.Function25;
import fi.solita.utils.functional.Function26;
import fi.solita.utils.functional.Function27;
import fi.solita.utils.functional.Function28;
import fi.solita.utils.functional.Function29;
import fi.solita.utils.functional.Function3;
import fi.solita.utils.functional.Function30;
import fi.solita.utils.functional.Function31;
import fi.solita.utils.functional.Function32;
import fi.solita.utils.functional.Function33;
import fi.solita.utils.functional.Function34;
import fi.solita.utils.functional.Function35;
import fi.solita.utils.functional.Function36;
import fi.solita.utils.functional.Function4;
import fi.solita.utils.functional.Function5;
import fi.solita.utils.functional.Function6;
import fi.solita.utils.functional.Function7;
import fi.solita.utils.functional.Function8;
import fi.solita.utils.functional.Function9;
import fi.solita.utils.functional.Transformer;
import fi.solita.utils.functional.Tuple0;
import fi.solita.utils.functional.Tuple10;
import fi.solita.utils.functional.Tuple11;
import fi.solita.utils.functional.Tuple12;
import fi.solita.utils.functional.Tuple13;
import fi.solita.utils.functional.Tuple14;
import fi.solita.utils.functional.Tuple15;
import fi.solita.utils.functional.Tuple16;
import fi.solita.utils.functional.Tuple17;
import fi.solita.utils.functional.Tuple18;
import fi.solita.utils.functional.Tuple19;
import fi.solita.utils.functional.Tuple20;
import fi.solita.utils.functional.Tuple21;
import fi.solita.utils.functional.Tuple22;
import fi.solita.utils.functional.Tuple23;
import fi.solita.utils.functional.Tuple24;
import fi.solita.utils.functional.Tuple25;
import fi.solita.utils.functional.Tuple26;
import fi.solita.utils.functional.Tuple27;
import fi.solita.utils.functional.Tuple28;
import fi.solita.utils.functional.Tuple29;
import fi.solita.utils.functional.Tuple3;
import fi.solita.utils.functional.Tuple30;
import fi.solita.utils.functional.Tuple31;
import fi.solita.utils.functional.Tuple32;
import fi.solita.utils.functional.Tuple33;
import fi.solita.utils.functional.Tuple34;
import fi.solita.utils.functional.Tuple35;
import fi.solita.utils.functional.Tuple36;
import fi.solita.utils.functional.Tuple4;
import fi.solita.utils.functional.Tuple5;
import fi.solita.utils.functional.Tuple6;
import fi.solita.utils.functional.Tuple7;
import fi.solita.utils.functional.Tuple8;
import fi.solita.utils.functional.Tuple9;
import fi.solita.utils.meta.generators.Content;
import static fi.solita.utils.functional.Functional.mkString;
import static fi.solita.utils.functional.FunctionalA.map;

public abstract class MetaConstructors {
static final <R> Constructor<R> doGetMember(Class<?> clazz, Class<?>... argClasses) {
Expand Down Expand Up @@ -1003,4 +931,29 @@ public String toString() {
return doToString(clazz, argClasses);
}
}
}

public static abstract class C37<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,R> extends Function37<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,R> implements MetaConstructor<Tuple37<? extends T1,? extends T2,? extends T3,? extends T4,? extends T5,? extends T6,? extends T7,? extends T8,? extends T9,? extends T10,? extends T11,? extends T12,? extends T13,? extends T14,? extends T15,? extends T16,? extends T17,? extends T18,? extends T19,? extends T20,? extends T21,? extends T22,? extends T23,? extends T24,? extends T25,? extends T26,? extends T27,? extends T28,? extends T29,? extends T30,? extends T31,? extends T32,? extends T33,? extends T34,? extends T35,? extends T36,? extends T37>,R> {
private transient Constructor<R> $r;
private final Class<?> clazz;
private final Class<?>[] argClasses;
public C37(Class<?> clazz, Class<?>... argClasses) {
this.clazz = clazz;
this.argClasses = argClasses;
}
@Override
public List<Class<?>> getConstructorParameterTypes() {
return Collections.unmodifiableList(Arrays.asList(argClasses));
}
@Override
public Constructor<R> getMember() {
if ($r == null) {
$r = doGetMember(clazz, argClasses);
}
return $r;
}
@Override
public String toString() {
return doToString(clazz, argClasses);
}
}
}
105 changes: 30 additions & 75 deletions src/main/java/fi/solita/utils/meta/MetaMethods.java
Original file line number Diff line number Diff line change
@@ -1,82 +1,11 @@
package fi.solita.utils.meta;

import fi.solita.utils.functional.*;
import fi.solita.utils.meta.generators.Content;

import java.lang.reflect.Method;
import java.util.Map;

import fi.solita.utils.functional.Function0;
import fi.solita.utils.functional.Function1;
import fi.solita.utils.functional.Function10;
import fi.solita.utils.functional.Function11;
import fi.solita.utils.functional.Function12;
import fi.solita.utils.functional.Function13;
import fi.solita.utils.functional.Function14;
import fi.solita.utils.functional.Function15;
import fi.solita.utils.functional.Function16;
import fi.solita.utils.functional.Function17;
import fi.solita.utils.functional.Function18;
import fi.solita.utils.functional.Function19;
import fi.solita.utils.functional.Function2;
import fi.solita.utils.functional.Function20;
import fi.solita.utils.functional.Function21;
import fi.solita.utils.functional.Function22;
import fi.solita.utils.functional.Function23;
import fi.solita.utils.functional.Function24;
import fi.solita.utils.functional.Function25;
import fi.solita.utils.functional.Function26;
import fi.solita.utils.functional.Function27;
import fi.solita.utils.functional.Function28;
import fi.solita.utils.functional.Function29;
import fi.solita.utils.functional.Function3;
import fi.solita.utils.functional.Function30;
import fi.solita.utils.functional.Function31;
import fi.solita.utils.functional.Function32;
import fi.solita.utils.functional.Function33;
import fi.solita.utils.functional.Function34;
import fi.solita.utils.functional.Function35;
import fi.solita.utils.functional.Function36;
import fi.solita.utils.functional.Function4;
import fi.solita.utils.functional.Function5;
import fi.solita.utils.functional.Function6;
import fi.solita.utils.functional.Function7;
import fi.solita.utils.functional.Function8;
import fi.solita.utils.functional.Function9;
import fi.solita.utils.functional.Tuple0;
import fi.solita.utils.functional.Tuple10;
import fi.solita.utils.functional.Tuple11;
import fi.solita.utils.functional.Tuple12;
import fi.solita.utils.functional.Tuple13;
import fi.solita.utils.functional.Tuple14;
import fi.solita.utils.functional.Tuple15;
import fi.solita.utils.functional.Tuple16;
import fi.solita.utils.functional.Tuple17;
import fi.solita.utils.functional.Tuple18;
import fi.solita.utils.functional.Tuple19;
import fi.solita.utils.functional.Tuple20;
import fi.solita.utils.functional.Tuple21;
import fi.solita.utils.functional.Tuple22;
import fi.solita.utils.functional.Tuple23;
import fi.solita.utils.functional.Tuple24;
import fi.solita.utils.functional.Tuple25;
import fi.solita.utils.functional.Tuple26;
import fi.solita.utils.functional.Tuple27;
import fi.solita.utils.functional.Tuple28;
import fi.solita.utils.functional.Tuple29;
import fi.solita.utils.functional.Tuple3;
import fi.solita.utils.functional.Tuple30;
import fi.solita.utils.functional.Tuple31;
import fi.solita.utils.functional.Tuple32;
import fi.solita.utils.functional.Tuple33;
import fi.solita.utils.functional.Tuple34;
import fi.solita.utils.functional.Tuple35;
import fi.solita.utils.functional.Tuple36;
import fi.solita.utils.functional.Tuple4;
import fi.solita.utils.functional.Tuple5;
import fi.solita.utils.functional.Tuple6;
import fi.solita.utils.functional.Tuple7;
import fi.solita.utils.functional.Tuple8;
import fi.solita.utils.functional.Tuple9;
import fi.solita.utils.meta.generators.Content;

public abstract class MetaMethods {
static final Method doGetMember(Class<?> clazz, String name, Class<?>... argClasses) {
try {
Expand Down Expand Up @@ -1026,4 +955,30 @@ public final String toString() {
return doToString(clazz, name);
}
}
}

public static abstract class M37<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,R> extends Function37<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,R> implements MetaMethod<Tuple37<? extends T1,? extends T2,? extends T3,? extends T4,? extends T5,? extends T6,? extends T7,? extends T8,? extends T9,? extends T10,? extends T11,? extends T12,? extends T13,? extends T14,? extends T15,? extends T16,? extends T17,? extends T18,? extends T19,? extends T20,? extends T21,? extends T22,? extends T23,? extends T24,? extends T25,? extends T26,? extends T27,? extends T28,? extends T29,? extends T30,? extends T31,? extends T32,? extends T33,? extends T34,? extends T35,? extends T36,? extends T37>,R> {
private transient Method $r;
private final Class<?> clazz;
private final String name;
private final Class<?>[] argClasses;
public M37(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);
}
}
}

0 comments on commit d1d7e85

Please sign in to comment.