An inner class has a reference to an instance of its outer class. This is a has-a relationship.
If it extends its outer class, it also has a is-a relationship wit its outer class.
So it's equivalent to the following two top-level classes:
public class Foo {
...
}
public class Bar extends Foo {
private Foo outerFoo;
...
}