Advertisement
Guest User

Untitled

a guest
May 26th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. /*
  2. * To change this template, choose Tools | Templates
  3. * and open the template in the editor.
  4. */
  5.  
  6. package javapython;
  7. import javapython.NFCType;
  8. import org.python.core.PyObject;
  9. import org.python.core.PyString;
  10. import org.python.util.PythonInterpreter;
  11. /**
  12. *
  13. * @author icke
  14. */
  15. public class NFCFactory {
  16.  
  17.  
  18. public NFCFactory() {
  19. PythonInterpreter interpreter = new PythonInterpreter();
  20. interpreter.exec("from driver.NFCcom import NFCcom;print NFCcom"");
  21. jyEmployeeClass = interpreter.get("NFCcom");
  22. }
  23.  
  24. public NFCType create() {
  25. PyObject employeeObj = jyEmployeeClass.__call__();
  26. return (NFCType)employeeObj.__tojava__(NFCType.class);
  27. }
  28.  
  29. private PyObject jyEmployeeClass;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement