public < T > T getOneRequired ( Class < T > type , Object locator ) throws ReferenceException { List < T > components = find ( type , locator , true ) ; return components . size ( ) > 0 ? components . get ( 0 ) : null ; }
Gets a required component reference that matches specified locator and matching to the specified type .