/** * 指定したアノテーションを取得する. * * @param type EdmType * @param namespaceUri 名前空間 * @param localName 取得対象名 * @return namespaceUri */ private NamespacedAnnotation<?> findAnnotation( EdmType type, String namespaceUri, String localName) { if (type != null) { for (NamespacedAnnotation<?> annotation : type.getAnnotations()) { if (localName.equals(annotation.getName())) { String uri = annotation.getNamespace().getUri(); if ((namespaceUri == null && uri == null) || (namespaceUri != null && namespaceUri.equals(uri))) { return annotation; } } } } return null; }