private static void setupAnnotationRefTypes(DocumentmanagerConfig config, DocumentTypeManager manager) { for (int i = 0; i < config.datatype().size(); i++) { DocumentmanagerConfig.Datatype thisDataType = config.datatype(i); int id = thisDataType.id(); for (Object o : thisDataType.annotationreftype()) { DocumentmanagerConfig.Datatype.Annotationreftype annRefType = (DocumentmanagerConfig.Datatype.Annotationreftype) o; AnnotationType annotationType = manager.getAnnotationTypeRegistry().getType(annRefType.annotation()); if (annotationType == null) { throw new IllegalArgumentException("Found reference to " + annRefType.annotation() + ", which does not exist!"); } AnnotationReferenceDataType type = new AnnotationReferenceDataType(annotationType, id); manager.register(type); } } }
"' does not exist."); dataType = new AnnotationReferenceDataType(target); addType(docType, dataType); return dataType;