question: private Optional < Class < ? > > unwrap ( Object pageObject ) { Class < ? > wrappedClass = pageObject . getClass ( ) ; while ( wrappedClass != null && ! wrappedClass . isAnnotationPresent ( PageObject . class ) ) { wrappedClass = wrappedClass . getSuperclass ( ) ; } return Optional . ofNullable ( wrappedClass ) ; }
target:  Unwraps class wrapped by guice injector.