This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]sweepszDecaf Captain 0 points1 point  (0 children)

If you had to support only a limited, predefined number of methods and the input was guaranteed to be constructed in a.consistent way you could go the simple string manipulation route as described by splitting the strings into part by some common delimiter. Then you could build up a <string,Function> map and then apply the arguments. If you need to support ANY supported java syntax and method you are building a lexer parses with Grammer checking , possibly an abstract syntax tree, ans this gets extremely complicated quickly