* @see org.kuali.rice.krad.keyvalues.KeyValuesFinder#getKeyValues()
*/
@Override
public List<KeyValue> getKeyValues() {
List<KeyValue> kvs = new ArrayList<KeyValue>(3);
kvs.add(new ConcreteKeyValue("", ""));
// from stack overflow answer
ClassPathScanningCandidateComponentProvider scanner = new ClassPathScanningCandidateComponentProvider(false);
scanner.addIncludeFilter(new AssignableTypeFilter(Matter.class));
try {
Set<BeanDefinition> results = scanner.findCandidateComponents(getBasePackage());
for (BeanDefinition beanDef: results) {
ConcreteKeyValue kv = new ConcreteKeyValue(
beanDef.getBeanClassName(), beanDef.getBeanClassName().substring(beanDef.getBeanClassName().lastIndexOf('.') + 1));
kvs.add(kv);
}
} catch (Exception e) {
log.error(e.getMessage());