@Test public void testMatches() { TypeDescriptor target = TypeDescriptor.valueOf(Ninja.class); assertTrue(converter.matches(null, target)); }
@Override public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) { String serviceName = NamingUtil.toAttributeName( NamingUtil.getSimpleName(targetType.getName())) + "Service"; Object service = beanFactory.getBean(serviceName); if (service != null && BaseCrudService.class.isAssignableFrom(service.getClass()) ) return true; return false; }
StringToBaseEntityConverter implements 
		ConditionalGenericConverter, BeanFactoryAware { @Override public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) { String serviceName = NamingUtil.toAttributeName( NamingUtil.getSimpleName(targetType.getName())) + "Service"; Object service = beanFactory.getBean(serviceName); if (service != null && BaseCrudService.class.isAssignableFrom(service.getClass()) ) return true; return false; } }
StringToBaseEntityConverter implements 
		ConditionalGenericConverter, BeanFactoryAware { @Override public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) { String serviceName = NamingUtil.toAttributeName( NamingUtil.getSimpleName(targetType.getName())) + "Service"; Object service = beanFactory.getBean(serviceName); if (service != null && BaseCrudService.class.isAssignableFrom(service.getClass()) ) return true; return false; }  }
StringToBaseEntityConverter implements 
		ConditionalGenericConverter, BeanFactoryAware { @Override public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) { String serviceName = NamingUtil.toAttributeName( NamingUtil.getSimpleName(targetType.getName())) + "Service"; Object service = beanFactory.getBean(serviceName); if (service != null && BaseCrudService.class.isAssignableFrom(service.getClass()) ) return true; return false; }  @Override Set<ConvertiblePair> getConvertibleTypes(); @Override Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType); @Override boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType); final void setBeanFactory(BeanFactory beanFactory); final void setBaseEntityRegistry(BaseEntityRegistry baseEntityRegistry); }
StringToBaseEntityConverter implements 
		ConditionalGenericConverter, BeanFactoryAware { @Override public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) { String serviceName = NamingUtil.toAttributeName( NamingUtil.getSimpleName(targetType.getName())) + "Service"; Object service = beanFactory.getBean(serviceName); if (service != null && BaseCrudService.class.isAssignableFrom(service.getClass()) ) return true; return false; }  @Override Set<ConvertiblePair> getConvertibleTypes(); @Override Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType); @Override boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType); final void setBeanFactory(BeanFactory beanFactory); final void setBaseEntityRegistry(BaseEntityRegistry baseEntityRegistry);  }