Implement domain entity class detection.

Resolve #10.