I need to do some operations on the AST produced by the java parser. My problem is I want to check a class initialization cycle problem is there or not.
One example is,
class mark1 {
public static final int x = mark2.p * 5;
//Do some operations here
}
class mark2 {
public static final int p = mark1.x + 100;
//Do some operations here
}
The initialization order of the classes can vary, causing computation of different values for mark1.x and mark2.p. I am trying to implement it using javaparser produced AST but didn't get a feasible solution.