org.eclipse.xsd.XSDTypeDefinition.getAnnotation()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(138)

本文整理了Java中org.eclipse.xsd.XSDTypeDefinition.getAnnotation()方法的一些代码示例,展示了XSDTypeDefinition.getAnnotation()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSDTypeDefinition.getAnnotation()方法的具体详情如下:
包路径:org.eclipse.xsd.XSDTypeDefinition
类名称:XSDTypeDefinition
方法名:getAnnotation

XSDTypeDefinition.getAnnotation介绍

[英]Returns the value of the 'Annotation' containment reference.

This concrete reference represents the direct annotation content of a complexType element or a simpleType element.
[中]返回“注释”包含引用的值。
这个具体的引用表示complexType元素或{$1$}元素的直接注释内容。

代码示例

代码示例来源:origin: org.eclipse.xsd/org.eclipse.xsd

void handleTypeArguments(XSDTypeDefinition xsdTypeDefinition, EClassifier eClassifier)
{
 XSDAnnotation xsdAnnotation = xsdTypeDefinition.getAnnotation();
 if (xsdAnnotation != null)
 {
  List<Element> applicationInformationList = xsdAnnotation.getApplicationInformation(EcorePackage.eNS_URI);
  for (Element applicationInformation : applicationInformationList)
  {
   if ("typeParameters".equals(applicationInformation.getAttributeNS(EcorePackage.eNS_URI, "key")))
   {
    for (Element typeParameter : getElements(applicationInformation, "typeParameter"))
    {
     ETypeParameter eTypeParameter = EcoreFactory.eINSTANCE.createETypeParameter();
     String typeParameterName = typeParameter.getAttributeNS(null, "name");
     eTypeParameter.setName(typeParameterName);
     eClassifier.getETypeParameters().add(eTypeParameter);
     eTypeParameter.getEBounds().addAll(getGenericTypes(xsdTypeDefinition, typeParameter, eClassifier, typeParameter.getAttributeNS(null, "bounds")));
    }
   }
  }
 }
}

代码示例来源:origin: org.eclipse/org.eclipse.xsd

void handleTypeArguments(XSDTypeDefinition xsdTypeDefinition, EClassifier eClassifier)
{
 XSDAnnotation xsdAnnotation = xsdTypeDefinition.getAnnotation();
 if (xsdAnnotation != null)
 {
  List<Element> applicationInformationList = xsdAnnotation.getApplicationInformation(EcorePackage.eNS_URI);
  for (Element applicationInformation : applicationInformationList)
  {
   if ("typeParameters".equals(applicationInformation.getAttributeNS(EcorePackage.eNS_URI, "key")))
   {
    for (Element typeParameter : getElements(applicationInformation, "typeParameter"))
    {
     ETypeParameter eTypeParameter = EcoreFactory.eINSTANCE.createETypeParameter();
     String typeParameterName = typeParameter.getAttributeNS(null, "name");
     eTypeParameter.setName(typeParameterName);
     eClassifier.getETypeParameters().add(eTypeParameter);
     eTypeParameter.getEBounds().addAll(getGenericTypes(xsdTypeDefinition, typeParameter, eClassifier, typeParameter.getAttributeNS(null, "bounds")));
    }
   }
  }
 }
}

代码示例来源:origin: org.eclipse.xsd/org.eclipse.xsd

if ((xsdAnnotation = xsdTypeDefinition.getAnnotation()) == null)

代码示例来源:origin: org.eclipse/org.eclipse.xsd

if ((xsdAnnotation = xsdTypeDefinition.getAnnotation()) == null)

代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui

xsdAnnotation = xsdComp.getAnnotation();
if (createIfNotExist && xsdAnnotation == null)

相关文章