* @throws Exception
	 */

	private JMethod generateCommandSignature(JDefinedClass jClusterInterface, ZclCommandDescriptor zclCommandDescriptor,
			boolean addContext) throws Exception {

		if (zclCommandDescriptor.isResponse())
			return null;

		// FIXME: the return type depends on the returned response!!!!
		JType jReturnType = null;

		ZclCommandDescriptor responseCommand = zclCommandDescriptor.getResponse();
		if (responseCommand != null)
			jReturnType = jTypeForZbTypename(jModel, jClusterInterface.getPackage(), responseCommand.getName(), responseCommand);
		else
			jReturnType = jModel.VOID;

		JMethod jMethodCommandSignature = jClusterInterface.method(JMod.PUBLIC, jReturnType, getCommandName(zclCommandDescriptor));
		jMethodCommandSignature._throws(ApplianceException.class);
		jMethodCommandSignature._throws(ServiceClusterException.class);

		if (addContext && !contextLast)
			jMethodCommandSignature.param(IEndPointRequestContext.class, "context");

		Vector zclParametersDescriptors = zclCommandDescriptor.getParametersDescriptors();

		for (int i = 0; i < zclParametersDescriptors.size(); i++) {
			ZclField zclParameterDescriptor = (ZclField) zclParametersDescriptors.get(i);
			JType type = jTypeForZbTypename(jModel, jClusterInterface.getPackage(), zclParameterDescriptor.getType(),
					zclParameterDescriptor);

			if (zclParameterDescriptor.isArray()) {
				jMethodCommandSignature.param(type.array(), zclParameterDescriptor.getName());
			} else {
				jMethodCommandSignature.param(type, zclParameterDescriptor.getName());
			}
		}

		if (addContext && contextLast)
			jMethodCommandSignature.param(IEndPointRequestContext.class, "context");

		if (confirmationRequiredField)
			jMethodCommandSignature.param(boolean.class, "confirmationRequired");

		return jMethodCommandSignature;
	}