parsing java using php or java? -


i building web application in end needs parse java file , save values in database. has triggered user , set on schedule.

what best way of doing this? should using php or java? know how parse file in both languages java has reflection make easier , reduce likelihood of error have no idea call java file front end e.g. onclick of button.

the front end technologies i'm looking use html, css, javascript , ajax. i'm not looking use struts e.t.c not familiar them , limited on time.

thanks

reflection not in case, because need parse code (java in case) , interpret which. therefore need build ast of file.

ast (abstract syntax tree) build in java using eclipse jdt. on maven central:

    <dependency>         <groupid>org.eclipse.jdt</groupid>         <artifactid>org.eclipse.jdt.core</artifactid>         <version>3.12.2</version>     </dependency> 

eclipse jdt document model compared dom tree, dom tree can access elements, attributes , on of xml. ast has same scope, can access example class name, or methods of class extracting parameters names , types each method without instantiate object based on class. other artefacts documentation or comments accessible on jdt.

reflection can applied in case have class loaded on class loader, , so, there information documentation or parameters names cannot access through reflection.

a start read hands post: http://www.vogella.com/articles/eclipsejdt/article.html#jdt

and simple start done using code posted on answer


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -