DataType getDataTypeByCode(int code, String detailedType) {
        if (code == DataType.tensorDataTypeCode) // built-in dynamic
            return new TensorDataType(TensorType.fromSpec(detailedType));

        DataType type = dataTypes.get(code);
        if (type == null) {
            StringBuilder types=new StringBuilder();
            for (Integer key : dataTypes.keySet()) {
                types.append(key).append(" ");
            }
            throw new IllegalArgumentException("No datatype with code " + code + ". Registered type ids: " + types);
        } else {
            return type;
        }
    }
Return a data type instance

@param code the code of the data type to return, which must be either built in or present in this manager
@param detailedType detailed type information, or the empty string if none
@return the appropriate DataType instance
document/src/main/java/com/yahoo/document/DocumentTypeManager.java