Instruction.java 794 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. package me.hammerle.snuviscript.instructions;
  2. import me.hammerle.snuviscript.inputprovider.InputProvider;
  3. import me.hammerle.snuviscript.code.Script;
  4. public abstract class Instruction
  5. {
  6. private final int line;
  7. private boolean noReturn = false;
  8. public Instruction(int line)
  9. {
  10. this.line = line;
  11. }
  12. public void setNoReturn()
  13. {
  14. noReturn = true;
  15. }
  16. public boolean shouldNotReturnValue()
  17. {
  18. return noReturn;
  19. }
  20. public int getLine()
  21. {
  22. return line;
  23. }
  24. public InputProvider execute(Script sc, InputProvider[] o) throws Exception
  25. {
  26. return null;
  27. }
  28. public int getArguments()
  29. {
  30. return 0;
  31. }
  32. public String getName()
  33. {
  34. return "";
  35. }
  36. }