Package com.opengamma.analytics.util.serialization

Examples of com.opengamma.analytics.util.serialization.InvokedSerializedForm


    };

    return new FunctionalDoublesCurve(fwd) {

      public Object writeReplace() {
        return new InvokedSerializedForm(ForwardCurve.class, "getForwardCurve", spot, drift);
      }
    };
  }
View Full Code Here


    };
    return new FunctionalDoublesCurve(fwd) {

      public Object writeReplace() {
        return new InvokedSerializedForm(ForwardCurve.class, "getForwardCurve", spot, driftCurve);
      }
    };
  }
View Full Code Here

    };

    return new FunctionalDoublesCurve(drift) {
      public Object writeReplace() {
        return new InvokedSerializedForm(ForwardCurve.class, "getDriftCurve", fwdCurve);
      }
    };
  }
View Full Code Here

        final double x4 = (1 - Math.exp(-x3)) / x3;
        return beta0 + beta1 * x2 + beta2 * (x2 - Math.exp(-x1)) + beta3 * (x4 - Math.exp(-x3));
      }

      public Object writeReplace() {
        return new InvokedSerializedForm(NelsonSiegelSvennsonBondCurveModel.class, "getParameterizedFunction");
      }

    };
  }
View Full Code Here

        return res;
      }

      public Object writeReplace() {
        return new InvokedSerializedForm(new InvokedSerializedForm(new InvokedSerializedForm(VolatilitySurfaceInterpolator.this, "getVolatilitySurface", marketData), "getSurface"), "getFunction");
      }

    };

    return new BlackVolatilitySurfaceMoneynessFcnBackedByGrid(FunctionalDoublesSurface.from(surFunc), marketData.getForwardCurve(), marketData,
        VolatilitySurfaceInterpolator.this) {

      public Object writeReplace() {
        return new InvokedSerializedForm(VolatilitySurfaceInterpolator.this, "getVolatilitySurface", marketData);
      }

    };
  }
View Full Code Here

        final double x2 = Epsilon.epsilon(-x1);
        return beta0 + beta1 * x2 + beta2 * (x2 - Math.exp(-x1));
      }

      public Object writeReplace() {
        return new InvokedSerializedForm(NelsonSiegelBondCurveModel.class, "getParameterizedFunction");
      }

    };
  }
View Full Code Here

  protected Object getDynamicExample(Double foo) {
    return "dynamic-prefixed-object-arg-" + foo;
  }

  public void testNoArgStaticMethod() {
    InvokedSerializedForm obj = new InvokedSerializedForm(InvokedSerializedFormTest.class, "staticExample");
    assertEquals(obj.toString(), "InvokedSerializedForm[com.opengamma.analytics.util.InvokedSerializedFormTest, staticExample]");
    assertEquals(obj.readReplace(), "static-no-arg");
    obj = new InvokedSerializedForm(InvokedSerializedFormTest.class, "getStaticExample");
    assertEquals(obj.toString(), "InvokedSerializedForm[com.opengamma.analytics.util.InvokedSerializedFormTest, StaticExample]");
    assertEquals(obj.readReplace(), "static-prefixed-no-arg");
  }
View Full Code Here

    assertEquals(obj.toString(), "InvokedSerializedForm[com.opengamma.analytics.util.InvokedSerializedFormTest, StaticExample]");
    assertEquals(obj.readReplace(), "static-prefixed-no-arg");
  }

  public void testNoArgDynamicMethod() {
    InvokedSerializedForm obj = new InvokedSerializedForm(this, "dynamicExample");
    assertEquals(obj.toString(), "InvokedSerializedForm[Test, dynamicExample]");
    assertEquals(obj.readReplace(), "dynamic-no-arg");
    obj = new InvokedSerializedForm(this, "getDynamicExample");
    assertEquals(obj.toString(), "InvokedSerializedForm[Test, DynamicExample]");
    assertEquals(obj.readReplace(), "dynamic-prefixed-no-arg");
  }
View Full Code Here

    assertEquals(obj.toString(), "InvokedSerializedForm[Test, DynamicExample]");
    assertEquals(obj.readReplace(), "dynamic-prefixed-no-arg");
  }

  public void testPrimitiveArgStaticMethod() {
    InvokedSerializedForm obj = new InvokedSerializedForm(InvokedSerializedFormTest.class, "staticExamplePrimitive", 42d);
    assertEquals(obj.toString(), "InvokedSerializedForm[com.opengamma.analytics.util.InvokedSerializedFormTest, staticExamplePrimitive, 42.0]");
    assertEquals(obj.readReplace(), "static-primitive-arg-42.0");
    obj = new InvokedSerializedForm(InvokedSerializedFormTest.class, "getStaticExamplePrimitive", 42d);
    assertEquals(obj.toString(), "InvokedSerializedForm[com.opengamma.analytics.util.InvokedSerializedFormTest, StaticExamplePrimitive, 42.0]");
    assertEquals(obj.readReplace(), "static-prefixed-primitive-arg-42.0");
  }
View Full Code Here

    assertEquals(obj.toString(), "InvokedSerializedForm[com.opengamma.analytics.util.InvokedSerializedFormTest, StaticExamplePrimitive, 42.0]");
    assertEquals(obj.readReplace(), "static-prefixed-primitive-arg-42.0");
  }

  public void testPrimitiveArgDynamicMethod() {
    InvokedSerializedForm obj = new InvokedSerializedForm(this, "dynamicExamplePrimitive", 42d);
    assertEquals(obj.toString(), "InvokedSerializedForm[Test, dynamicExamplePrimitive, 42.0]");
    assertEquals(obj.readReplace(), "dynamic-primitive-arg-42.0");
    obj = new InvokedSerializedForm(this, "getDynamicExamplePrimitive", 42d);
    assertEquals(obj.toString(), "InvokedSerializedForm[Test, DynamicExamplePrimitive, 42.0]");
    assertEquals(obj.readReplace(), "dynamic-prefixed-primitive-arg-42.0");
  }
View Full Code Here

TOP

Related Classes of com.opengamma.analytics.util.serialization.InvokedSerializedForm

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.