Will ignore scoped proxy target bean names. https://github.com/ocpsoft/rewrite/issues/170

@param beanFactory bean factory
@param clazz       type
@return set of bean names
324812
private Set<String> resolveBeanNames(ListableBeanFactory beanFactory, Class<?> clazz) {

		final Set<String> result = new HashSet<String>();

		Map<String, ?> beanMap = beanFactory.getBeansOfType(clazz);
		for (String name : beanMap.keySet()) {
			if (name != null && !name.startsWith("scopedTarget.")) {
				result.add(name);
			}
		}

		return result;

	}
873385
@SuppressWarnings({"unchecked", "unused"})
    @Internal
    protected final Object getProxiedBean(BeanContext beanContext) {
        DefaultBeanContext defaultBeanContext = (DefaultBeanContext) beanContext;
        Optional<String> qualifier = getAnnotationMetadata().getAnnotationNameByStereotype(javax.inject.Qualifier.class);
        return defaultBeanContext.getProxyTargetBean(getBeanType(), (Qualifier<T>) qualifier.map(q -> Qualifiers.byAnnotation(getAnnotationMetadata(), q)).orElse(null));
    }
560029
@Override
    public void setBean(Class<?> type, Object proxyBean) {
        BeanDefine beanDefine = pool.get(type.getName());
        if (beanDefine != null) {
            beanDefine.setBean(proxyBean);
        } else {
            beanDefine = new BeanDefine(proxyBean, type);
        }
        pool.put(type.getName(), beanDefine);
    }
1334569
public boolean addObjectFactoryForClass(JDefinedClass clazz) {
		JDefinedClass valueObjectFactoryClass = clazz._package()._getClass(FACTORY_CLASS_NAME);

		if (objectFactoryClasses.containsKey(valueObjectFactoryClass.fullName())) {
			return false;
		}

		objectFactoryClasses.put(valueObjectFactoryClass.fullName(), valueObjectFactoryClass);

		JDefinedClass objectFactoryClass = null;

		// If class has a non-hidden interface, then there is object factory in another package.
		for (Iterator<JClass> iter = clazz._implements(); iter.hasNext();) {
			JClass interfaceClass = iter.next();

			if (!isHiddenClass(interfaceClass)) {
				objectFactoryClass = interfaceClass._package()._getClass(FACTORY_CLASS_NAME);

				if (objectFactoryClass != null) {
					objectFactoryClasses.put(objectFactoryClass.fullName(), objectFactoryClass);
				}
			}
		}

		return objectFactoryClass != null;
	}
331382
protected TypeReference<?> getBeanPropertyType(Class<?> clazz,
			String propertyName, TypeReference<?> originalType) {
		TypeReference<?> propertyDestinationType = null;
		if (beanDestinationPropertyTypeProvider != null) {
			propertyDestinationType = beanDestinationPropertyTypeProvider
					.getPropertyType(clazz, propertyName, originalType);
		}
		if (propertyDestinationType == null) {
			propertyDestinationType = originalType;
		}
		return propertyDestinationType;
	}
220002
public static BeanPropertyAccessor forClass(Class<?> clazz) {
        synchronized (cAccessors) {
            BeanPropertyAccessor bpa = cAccessors.get(clazz);
            if (bpa != null) {
                return bpa;
            }
            bpa = generate(clazz);
            cAccessors.put(clazz, bpa);
            return bpa;
        }
    }
211180
public static <T> T getProperty(Object bean, String name, Class<T> clazz) throws Exception {
        Method method = ReflectUtils.getPropertyGetterMethod(bean.getClass(), name);
        if (method.isAccessible()) {
            return (T) method.invoke(bean);
        } else {
            try {
                method.setAccessible(true);
                return (T) method.invoke(bean);
            } finally {
                method.setAccessible(false);
            }
        }
    }
359105
@Override
    @SuppressWarnings("unchecked")
    public synchronized <A extends Annotation> OverrideReferenceFactory<A>[] getOverrideReferenceFactories(Class<A> klass) // F743-32443
    {
        ivOverrideReferenceFactoryMapCopyOnWrite = true; // PM79779
        return (OverrideReferenceFactory<A>[]) ivOverrideReferenceFactoryMap.get(klass);
    }
