本文整理了Java中org.eclipse.uml2.uml.Operation.getOwner()
方法的一些代码示例,展示了Operation.getOwner()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Operation.getOwner()
方法的具体详情如下:
包路径:org.eclipse.uml2.uml.Operation
类名称:Operation
方法名:getOwner
暂无
代码示例来源:origin: org.umlg/java-generation
@Override
public void visitBefore(Operation oper) {
Element operOwner = oper.getOwner();
if (oper.getBodyCondition() != null && !oper.isQuery()) {
throw new IllegalStateException(String.format("Operation %s on %s has a bodyCondition but is not a query.",
new Object[] { oper.getName(), ((NamedElement) operOwner).getName() }));
}
OJAnnotatedClass ojClass;
if (operOwner instanceof Interface) {
ojClass = findOJClass((Interface) operOwner);
addOperSignature(ojClass, oper);
} else if ((operOwner instanceof org.eclipse.uml2.uml.Class) || (operOwner instanceof Enumeration)) {
ojClass = findOJClass((org.eclipse.uml2.uml.Classifier) operOwner);
OJAnnotatedOperation ojOper = addOperSignature(ojClass, oper);
if (oper.isQuery()) {
addQueryBody(ojClass, ojOper, oper);
}
} else {
throw new IllegalStateException("Operations are only supported on Interfaces and Classes, not on " + operOwner.toString());
}
}
代码示例来源:origin: org.eclipse.ocl/uml
Classifier container = (Classifier) operation.getOwner();
代码示例来源:origin: org.andromda.metafacades/andromda-metafacades-emf-uml22
final Object classifier = operation.getOwner();
if (classifier != null && classifier instanceof NamedElement)
代码示例来源:origin: org.andromda.bootstrap.metafacades/andromda-metafacades-emf-uml22
final Object classifier = operation.getOwner();
if (classifier != null && classifier instanceof NamedElement)
内容来源于网络,如有侵权,请联系作者删除!