Constraints:
I have a maven source code generator that I wrote that is creating POJO classes from some data files that have nested namespaces. I want each namespace to be nested as an inner class. In some cases out of my control I end up with inner classes that are the same simple name as the outermost class.
All the classes must be
public
scope as this is for a type safe wrapper over something like a properties file, but hierarchical..I can't change the names otherwise I am changing the names meaning and the namespace that is enclosing data.
Given than I have the following code:
public class A
{
public class B
{
public class A
{
}
}
}
Inner classes should append the name of the outer class to form a unique namespace such as A$B$A.class
, I haven't found a valid reason for this not to compile.
Is there any trick to get this to compile?
See Question&Answers more detail:os