@Override
    public Field getField(int id) {
        Field field = contentStructType.getField(id);
        if (field == null && !isRegistered()) {
            for (DocumentType inheritedType : inherits) {
                field = inheritedType.getField(id);
                if (field != null) break;
            }
        }
        return field;
    }
Gets the field matching a given name.

@param name the name of a field
@return returns the matching field, or null if not found
document/src/main/java/com/yahoo/document/DocumentType.java