本文整理了Java中org.eclipse.uml2.uml.Operation.getOwnedTemplateSignature()
方法的一些代码示例,展示了Operation.getOwnedTemplateSignature()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Operation.getOwnedTemplateSignature()
方法的具体详情如下:
包路径:org.eclipse.uml2.uml.Operation
类名称: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);
内容来源于网络,如有侵权,请联系作者删除!