code: public NameSpace get(int depth) {
          int size = stack.size();
          if ( depth >= size )
              return NameSpace.JAVACODE;
          return stack.toArray(new NameSpace[size])[size-1-depth];
      }
docs: zero based.