/interpreter/tags/reactive-pattern-matching/test/edu/vub/at/objects/base/BaseClosure.java

http://ambienttalk.googlecode.com/ · Java · 26 lines · 7 code · 4 blank · 15 comment · 0 complexity · b069075821a08cded78e582815550037 MD5 · raw file

  1. /**
  2. *
  3. */
  4. package edu.vub.at.objects.base;
  5. import edu.vub.at.exceptions.InterpreterException;
  6. import edu.vub.at.objects.ATObject;
  7. import edu.vub.at.objects.ATTable;
  8. /**
  9. * A minimal interface to which a closure can be coerced such that it can be applied from another Java thread.
  10. *
  11. * @author smostinc
  12. *
  13. */
  14. public interface BaseClosure {
  15. /**
  16. * Applies the closure to the given arguments, which are wrapped in a table.
  17. *
  18. * @param args the evaluated arguments.
  19. * @return the value of evaluating the method body in the context of the closure.
  20. */
  21. public ATObject apply(ATTable args) throws InterpreterException;
  22. }