public static Field getField(TokenBuffer buffer, StructuredFieldValue parent) { Field f = parent.getField(buffer.currentName()); if (f == null) { throw new NullPointerException("Could not get field \"" + buffer.currentName() + "\" in the structure of type \"" + parent.getDataType().getDataTypeName() + "\"."); } return f; }