public final static Object getObject(String commandPart, Gateway gateway) {
		if (isEmpty(commandPart) || isEnd(commandPart)) {
			throw new Py4JException("Command Part is Empty or is the End of Command Part");
		} else {
			switch (commandPart.charAt(0)) {
			case BOOLEAN_TYPE:
				return getBoolean(commandPart);
			case DOUBLE_TYPE:
				return getDouble(commandPart);
			case LONG_TYPE:
				return getLong(commandPart);
			case INTEGER_TYPE:
				try {
					return getInteger(commandPart);
				} catch (NumberFormatException e) {
					return getLong(commandPart);
				}
			case BYTES_TYPE:
				return getBytes(commandPart);
			case NULL_TYPE:
				return getNull(commandPart);
			case VOID:
				return getNull(commandPart);
			case REFERENCE_TYPE:
				return getReference(commandPart, gateway);
			case STRING_TYPE:
				return getString(commandPart);
			case DECIMAL_TYPE:
				return getDecimal(commandPart);
			case PYTHON_PROXY_TYPE:
				return getPythonProxy(commandPart, gateway);
			default:
				throw new Py4JException("Command Part is unknown: " + commandPart);
			}
		}
	}
@Test
	public void testGetObject() {
		Gateway gateway = new Gateway(null);
		Object obj1 = new Object();
		gateway.putObject("o123", obj1);
		assertEquals(1, Protocol.getObject("i1", null));
		assertEquals(true, Protocol.getObject("bTrue", null));
		assertEquals(1.234, (Double) Protocol.getObject("d1.234", null), 0.001);
		assertEquals(obj1, Protocol.getObject("ro123", gateway));
		assertEquals("Hello\nWorld\t", Protocol.getObject("sHello\\nWorld\t", null));
		assertEquals(123l, Protocol.getObject("L123", null));
		assertEquals(new BigDecimal("-14.456"), Protocol.getObject("D-14.456", null));
		assertNull(Protocol.getObject("n", null));
		try {
			Protocol.getObject(null, null);
			fail();
		} catch (Py4JException e) {
			assertTrue(true);
		}
		try {
			Protocol.getObject("", null);
			fail();
		} catch (Py4JException e) {
			assertTrue(true);
		}
		try {
			Protocol.getObject("e", null);
			fail();
		} catch (Py4JException e) {
			assertTrue(true);
		}
		try {
			Protocol.getObject("z123", null);
			fail();
		} catch (Py4JException e) {
			assertTrue(true);
		}
	}