public void addField(Field field) {
        if (isRegistered()) {
            throw new IllegalStateException("You cannot add fields to a document type that is already registered.");
        }
        contentStructType.addField(field);
    }
Adds an field that can be used with this document type.

@param field the field to add
document/src/main/java/com/yahoo/document/DocumentType.java