org.eclipse.uml2.uml.Operation.getOwnedTemplateSignature()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(94)

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

Operation.getOwnedTemplateSignature介绍

暂无

代码示例

代码示例来源:origin: crowdcode-de/KissMDA

/**
 * Generate the template parameter for the given method - Generic Method.
 * 
 * @param ast
 *            AST tree JDT
 * @param operation
 *            UML2 Operation
 * @param md
 *            MethodDeclaration JDT
 */
@SuppressWarnings("unchecked")
public void generateMethodTemplateParams(AST ast, Operation operation,
    MethodDeclaration md) {
  TemplateSignature templateSignature = operation
      .getOwnedTemplateSignature();
  if (templateSignature != null) {
    EList<TemplateParameter> templateParameters = templateSignature
        .getParameters();
    for (TemplateParameter templateParameter : templateParameters) {
      Classifier classifier = (Classifier) templateParameter
          .getOwnedParameteredElement();
      String typeName = classifier.getLabel();
      TypeParameter typeParameter = ast.newTypeParameter();
      typeParameter.setName(ast.newSimpleName(typeName));
      md.typeParameters().add(typeParameter);
    }
  }
}

代码示例来源:origin: crowdcode-de/KissMDA

Classifier classifier = mock(Classifier.class);
when(operation.getOwnedTemplateSignature()).thenReturn(
    templateSignature);
when(templateSignature.getParameters()).thenReturn(templateParams);

代码示例来源:origin: crowdcode-de/KissMDA

Classifier classifier = mock(Classifier.class);
when(operation.getOwnedTemplateSignature()).thenReturn(
    templateSignature);
when(templateSignature.getParameters()).thenReturn(templateParams);

相关文章