Pattern Matching in the Java Object Model