private Value getValueForType(Body body, LocalGenerator gen,
			Type tp, Set<SootClass> constructionStack, Set<SootClass> parentClasses) {
		// Depending on the parameter type, we try to find a suitable
		// concrete substitution
		if (isSimpleType(tp.toString()))
			return getSimpleDefaultValue(tp.toString());
		else if (tp instanceof RefType) {
			SootClass classToType = ((RefType) tp).getSootClass();
			
			if(classToType != null){
				// If we have a parent class compatible with this type, we use
				// it before we check any other option
				for (SootClass parent : parentClasses)
					if (isCompatible(parent, classToType)) {
						Value val = this.localVarsForClasses.get(parent.getName());
						if (val != null)
							return val;
					}

				// Create a new instance to plug in here
				Value val = generateClassConstructor(classToType, body, constructionStack, parentClasses);
				
				// If we cannot create a parameter, we try a null reference.
				// Better than not creating the whole invocation...
				if(val == null)
					return NullConstant.v();
				
				return val;
			}
		}
		else if (tp instanceof ArrayType) {
			Value arrVal = buildArrayOfType(body, gen, (ArrayType) tp, constructionStack, parentClasses);
			if (arrVal == null){
				logger.warn("Array parameter substituted by null");
				return NullConstant.v();
			}
			return arrVal;
		}
		else {
			logger.warn("Unsupported parameter type: {}", tp.toString());
			return null;
		}
		throw new RuntimeException("Should never see me");
    }