@Test public void testGetConfigKeys() { String[] keys = { ConfigurationProperties.PREFIX_PRIORITY + "java.lang.String", ConfigurationProperties.PREFIX_PRIORITY + "String" }; assertArrayEquals( keys, PrioritizedComponents.getConfigKeys( String.class ) ); keys = new String[] { ConfigurationProperties.PREFIX_PRIORITY + "java.util.concurrent.ThreadFactory", ConfigurationProperties.PREFIX_PRIORITY + "ThreadFactory", ConfigurationProperties.PREFIX_PRIORITY + "Thread" }; assertArrayEquals( keys, PrioritizedComponents.getConfigKeys( ThreadFactory.class ) ); }
static String[] getConfigKeys( Class<?> type ) { List<String> keys = new ArrayList<String>(); keys.add( ConfigurationProperties.PREFIX_PRIORITY + type.getName() ); String sn = type.getSimpleName(); keys.add( ConfigurationProperties.PREFIX_PRIORITY + sn ); if ( sn.endsWith( FACTORY_SUFFIX ) ) { keys.add( ConfigurationProperties.PREFIX_PRIORITY + sn.substring( 0, sn.length() - FACTORY_SUFFIX.length() ) ); } return keys.toArray( new String[keys.size()] ); }
PrioritizedComponents { static String[] getConfigKeys( Class<?> type ) { List<String> keys = new ArrayList<String>(); keys.add( ConfigurationProperties.PREFIX_PRIORITY + type.getName() ); String sn = type.getSimpleName(); keys.add( ConfigurationProperties.PREFIX_PRIORITY + sn ); if ( sn.endsWith( FACTORY_SUFFIX ) ) { keys.add( ConfigurationProperties.PREFIX_PRIORITY + sn.substring( 0, sn.length() - FACTORY_SUFFIX.length() ) ); } return keys.toArray( new String[keys.size()] ); } }
PrioritizedComponents { static String[] getConfigKeys( Class<?> type ) { List<String> keys = new ArrayList<String>(); keys.add( ConfigurationProperties.PREFIX_PRIORITY + type.getName() ); String sn = type.getSimpleName(); keys.add( ConfigurationProperties.PREFIX_PRIORITY + sn ); if ( sn.endsWith( FACTORY_SUFFIX ) ) { keys.add( ConfigurationProperties.PREFIX_PRIORITY + sn.substring( 0, sn.length() - FACTORY_SUFFIX.length() ) ); } return keys.toArray( new String[keys.size()] ); } PrioritizedComponents( RepositorySystemSession session );   PrioritizedComponents( Map<?, ?> configurationProperties ); }
PrioritizedComponents { static String[] getConfigKeys( Class<?> type ) { List<String> keys = new ArrayList<String>(); keys.add( ConfigurationProperties.PREFIX_PRIORITY + type.getName() ); String sn = type.getSimpleName(); keys.add( ConfigurationProperties.PREFIX_PRIORITY + sn ); if ( sn.endsWith( FACTORY_SUFFIX ) ) { keys.add( ConfigurationProperties.PREFIX_PRIORITY + sn.substring( 0, sn.length() - FACTORY_SUFFIX.length() ) ); } return keys.toArray( new String[keys.size()] ); } PrioritizedComponents( RepositorySystemSession session );   PrioritizedComponents( Map<?, ?> configurationProperties ); void add( T component, float priority ); boolean isEmpty(); List<PrioritizedComponent<T>> getAll(); List<PrioritizedComponent<T>> getEnabled(); void list( StringBuilder buffer ); @Override String toString(); }
PrioritizedComponents { static String[] getConfigKeys( Class<?> type ) { List<String> keys = new ArrayList<String>(); keys.add( ConfigurationProperties.PREFIX_PRIORITY + type.getName() ); String sn = type.getSimpleName(); keys.add( ConfigurationProperties.PREFIX_PRIORITY + sn ); if ( sn.endsWith( FACTORY_SUFFIX ) ) { keys.add( ConfigurationProperties.PREFIX_PRIORITY + sn.substring( 0, sn.length() - FACTORY_SUFFIX.length() ) ); } return keys.toArray( new String[keys.size()] ); } PrioritizedComponents( RepositorySystemSession session );   PrioritizedComponents( Map<?, ?> configurationProperties ); void add( T component, float priority ); boolean isEmpty(); List<PrioritizedComponent<T>> getAll(); List<PrioritizedComponent<T>> getEnabled(); void list( StringBuilder buffer ); @Override String toString();  }