Index
All Classes and Interfaces|All Packages
A
- AbstractAnimal - Class in Unnamed Package
-
Abstract base class combining shared state, a concrete default method, and an abstract method subclasses must implement.
- AbstractAnimal() - Constructor for class AbstractAnimal
- age - Variable in class AbstractAnimal
-
Structural state isolated inside a class footprint (interfaces cannot hold this).
- Animal - Class in Unnamed Package
-
Base class exposing an overridable
speak()method. - Animal() - Constructor for class Animal
C
- Cat - Class in Unnamed Package
-
Animalsubclass that overridesspeak()to meow. - Cat() - Constructor for class Cat
D
- directSpeak(PureBreedDog) - Static method in class Part4_InterfaceMonomorphism
-
Scenario A: Monomorphic target explicitly declared by final type reference.
- Dog - Class in Unnamed Package
-
Animalsubclass that overridesspeak()to bark. - Dog() - Constructor for class Dog
- DogWithDefault - Class in Unnamed Package
-
Concrete
AbstractAnimalthat implements the requiredspeak()method. - DogWithDefault() - Constructor for class DogWithDefault
I
- InterfaceCat - Class in Unnamed Package
-
ISpeakerimplementation that meows. - InterfaceCat() - Constructor for class InterfaceCat
- InterfaceDog - Class in Unnamed Package
-
ISpeakerimplementation that barks. - InterfaceDog() - Constructor for class InterfaceDog
- ISingleSpeaker - Interface in Unnamed Package
-
Interface contract for a single, non-substitutable speaker.
- ISpeaker - Interface in Unnamed Package
-
Interface contract for anything that can speak.
M
- main(String[]) - Static method in class Part1_InheritancePolymorphism
- main(String[]) - Static method in class Part2_InheritanceWithDefaults
- main(String[]) - Static method in class Part3_InterfacePolymorphism
- main(String[]) - Static method in class Part4_InterfaceMonomorphism
- makeSleep(AbstractAnimal) - Static method in class Part2_InheritanceWithDefaults
-
Dynamic Dispatch using abstract parent reference.
- makeSpeak(Animal) - Static method in class Part1_InheritancePolymorphism
-
Dynamic Dispatch via Class vtable.
- makeSpeak(ISpeaker) - Static method in class Part3_InterfacePolymorphism
-
Contractual Dispatch via Dynamic itable Lookups.
P
- Part1_InheritancePolymorphism - Class in Unnamed Package
-
Demonstrates inheritance-based polymorphism resolved via the JVM's per-class virtual method table (vtable).
- Part1_InheritancePolymorphism() - Constructor for class Part1_InheritancePolymorphism
- Part2_InheritanceWithDefaults - Class in Unnamed Package
-
Demonstrates inheritance-based polymorphism where a concrete default method is inherited unchanged alongside an abstract method that must be overridden.
- Part2_InheritanceWithDefaults() - Constructor for class Part2_InheritanceWithDefaults
- Part3_InterfacePolymorphism - Class in Unnamed Package
-
Demonstrates interface-based polymorphism resolved via the JVM's itable (interface method table) rather than a class vtable.
- Part3_InterfacePolymorphism() - Constructor for class Part3_InterfacePolymorphism
- Part4_InterfaceMonomorphism - Class in Unnamed Package
-
Demonstrates monomorphic dispatch: because
PureBreedDogisfinal, the JIT can devirtualize the call and invokespeak()directly, without an itable/vtable lookup. - Part4_InterfaceMonomorphism() - Constructor for class Part4_InterfaceMonomorphism
- PureBreedDog - Class in Unnamed Package
-
Sealed 'final' class ensures NO other subclass can modify this method path.
- PureBreedDog() - Constructor for class PureBreedDog
S
- sleep() - Method in class AbstractAnimal
-
A concrete default method, inherited as-is by all subclasses.
- speak() - Method in class AbstractAnimal
-
Abstract method that subclasses must override.
- speak() - Method in class Animal
-
Emits the generic animal sound.
- speak() - Method in class Cat
- speak() - Method in class Dog
- speak() - Method in class DogWithDefault
- speak() - Method in class InterfaceCat
- speak() - Method in class InterfaceDog
- speak() - Method in interface ISingleSpeaker
- speak() - Method in interface ISpeaker
-
Emits this speaker's sound.
- speak() - Method in class PureBreedDog
All Classes and Interfaces|All Packages