/** * Finds the component information. * * <p>This method is lenient, ignoring case and matching simple type names. * * @param type the type to get, not null * @param classifier the classifier that distinguishes the component, case insensitive, not null * @return the component information, null if not found */ public ComponentInfo findInfo(final Class<?> type, final String classifier) { ArgumentChecker.notNull(type, "type"); final ComponentTypeInfo typeInfo = findTypeInfo(type); if (typeInfo != null) { for (final String realClassifier : typeInfo.getInfoMap().keySet()) { if (realClassifier.equalsIgnoreCase(classifier)) { return typeInfo.getInfo(realClassifier); } } } return null; }
/** * Gets component information by type and classifier. * * @param type the type to get, not null * @param classifier the classifier that distinguishes the component, not null * @return the component information, not null * @throws IllegalArgumentException if no component is available */ public ComponentInfo getInfo(final Class<?> type, final String classifier) { ArgumentChecker.notNull(type, "type"); final ComponentTypeInfo typeInfo = getTypeInfo(type); return typeInfo.getInfo(classifier); }