@Override public VariableMapper getVariableMapper() { if (variables == null) { variables = new Variables(); } return variables; }
/** * Static function, should be exposed under two names. */ @Functions.Expose(prefix="other", names={"bonjour"}) public static String sayHi2() { return "French hello"; }
@Before public void setUp() { Functions functions = new Functions(OpensocialFunctions.class); expressions = Expressions.forTesting(functions); context = expressions.newELContext(new RootELResolver(vars)); }
@Before public void setUp() { Functions functions = new Functions(OpensocialFunctions.class); expressions = Expressions.forTesting(functions); context = expressions.newELContext(new RootELResolver(vars)); }
/** * Test with some arguments. */ @Functions.Expose(prefix="test", names={"add"}) public static int add(int i, int j) { return i + j; }
@Override public VariableMapper getVariableMapper() { if (variables == null) { variables = new Variables(); } return variables; }
@Before public void setUp() { Functions functions = new Functions(OpensocialFunctions.class); expressions = Expressions.forTesting(functions); context = expressions.newELContext(new RootELResolver(vars)); }
/** * Static function, should be exposed under two names. */ @Functions.Expose(prefix="other", names={"bonjour"}) public static String sayHi2() { return "French hello"; }
@Before public void setUp() { Functions functions = new Functions(OpensocialFunctions.class); expressions = Expressions.forTesting(functions); context = expressions.newELContext(new RootELResolver(vars)); }
/** * Non-static: shouldn't be exposed. */ @Functions.Expose(prefix="test", names={"goodbye"}) public String sayGoodbye() { return "goodbye"; } }
@Before public void setUp() { Functions functions = new Functions(OpensocialFunctions.class); expressions = Expressions.forTesting(functions); context = expressions.newELContext(new RootELResolver(vars)); }
/** * Test with some arguments. */ @Functions.Expose(prefix="test", names={"add"}) public static int add(int i, int j) { return i + j; }
/** * Non-static: shouldn't be exposed. */ @Functions.Expose(prefix="test", names={"goodbye"}) public String sayGoodbye() { return "goodbye"; } }
/** * Static function, should be exposed under two names. */ @Functions.Expose(prefix="test", names={"hi", "hola"}) public static String sayHi() { return "hi"; }
/** * Static function, should be exposed under two names. */ @Functions.Expose(prefix="test", names={"hi", "hola"}) public static String sayHi() { return "hi"; }
/** * Non-static: shouldn't be exposed. */ @Functions.Expose(prefix="test", names={"goodbye"}) public String sayGoodbye() { return "goodbye"; } }
/** * Test with some arguments. */ @Functions.Expose(prefix="test", names={"add"}) public static int add(int i, int j) { return i + j; }
/** * Static function, should be exposed under two names. */ @Functions.Expose(prefix="test", names={"hi", "hola"}) public static String sayHi() { return "hi"; }
/** * Static function, should be exposed under two names. */ @Functions.Expose(prefix="other", names={"bonjour"}) public static String sayHi2() { return "French hello"; }
/** * Non-static: shouldn't be exposed. */ @Functions.Expose(prefix="test", names={"goodbye"}) public String sayGoodbye() { return "goodbye"; } }