public Collection<ConfiguredObjectAttribute<?, ?>> getTypeSpecificAttributes(Class<? extends ConfiguredObject> clazz) { Class<? extends ConfiguredObject> typeClass = getTypeClass(clazz); if (typeClass == null) { throw new IllegalArgumentException("Cannot locate ManagedObject information for " + clazz.getName()); } Collection<ConfiguredObjectAttribute<?, ?>> typeAttrs = _typeSpecificAttributes.get(typeClass); return Collections.unmodifiableCollection(typeAttrs == null ? Collections.<ConfiguredObjectAttribute<?, ?>>emptySet() : typeAttrs); }
public Collection<ConfiguredObjectStatistic<?, ?>> getTypeSpecificStatistics(final Class<? extends ConfiguredObject> clazz) { Class<? extends ConfiguredObject> typeClass = getTypeClass(clazz); if (typeClass == null) { throw new IllegalArgumentException("Cannot locate ManagedObject information for " + clazz.getName()); } Collection<ConfiguredObjectStatistic<?, ?>> typeAttrs = _typeSpecificStatistics.get(typeClass); return Collections.unmodifiableCollection(typeAttrs == null ? Collections.emptySet() : typeAttrs); }
public Collection<String> getValidChildTypes(Class<? extends ConfiguredObject> type, String childCategory) { final Map<String, Collection<String>> allValidChildTypes = _validChildTypes.get(getTypeClass(type)); if (allValidChildTypes != null) { final Collection<String> validTypesForSpecificChild = allValidChildTypes.get(childCategory); return validTypesForSpecificChild == null ? null : Collections.unmodifiableCollection(validTypesForSpecificChild); } else { return null; } }
private String getTypeName(final Class<? extends ConfiguredObject> type, Model model) { return type.getAnnotation(ManagedObject.class).type() == null ? model.getTypeRegistry().getTypeClass(type).getSimpleName() : type.getAnnotation(ManagedObject.class).type(); }
Class<? extends ConfiguredObject> typeClass = model.getTypeRegistry().getTypeClass(getClass()); _typeClass = typeClass == null ? _category : typeClass;