@Override
	public CodeLineList generateCode(Code relatedClass, Method relatedMethod,
			boolean forCodeGeneration) {
		CodeLineList typeCodeList = this.getChild(0).generateCode(relatedClass,
				relatedMethod, true);
		CodeLine typeLine = typeCodeList.getCodeLine(0);
		String type = typeLine.getCode();
		if (type.contains(",")) {
			if (type.contains("[")) {
				String type0 = type.split(",")[0];
				String type1 = type.split(",")[1];
				int first = type1.indexOf('[');
				int last = type1.lastIndexOf(']');
				char[] c = new char[last - first + 1];
				type1.getChars(first, last + 1, c, 0);
				type = type0 + String.valueOf(c);
			} else {
				type = type.split(",")[0];
			}
		}

		CodeLineList code = this.getChild(1).generateCode(relatedClass,
				relatedMethod, true);
		for (int i = 2; i < this.getNumberOfChildren(); i++) {
			code.addCodeToLastLine(new CodeLine(", ", -1));
			code.concatLast(this.getChild(i).generateCode(relatedClass,
					relatedMethod, true));
		}
		LDNode ch = this.getChild(0).getChild(0);
		if (ch.getNumberOfChildren() == 0
				&& ch.firstToken.kind == PseuCoParserConstants.IDENTIFIER) {

			if (CodeGen.needsPseuCoPrefix(type)) {
				String oldType = type;
				type = "PseuCo_" + type;
				int size = code.getNUmberOfElements();
				for (int i = 0; i < size; i++) {
					CodeLine line = code.getCodeLine(i);
					String c = line.getCode();
					if (c.contains(oldType)) {
						c = CodeGen.replace(c, oldType, type);
						code.setCodeLine(
								new CodeLine(c, line.getPseuCoLineNumbers()), i);
					}
				}
			}

		}
		if (type.equals("ReentrantLock")) {
			type = "final " + type;
		}
		CodeLineList returnCode = code.addCodeAtTheBeginning(new CodeLine(type
				+ " ", typeLine.getPseuCoLineNumbers()));

		passNodeFieldsToTheParentNode();
		return returnCode;
	}