code_junkie

Optional Parameter in MVEL Functions

Nov 12th, 2011
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. private void method(Object obj1) {
  2. Object obj2 = new Object("Default");
  3. method(obj1, obj2);
  4. }
  5.  
  6. private void method(Object obj1, Object obj2) {
  7. doStuff(...);
  8. }
  9.  
  10. parserContext = new ParserContext();
  11. parserContext.addImport("color", MyImplementation.class.getMethod("color", double[].class));
  12.  
  13. // This one is used for lookup, but never called.
  14. public static Color color(double... values) {}
  15.  
  16. public static Color color(double gray) {}
  17. public static Color color(double red, double green, double blue) {}
Add Comment
Please, Sign In to add comment