code: public static boolean exists(Class<?> clas) {
  		try {
  			context.getBean(clas);
  			return true;
  		} catch (NoSuchBeanDefinitionException ex) {
  			return !(clas.isInterface() || Modifier.isAbstract(clas.getModifiers()));
  		}
  	}
docs: Exists.
  
  @param clas the clas
  @return true, if successful