Reference to Public Enum results in Anonymous Class
When I have a one-liner class that is a public enum declaration, and it sits next to another file that references that enum, and I compile everything, it results in an anonymous class when compiled. Example:


Entirety of CircuitType.java:

    public enum CircuitType { V110A20, V110A30, V208A20, V208A30 }

From Auditor.java, line 104:

    [...]
    switch (newCircuit.getType()) {
    [...]

From Circuit.java, lines 1-5:

    public class Circuit {
        private CircuitType myType;
        public CircuitType getType() {
            return this.myType;
        }
    [...]


The exact line 104 @ Auditor.java results in an additional class, Auditor$1.class, being generated when the command

    javac *.java

is executed. The files, obviously, all sit next to each other in a file system directory that contains nothing else.

I at first thought it was a package issue, so put the three classes in a package, but I didn't know enough about packages to get it working. If it's truely a package issue, can someone step me through exactly how to label them? I'd rather not have to package them if I don't have to, though.

The reason the anonymous class is a problem, besides the fact that such classes usually signify a namespace issue, is that it breaks my Makefile I use for automatic compilation.
Reference to Public Enum results in Anonymous Class
===

When I have a one-liner class that is a public enum declaration, and it sits next to another file that references that enum, and I compile everything, it results in an anonymous class when compiled. Example:


Entirety of CircuitType.java:

    public enum CircuitType { V110A20, V110A30, V208A20, V208A30 }

From Auditor.java, line 104:

    [...]
    switch (newCircuit.getType()) {
    [...]

From Circuit.java, lines 1-5:

    public class Circuit {
        private CircuitType myType;
        public CircuitType getType() {
            return this.myType;
        }
    [...]


The exact line 104 @ Auditor.java results in an additional class, Auditor$1.class, being generated when the command

    javac *.java

is executed. The files, obviously, all sit next to each other in a file system directory that contains nothing else.

I at first thought it was a package issue, so put the three classes in a package, but I didn't know enough about packages to get it working. If it's truely a package issue, can someone step me through exactly how to label them? I'd rather not have to package them if I don't have to, though.

The reason the anonymous class is a problem, besides the fact that such classes usually signify a namespace issue, is that it breaks my Makefile I use for automatic compilation.