public Class getSearchClass ( ) { Object obj = getExampleObject ( ) ; if ( obj instanceof Identity ) { return ( ( Identity ) obj ) . getObjectsTopLevelClass ( ) ; } else { return obj . getClass ( ) ; } }
Answer the search class . This is the class of the example object or the class represented by Identity .