I have a source code generator that risks generating the following type of code (just an example):
public class Outer { public static final Object Inner = new Object(); public static class Inner { public static final Object Help = new Object(); } public static void main(String[] args) { System.out.println(Outer.Inner.Help);
In the above example, Inner
ambiguously defined inside Outer
. Outer.Inner
can be either a nested class or a static member. It seems that both javac
and Eclipse compilers cannot dereference Outer.Inner.Help
. How can I access Help
?
Remember that the code above is generated, so renaming things is not a (simple) option.
source share