X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.runtime%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fruntime%2Ffunction%2FFunctionImpl5.java;h=9ba2c3f884cab93dd5b10482408a60149e7f6124;hp=125e90e6242561e65d7985153d503458f32715ac;hb=refs%2Fchanges%2F38%2F238%2F2;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.scl.runtime/src/org/simantics/scl/runtime/function/FunctionImpl5.java b/bundles/org.simantics.scl.runtime/src/org/simantics/scl/runtime/function/FunctionImpl5.java old mode 100755 new mode 100644 index 125e90e62..9ba2c3f88 --- a/bundles/org.simantics.scl.runtime/src/org/simantics/scl/runtime/function/FunctionImpl5.java +++ b/bundles/org.simantics.scl.runtime/src/org/simantics/scl/runtime/function/FunctionImpl5.java @@ -1,132 +1,132 @@ /** * This code is generated in org.simantics.scl.runtime.generation.GenerateFunctions. * Do not edit manually! - */ -package org.simantics.scl.runtime.function; - -import java.util.Arrays; - -@SuppressWarnings("all") -public abstract class FunctionImpl5 implements Function { - @Override - public Object apply(Object p0) { - return new UnsaturatedFunction1(this, p0); - } - - @Override - public Object apply(Object p0, Object p1) { - return new UnsaturatedFunction2(this, p0, p1); - } - - @Override - public Object apply(Object p0, Object p1, Object p2) { - return new UnsaturatedFunction3(this, p0, p1, p2); - } - - @Override - public Object apply(Object p0, Object p1, Object p2, Object p3) { - return new UnsaturatedFunction4(this, p0, p1, p2, p3); - } - - @Override - public abstract R apply(P0 p0, P1 p1, P2 p2, P3 p3, P4 p4); - - @Override - public Object apply(Object p0, Object p1, Object p2, Object p3, Object p4, Object p5) { - try { - return ((Function)apply((P0)p0, (P1)p1, (P2)p2, (P3)p3, (P4)p4)).apply(p5); - } catch(ClassCastException e) { - throw new CalledWithTooManyParameters(); - } - } - - @Override - public Object apply(Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6) { - try { - return ((Function)apply((P0)p0, (P1)p1, (P2)p2, (P3)p3, (P4)p4)).apply(p5, p6); - } catch(ClassCastException e) { - throw new CalledWithTooManyParameters(); - } - } - - @Override - public Object apply(Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7) { - try { - return ((Function)apply((P0)p0, (P1)p1, (P2)p2, (P3)p3, (P4)p4)).apply(p5, p6, p7); - } catch(ClassCastException e) { - throw new CalledWithTooManyParameters(); - } - } - - @Override - public Object applyArray(Object ... ps) { - switch(ps.length) { - case 0: - return this; - case 1: - return new UnsaturatedFunction1(this, ps[0]); - case 2: - return new UnsaturatedFunction2(this, ps[0], ps[1]); - case 3: - return new UnsaturatedFunction3(this, ps[0], ps[1], ps[2]); - case 4: - return new UnsaturatedFunction4(this, ps[0], ps[1], ps[2], ps[3]); - case 5: - return apply((P0)ps[0], (P1)ps[1], (P2)ps[2], (P3)ps[3], (P4)ps[4]); - case 6: - try { - return ((Function)apply((P0)ps[0], (P1)ps[1], (P2)ps[2], (P3)ps[3], (P4)ps[4])).apply(ps[5]); - } catch(ClassCastException e) { - throw new CalledWithTooManyParameters(); - } - case 7: - try { - return ((Function)apply((P0)ps[0], (P1)ps[1], (P2)ps[2], (P3)ps[3], (P4)ps[4])).apply(ps[5], ps[6]); - } catch(ClassCastException e) { - throw new CalledWithTooManyParameters(); - } - case 8: - try { - return ((Function)apply((P0)ps[0], (P1)ps[1], (P2)ps[2], (P3)ps[3], (P4)ps[4])).apply(ps[5], ps[6], ps[7]); - } catch(ClassCastException e) { - throw new CalledWithTooManyParameters(); - } - case 9: - try { - return ((Function)apply((P0)ps[0], (P1)ps[1], (P2)ps[2], (P3)ps[3], (P4)ps[4])).apply(ps[5], ps[6], ps[7], ps[8]); - } catch(ClassCastException e) { - throw new CalledWithTooManyParameters(); - } - case 10: - try { - return ((Function)apply((P0)ps[0], (P1)ps[1], (P2)ps[2], (P3)ps[3], (P4)ps[4])).apply(ps[5], ps[6], ps[7], ps[8], ps[9]); - } catch(ClassCastException e) { - throw new CalledWithTooManyParameters(); - } - case 11: - try { - return ((Function)apply((P0)ps[0], (P1)ps[1], (P2)ps[2], (P3)ps[3], (P4)ps[4])).apply(ps[5], ps[6], ps[7], ps[8], ps[9], ps[10]); - } catch(ClassCastException e) { - throw new CalledWithTooManyParameters(); - } - case 12: - try { - return ((Function)apply((P0)ps[0], (P1)ps[1], (P2)ps[2], (P3)ps[3], (P4)ps[4])).apply(ps[5], ps[6], ps[7], ps[8], ps[9], ps[10], ps[11]); - } catch(ClassCastException e) { - throw new CalledWithTooManyParameters(); - } - case 13: - try { - return ((Function)apply((P0)ps[0], (P1)ps[1], (P2)ps[2], (P3)ps[3], (P4)ps[4])).apply(ps[5], ps[6], ps[7], ps[8], ps[9], ps[10], ps[11], ps[12]); - } catch(ClassCastException e) { - throw new CalledWithTooManyParameters(); - } - default: - try { - return ((Function)apply((P0)ps[0], (P1)ps[1], (P2)ps[2], (P3)ps[3], (P4)ps[4])).apply(Arrays.copyOfRange(ps, 5, ps.length)); - } catch(ClassCastException e) { - throw new CalledWithTooManyParameters(); - } - } - } -} + */ +package org.simantics.scl.runtime.function; + +import java.util.Arrays; + +@SuppressWarnings("all") +public abstract class FunctionImpl5 implements Function { + @Override + public Object apply(Object p0) { + return new UnsaturatedFunction1(this, p0); + } + + @Override + public Object apply(Object p0, Object p1) { + return new UnsaturatedFunction2(this, p0, p1); + } + + @Override + public Object apply(Object p0, Object p1, Object p2) { + return new UnsaturatedFunction3(this, p0, p1, p2); + } + + @Override + public Object apply(Object p0, Object p1, Object p2, Object p3) { + return new UnsaturatedFunction4(this, p0, p1, p2, p3); + } + + @Override + public abstract R apply(P0 p0, P1 p1, P2 p2, P3 p3, P4 p4); + + @Override + public Object apply(Object p0, Object p1, Object p2, Object p3, Object p4, Object p5) { + try { + return ((Function)apply((P0)p0, (P1)p1, (P2)p2, (P3)p3, (P4)p4)).apply(p5); + } catch(ClassCastException e) { + throw new CalledWithTooManyParameters(); + } + } + + @Override + public Object apply(Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6) { + try { + return ((Function)apply((P0)p0, (P1)p1, (P2)p2, (P3)p3, (P4)p4)).apply(p5, p6); + } catch(ClassCastException e) { + throw new CalledWithTooManyParameters(); + } + } + + @Override + public Object apply(Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7) { + try { + return ((Function)apply((P0)p0, (P1)p1, (P2)p2, (P3)p3, (P4)p4)).apply(p5, p6, p7); + } catch(ClassCastException e) { + throw new CalledWithTooManyParameters(); + } + } + + @Override + public Object applyArray(Object ... ps) { + switch(ps.length) { + case 0: + return this; + case 1: + return new UnsaturatedFunction1(this, ps[0]); + case 2: + return new UnsaturatedFunction2(this, ps[0], ps[1]); + case 3: + return new UnsaturatedFunction3(this, ps[0], ps[1], ps[2]); + case 4: + return new UnsaturatedFunction4(this, ps[0], ps[1], ps[2], ps[3]); + case 5: + return apply((P0)ps[0], (P1)ps[1], (P2)ps[2], (P3)ps[3], (P4)ps[4]); + case 6: + try { + return ((Function)apply((P0)ps[0], (P1)ps[1], (P2)ps[2], (P3)ps[3], (P4)ps[4])).apply(ps[5]); + } catch(ClassCastException e) { + throw new CalledWithTooManyParameters(); + } + case 7: + try { + return ((Function)apply((P0)ps[0], (P1)ps[1], (P2)ps[2], (P3)ps[3], (P4)ps[4])).apply(ps[5], ps[6]); + } catch(ClassCastException e) { + throw new CalledWithTooManyParameters(); + } + case 8: + try { + return ((Function)apply((P0)ps[0], (P1)ps[1], (P2)ps[2], (P3)ps[3], (P4)ps[4])).apply(ps[5], ps[6], ps[7]); + } catch(ClassCastException e) { + throw new CalledWithTooManyParameters(); + } + case 9: + try { + return ((Function)apply((P0)ps[0], (P1)ps[1], (P2)ps[2], (P3)ps[3], (P4)ps[4])).apply(ps[5], ps[6], ps[7], ps[8]); + } catch(ClassCastException e) { + throw new CalledWithTooManyParameters(); + } + case 10: + try { + return ((Function)apply((P0)ps[0], (P1)ps[1], (P2)ps[2], (P3)ps[3], (P4)ps[4])).apply(ps[5], ps[6], ps[7], ps[8], ps[9]); + } catch(ClassCastException e) { + throw new CalledWithTooManyParameters(); + } + case 11: + try { + return ((Function)apply((P0)ps[0], (P1)ps[1], (P2)ps[2], (P3)ps[3], (P4)ps[4])).apply(ps[5], ps[6], ps[7], ps[8], ps[9], ps[10]); + } catch(ClassCastException e) { + throw new CalledWithTooManyParameters(); + } + case 12: + try { + return ((Function)apply((P0)ps[0], (P1)ps[1], (P2)ps[2], (P3)ps[3], (P4)ps[4])).apply(ps[5], ps[6], ps[7], ps[8], ps[9], ps[10], ps[11]); + } catch(ClassCastException e) { + throw new CalledWithTooManyParameters(); + } + case 13: + try { + return ((Function)apply((P0)ps[0], (P1)ps[1], (P2)ps[2], (P3)ps[3], (P4)ps[4])).apply(ps[5], ps[6], ps[7], ps[8], ps[9], ps[10], ps[11], ps[12]); + } catch(ClassCastException e) { + throw new CalledWithTooManyParameters(); + } + default: + try { + return ((Function)apply((P0)ps[0], (P1)ps[1], (P2)ps[2], (P3)ps[3], (P4)ps[4])).apply(Arrays.copyOfRange(ps, 5, ps.length)); + } catch(ClassCastException e) { + throw new CalledWithTooManyParameters(); + } + } + } +}