2 Replies Latest reply: Aug 6, 2007 9:23 PM by EJP RSS

    What is syntax to get container object of instance of inner class?

    807605
      I can not seem to find the syntax for referring to the container object of an instance of an inner class. For example

      class Outer {
      class Inner {
      public boolean hasSameContainer( Outer.Inner input );
      }
      }

      If the method hasSameContainer is supposed to determine whether the container object of "this", which is "Outer.this", was the same as the container object of "input", what syntax is to be used to refer to the container object of "input"? The basic idea is that I have inner classes which can be combined by various methods, but only if they belong to the same container object, not otherwise.

      John Robertson