public Object getOneOptional ( Object locator ) { try { List < Object > components = find ( Object . class , locator , false ) ; return components . size ( ) > 0 ? components . get ( 0 ) : null ; } catch ( Exception ex ) { return null ; } }
Gets an optional component reference that matches specified locator .