public static LocaleDisplayNames getInstance ( ULocale locale , DisplayContext ... contexts ) { LocaleDisplayNames result = null ; if ( FACTORY_DISPLAYCONTEXT != null ) { try { result = ( LocaleDisplayNames ) FACTORY_DISPLAYCONTEXT . invoke ( null , locale , contexts ) ; } catch ( InvocationTargetException e ) { // fall through } catch ( IllegalAccessException e ) { // fall through } } if ( result == null ) { result = new LastResortLocaleDisplayNames ( locale , contexts ) ; } return result ; }
Returns an instance of LocaleDisplayNames that returns names formatted for the provided locale using the provided DisplayContext settings