EcoreUtil.java 文件源码

java
阅读 22 收藏 0 点赞 0 评论 0

项目:eclipse-avro 作者:
public static void setDocumentation(EModelElement eModelElement, String documentation)
{
  EAnnotation eAnnotation = eModelElement.getEAnnotation(GEN_MODEL_PACKAGE_NS_URI);
  if (documentation == null)
  {
    if (eAnnotation != null)
    {
      eAnnotation.getDetails().removeKey("documentation");
    }
  }
  else
  {
    if (eAnnotation == null)
    {
      eAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
      eAnnotation.setSource(GEN_MODEL_PACKAGE_NS_URI);
      eModelElement.getEAnnotations().add(eAnnotation);
    }
    eAnnotation.getDetails().put("documentation", documentation);
  }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号