114699
public static List<String> getFieldNames(Class<? extends Enum<?>> clazz) {
		final List<String> names = new ArrayList<>();
		final Field[] fields = ReflectUtil.getFields(clazz);
		String name;
		for (Field field : fields) {
			name = field.getName();
			if (field.getType().isEnum() || name.contains("$VALUES") || "ordinal".equals(name)) {
				continue;
			}
			if(false == names.contains(name)) {
				names.add(name);
			}
		}
		return names;
	}
185153
public void registerPrototype(String name, Class<?> clazz) throws BeansException {
        GenericBeanDefinition bd = new GenericBeanDefinition();
        bd.setScope(GenericBeanDefinition.SCOPE_PROTOTYPE);
        bd.setBeanClass(clazz);
        getDefaultListableBeanFactory().registerBeanDefinition(name, bd);
    }
1153042
public static <T> T getBean(Class<T> clazz) {
        return getSenBotContext().context.getBean(clazz);
    }
16583
public static List<Field> getAllFields(Class<?> clazz) {
        final List<Field> ret = new ArrayList<>();
        do {
            ret.addAll(Arrays.asList(clazz.getDeclaredFields()));
            clazz = clazz.getSuperclass();
        } while (clazz != null);
        return ret;
    }
138864
public void configureFactory(Class<?> clazz) {
        ConnectionConfiguration connectionConfiguration = resolveConnectionConfiguration(clazz);
        if (connectionConfiguration == null) {
            return;
        }
        connectionFactory.setHost(connectionConfiguration.host());
        connectionFactory.setVirtualHost(connectionConfiguration.virtualHost());
        connectionFactory.setPort(connectionConfiguration.port());
        connectionFactory.setConnectionTimeout(connectionConfiguration.timeout());
        connectionFactory.setRequestedHeartbeat(connectionConfiguration.heartbeat());
        connectionFactory.setUsername(connectionConfiguration.username());
        connectionFactory.setPassword(connectionConfiguration.password());
        connectionFactory.setRequestedFrameMax(connectionConfiguration.frameMax());
    }
292152
static synchronized BeanFactoryId register(Class<?> clazz, Set<String> pathParams,
                                               List<RequestObjectResolver> objectResolvers) {
        final BeanFactoryId beanFactoryId = new BeanFactoryId(clazz, pathParams);
        if (!factories.containsKey(beanFactoryId)) {
            final AnnotatedBeanFactory<Object> factory = createFactory(beanFactoryId, objectResolvers);
            if (factory != null) {
                factories.put(beanFactoryId, factory);
                logger.debug("Registered a bean factory: {}", beanFactoryId);
            } else {
                factories.put(beanFactoryId, unsupportedBeanFactory);
            }
        }
        return beanFactoryId;
    }
1208529
public static List<Field> getColumns(Class<?> clazz)
			throws NoColumnAnnotationException {
		if(clazz == null) {
			throw new NoColumnAnnotationException("class is null");
		}
			
		List<Field> result = _getAnnotationColumns(clazz, Column.class);
		if (result.isEmpty()) {
			throw new NoColumnAnnotationException("class " + clazz.getName()
					+ " does not have any @Column fields");
		}
		
		return result;
	}
208780
private static <T> T bean2Another(Object object, Class<?> clazz, T another) throws InvocationTargetException,
            IllegalAccessException {
        Method[] methods = object.getClass().getMethods();
        Map<String, Method> clazzMethods = ReflectUtils.getMethodMap(clazz, "set");
        for (Method method : methods) {
            String name = method.getName();
            if (name.startsWith("get") && !"getClass".equals(name)) {
                String clazzMethod = "s" + name.substring(1);
                if (clazzMethods.containsKey(clazzMethod)) {
                    Object value = method.invoke(object);
                    if (Checker.isNotNull(value)) {
                        clazzMethods.get(clazzMethod).invoke(another, value);
                    }
                }
            }
        }
        return another;

    }
1289429
@Override
    public Class<? extends ChannelFactory> lookupFactory(String name) {
        Class<? extends ChannelFactory> clazz = null;
        synchronized (this.factories) {
            clazz = this.factories.get(name);
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "lookupFactory: " + name + ": " + clazz);
        }
        if (null != clazz) {
            // if we found a registration and a provider, let it know
            ChannelFactoryProvider provider = this.providers.get(name);
            if (null != provider && !activatedProviders.contains(provider)) {
                this.activatedProviders.add(provider);
                provider.init();
            }
        }
        return clazz;
    }