0

Here's part of the code in Category.java

public class Category

    {
        static public final class range
        {
            public range( double lower, double upper )
            {
                this.lower = lower;
                this.upper = upper;
            }
            public double lower;
            public double upper;
        }    
    static public Map< category_type, range > validCategoryRanges = new EnumMap<>(category_type.class);
    ...

When access is needed in other files of same package, there's no such class, only field validCategoryRanges is seen. (In Eclipse it worked).

Vincent Ramdhanie
  • 102,349
  • 23
  • 137
  • 192
John
  • 143
  • 1
  • 2
  • 12
  • Do you not get auto completion, or does it actually not compile? – Cubic Dec 25 '12 at 21:41
  • It does not show inner class and enum as available member when using dot operator on outer class. – John Dec 25 '12 at 21:48
  • What version of netbeans are you using? In any case, you can pretty much ignore it and just write the name out, it will compile either way. – Cubic Dec 25 '12 at 22:41
  • Maybe you can try deleting your netbeans cache. [clearing-cache-in-netbeans](http://stackoverflow.com/questions/8689780/clearing-cache-in-netbeans) – Laszlo Papp Dec 25 '12 at 23:15
  • I've found it. Any enum name I put is available in dot operator pop up list. Once I put category_type, it's not seen. – John Dec 25 '12 at 23:18
  • It did not also take range nested class. Why it happened? After I cleaned caches ( as such name could exist, I decided there's a collision so IDE does not show it ) it worked. – John Dec 25 '12 at 23:28

1 Answers1

0

Try to define your nested classes outside the initialisation block, just like any member variable. This should have nothing to do with whatever IDE that you are using. public class OuterClass { public static final class InnerClass { } }

HackerMonkey
  • 443
  • 3
  • 13