Created
December 11, 2013 12:58
-
-
Save febintt/7909990 to your computer and use it in GitHub Desktop.
OG function definition save code.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright (C) 2012 - present by OpenGamma Inc. and the OpenGamma group of companies | |
* | |
* Please see distribution for license. | |
*/ | |
package com.opengamma.algotree.function; | |
import java.util.List; | |
import com.opengamma.engine.function.config.AbstractFunctionConfigurationBean; | |
import com.opengamma.engine.function.config.FunctionConfiguration; | |
import com.opengamma.engine.function.config.FunctionConfigurationSource; | |
import com.opengamma.engine.function.config.StaticFunctionConfiguration; | |
/** | |
* Function repository configuration source for the functions contained in this package. | |
*/ | |
public class MyFunctions extends AbstractFunctionConfigurationBean { | |
/** | |
* Default instance of a repository configuration source exposing the functions from this package. | |
* | |
* @return the configuration source exposing functions from this package | |
*/ | |
public static FunctionConfigurationSource instance() { | |
return new MyFunctions().getObjectCreating(); | |
} | |
@Override | |
protected void addAllConfigurations(final List<FunctionConfiguration> functions) { | |
System.out.println("Adding new MY FUNCTION"); | |
functions.add(new StaticFunctionConfiguration(MyFunction.class.getName())); | |
System.out.println("Adding new DOUBLE_CLOSE FUNCTION"); | |
functions.add(new StaticFunctionConfiguration(DoubleLastHistoricalValueFunction.class.getName())); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment