I would like to create some reverse oriented project documents based on Java code (rather than bytecode) instead of writing my own interpreter, what tools and APIs are available for passing Java code using Java code?
Reflection occurs on bytecode and is limited by the method level, I want to "objectify" the method code as well.
Java-doc ignores the code itself and only based on comments, automatic UML-sequnces are too strict
eg. An API like this (forgive my ignorance of the official terms of the Structure of Programming Languages):
JavaCodeDom jcd = new JavaCodeDom(new File(pathToJavaSource), CompilerEnum.Java16)
List <ClassSrc> classes = jcd.getClasses();
ClassSrc cls = classes.get(0);
Map<MethodSignatureSrc,MethodSrc> methods = cls.getMethodsMap();
MethodSrc main = mothds.get(new MethodSignatureSrc(Modifiers.Public, Modifiers.Static, ReturnTypes.Void, "main", new MethodParams(String[].class))
List<StatementSrc> statements = main.getStatements();
for(StatementSrc statement : statements){
if(statement.getType()==StatementTypes.Assignment()){
AssignmentStatementSrc assignment = (AssignmentStatementSrc)statement;
Identifier src = assignment.getAssigneeVariable();
ExpressinoSrc = assignment.getAssignmentValue();
}
}
List<AnnotationsSrc> annotations = cls.getAnnotations();
source
share