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%2FFunctionImpl1.java;h=0743d47b29e7adf9efc345cff2c3ce4646b8ff87;hp=688840445893e488fe23fd0484051f6887c14c06;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.scl.runtime/src/org/simantics/scl/runtime/function/FunctionImpl1.java b/bundles/org.simantics.scl.runtime/src/org/simantics/scl/runtime/function/FunctionImpl1.java old mode 100755 new mode 100644 index 688840445..0743d47b2 --- a/bundles/org.simantics.scl.runtime/src/org/simantics/scl/runtime/function/FunctionImpl1.java +++ b/bundles/org.simantics.scl.runtime/src/org/simantics/scl/runtime/function/FunctionImpl1.java @@ -1,140 +1,140 @@ /** * 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 FunctionImpl1 implements Function { - @Override - public abstract R apply(P0 p0); - - @Override - public Object apply(Object p0, Object p1) { - try { - return ((Function)apply((P0)p0)).apply(p1); - } catch(ClassCastException e) { - throw new CalledWithTooManyParameters(); - } - } - - @Override - public Object apply(Object p0, Object p1, Object p2) { - try { - return ((Function)apply((P0)p0)).apply(p1, p2); - } catch(ClassCastException e) { - throw new CalledWithTooManyParameters(); - } - } - - @Override - public Object apply(Object p0, Object p1, Object p2, Object p3) { - try { - return ((Function)apply((P0)p0)).apply(p1, p2, p3); - } catch(ClassCastException e) { - throw new CalledWithTooManyParameters(); - } - } - - @Override - public Object apply(Object p0, Object p1, Object p2, Object p3, Object p4) { - try { - return ((Function)apply((P0)p0)).apply(p1, p2, p3, p4); - } catch(ClassCastException e) { - throw new CalledWithTooManyParameters(); - } - } - - @Override - public Object apply(Object p0, Object p1, Object p2, Object p3, Object p4, Object p5) { - try { - return ((Function)apply((P0)p0)).apply(p1, p2, p3, p4, 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)).apply(p1, p2, p3, p4, 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)).apply(p1, p2, p3, p4, 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 apply((P0)ps[0]); - case 2: - try { - return ((Function)apply((P0)ps[0])).apply(ps[1]); - } catch(ClassCastException e) { - throw new CalledWithTooManyParameters(); - } - case 3: - try { - return ((Function)apply((P0)ps[0])).apply(ps[1], ps[2]); - } catch(ClassCastException e) { - throw new CalledWithTooManyParameters(); - } - case 4: - try { - return ((Function)apply((P0)ps[0])).apply(ps[1], ps[2], ps[3]); - } catch(ClassCastException e) { - throw new CalledWithTooManyParameters(); - } - case 5: - try { - return ((Function)apply((P0)ps[0])).apply(ps[1], ps[2], ps[3], ps[4]); - } catch(ClassCastException e) { - throw new CalledWithTooManyParameters(); - } - case 6: - try { - return ((Function)apply((P0)ps[0])).apply(ps[1], ps[2], ps[3], ps[4], ps[5]); - } catch(ClassCastException e) { - throw new CalledWithTooManyParameters(); - } - case 7: - try { - return ((Function)apply((P0)ps[0])).apply(ps[1], ps[2], ps[3], ps[4], ps[5], ps[6]); - } catch(ClassCastException e) { - throw new CalledWithTooManyParameters(); - } - case 8: - try { - return ((Function)apply((P0)ps[0])).apply(ps[1], ps[2], ps[3], ps[4], ps[5], ps[6], ps[7]); - } catch(ClassCastException e) { - throw new CalledWithTooManyParameters(); - } - case 9: - try { - return ((Function)apply((P0)ps[0])).apply(ps[1], ps[2], ps[3], ps[4], ps[5], ps[6], ps[7], ps[8]); - } catch(ClassCastException e) { - throw new CalledWithTooManyParameters(); - } - default: - try { - return ((Function)apply((P0)ps[0])).apply(Arrays.copyOfRange(ps, 1, ps.length)); - } catch(ClassCastException e) { - throw new CalledWithTooManyParameters(); - } - } - } -} + */ +package org.simantics.scl.runtime.function; + +import java.util.Arrays; + +@SuppressWarnings("all") +public abstract class FunctionImpl1 implements Function { + @Override + public abstract R apply(P0 p0); + + @Override + public Object apply(Object p0, Object p1) { + try { + return ((Function)apply((P0)p0)).apply(p1); + } catch(ClassCastException e) { + throw new CalledWithTooManyParameters(); + } + } + + @Override + public Object apply(Object p0, Object p1, Object p2) { + try { + return ((Function)apply((P0)p0)).apply(p1, p2); + } catch(ClassCastException e) { + throw new CalledWithTooManyParameters(); + } + } + + @Override + public Object apply(Object p0, Object p1, Object p2, Object p3) { + try { + return ((Function)apply((P0)p0)).apply(p1, p2, p3); + } catch(ClassCastException e) { + throw new CalledWithTooManyParameters(); + } + } + + @Override + public Object apply(Object p0, Object p1, Object p2, Object p3, Object p4) { + try { + return ((Function)apply((P0)p0)).apply(p1, p2, p3, p4); + } catch(ClassCastException e) { + throw new CalledWithTooManyParameters(); + } + } + + @Override + public Object apply(Object p0, Object p1, Object p2, Object p3, Object p4, Object p5) { + try { + return ((Function)apply((P0)p0)).apply(p1, p2, p3, p4, 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)).apply(p1, p2, p3, p4, 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)).apply(p1, p2, p3, p4, 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 apply((P0)ps[0]); + case 2: + try { + return ((Function)apply((P0)ps[0])).apply(ps[1]); + } catch(ClassCastException e) { + throw new CalledWithTooManyParameters(); + } + case 3: + try { + return ((Function)apply((P0)ps[0])).apply(ps[1], ps[2]); + } catch(ClassCastException e) { + throw new CalledWithTooManyParameters(); + } + case 4: + try { + return ((Function)apply((P0)ps[0])).apply(ps[1], ps[2], ps[3]); + } catch(ClassCastException e) { + throw new CalledWithTooManyParameters(); + } + case 5: + try { + return ((Function)apply((P0)ps[0])).apply(ps[1], ps[2], ps[3], ps[4]); + } catch(ClassCastException e) { + throw new CalledWithTooManyParameters(); + } + case 6: + try { + return ((Function)apply((P0)ps[0])).apply(ps[1], ps[2], ps[3], ps[4], ps[5]); + } catch(ClassCastException e) { + throw new CalledWithTooManyParameters(); + } + case 7: + try { + return ((Function)apply((P0)ps[0])).apply(ps[1], ps[2], ps[3], ps[4], ps[5], ps[6]); + } catch(ClassCastException e) { + throw new CalledWithTooManyParameters(); + } + case 8: + try { + return ((Function)apply((P0)ps[0])).apply(ps[1], ps[2], ps[3], ps[4], ps[5], ps[6], ps[7]); + } catch(ClassCastException e) { + throw new CalledWithTooManyParameters(); + } + case 9: + try { + return ((Function)apply((P0)ps[0])).apply(ps[1], ps[2], ps[3], ps[4], ps[5], ps[6], ps[7], ps[8]); + } catch(ClassCastException e) { + throw new CalledWithTooManyParameters(); + } + default: + try { + return ((Function)apply((P0)ps[0])).apply(Arrays.copyOfRange(ps, 1, ps.length)); + } catch(ClassCastException e) { + throw new CalledWithTooManyParameters(); + } + } + } +}