Last change
on this file since 353 was 346, checked in by wouter, 2 years ago |
version 0.1 of automatic java to python translator. Can translate some simple programs, lot of work remains to be done
|
File size:
700 bytes
|
Line | |
---|
1 | package tudelft.utilities.j2p.t;
|
---|
2 |
|
---|
3 | import java.util.Set;
|
---|
4 |
|
---|
5 | public interface PyCode {
|
---|
6 |
|
---|
7 | /**
|
---|
8 | *
|
---|
9 | * @return the list of import statements needed to execute this code. Note
|
---|
10 | * that this generally only returns the class imports, or none at
|
---|
11 | * all if the class was already imported at this point.
|
---|
12 | */
|
---|
13 | Set<String> imports();
|
---|
14 |
|
---|
15 | /**
|
---|
16 | *
|
---|
17 | * @return python code to execute. The returned statement must be glue-able
|
---|
18 | * in place, eg to assign the return value directly into a variable,
|
---|
19 | * or to pass it on in another function call. The code's return type
|
---|
20 | * must match the translated equivalent of the java's return code
|
---|
21 | * type.
|
---|
22 | */
|
---|
23 | String code();
|
---|
24 |
|
---|
25 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.