PdxInstanceImpl extends PdxReaderImpl implements InternalPdxInstance { @Override public Object getField(String fieldName) { return getUnmodifiableReader(fieldName).readField(fieldName); } PdxInstanceImpl(PdxType pdxType, DataInput in, int len); protected  PdxInstanceImpl(PdxReaderImpl original); static boolean getPdxReadSerialized(); static void setPdxReadSerialized(boolean readSerialized); @Override Object getField(String fieldName); @Override void sendTo(DataOutput out); @Override byte[] toBytes(); @Override Object getCachedObject(); @Override Object getObject(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); @Override List<String> getFieldNames(); @Override WritablePdxInstance createWriter(); @Override synchronized String readString(String fieldName); @Override synchronized Object readObject(String fieldName); @Override synchronized Object readObject(PdxField ft); @Override synchronized char[] readCharArray(String fieldName); @Override synchronized boolean[] readBooleanArray(String fieldName); @Override synchronized byte[] readByteArray(String fieldName); @Override synchronized short[] readShortArray(String fieldName); @Override synchronized int[] readIntArray(String fieldName); @Override synchronized long[] readLongArray(String fieldName); @Override synchronized float[] readFloatArray(String fieldName); @Override synchronized double[] readDoubleArray(String fieldName); @Override synchronized String[] readStringArray(String fieldName); @Override synchronized Object[] readObjectArray(String fieldName); @Override synchronized Object[] readObjectArray(PdxField ft); @Override synchronized byte[][] readArrayOfByteArrays(String fieldName); @Override synchronized Object readField(String fieldName); @Override String getClassName(); @Override boolean isEnum(); @Override Object getRawField(String fieldName); @Override boolean isDeserializable();  }
@Test public void testGetField() { assertNull(instance.getField(nonExistentField.getFieldName())); assertEquals(Integer.class, instance.getField(nonIdentityField.getFieldName()).getClass()); assertEquals(Boolean.class, instance.getField(booleanField.getFieldName()).getClass()); assertEquals(Double.class, instance.getField(doubleField.getFieldName()).getClass()); assertEquals(Integer.class, instance.getField(intField.getFieldName()).getClass()); assertEquals(Long.class, instance.getField(longField.getFieldName()).getClass()); assertEquals(SerializableObject.class, instance.getField(objectField.getFieldName()).getClass()); assertEquals(String.class, instance.getField(stringField.getFieldName()).getClass()); assertEquals(byte[].class, instance.getField(byteArrayField.getFieldName()).getClass()); assertEquals(Object[].class, instance.getField(objectArrayField.getFieldName()).getClass()); assertEquals(Integer[].class, instance.getField(integerArrayField.getFieldName()).getClass()); assertEquals(short[].class, instance.getField(shortArrayField.getFieldName()).getClass()); assertEquals(int[].class, instance.getField(intArrayField.getFieldName()).getClass()); assertEquals(long[].class, instance.getField(longArrayField.getFieldName()).getClass()); assertEquals(char[].class, instance.getField(charArrayField.getFieldName()).getClass()); assertEquals(float[].class, instance.getField(floatArrayField.getFieldName()).getClass()); assertEquals(double[].class, instance.getField(doubleArrayField.getFieldName()).getClass()); assertEquals(boolean[].class, instance.getField(booleanArrayField.getFieldName()).getClass()); }