}
// should be parameter
if (previous instanceof ParameterMetaData == false)
throw new IllegalArgumentException("Previous node is not ParameterMetaData as expected: " + previous);
ParameterMetaData parameter = (ParameterMetaData) previous;
String[] parameterTypes = Configurator.getParameterTypes(false, parameters);
MethodInfo methodInfo = Configurator.findMethodInfo(classInfo, factoryMethod, parameterTypes, factoryClassName != null, true);
return applyCollectionOrMapCheck(methodInfo.getParameterTypes()[parameter.getIndex()]);
}
else
{
KernelControllerContext context = visitor.getControllerContext();
BeanInfo beanInfo = context.getBeanInfo();
// find matching parameter
if (previous instanceof ParameterMetaData)
{
ParameterMetaData parameter = (ParameterMetaData) previous;
String[] paramTypes = Configurator.getParameterTypes(false, parameters);
ConstructorInfo ci = Configurator.findConstructorInfo(beanInfo.getClassInfo(), paramTypes);
return applyCollectionOrMapCheck(ci.getParameterTypes()[parameter.getIndex()]);
}
else
{
// currently value constructor supports only values that are instances of class itself
// this will add another instance with the same class to context