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

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

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

Operation.setName介绍

暂无

代码示例

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

getOwnedOperations().add(newOwnedOperation);
if (name != null)
  newOwnedOperation.setName(name);
int ownedParameterListSize = 0;
int ownedParameterNamesSize = ownedParameterNames == null

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

getOwnedOperations().add(newOwnedOperation);
if (name != null)
  newOwnedOperation.setName(name);
int ownedParameterListSize = 0;
int ownedParameterNamesSize = ownedParameterNames == null

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

getOwnedOperations().add(newOwnedOperation);
if (name != null)
  newOwnedOperation.setName(name);
int ownedParameterListSize = 0;
int ownedParameterNamesSize = ownedParameterNames == null

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

getOwnedOperations().add(newOwnedOperation);
if (name != null)
  newOwnedOperation.setName(name);
int ownedParameterListSize = 0;
int ownedParameterNamesSize = ownedParameterNames == null

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

public Operation createOperation(String name, Classifier resultType,
    List<String> paramNames, List<Classifier> paramTypes) {
  
  Operation result = UMLFactory.eINSTANCE.createOperation();
  result.setName(name);
  
  // OCL can only define query operations
  result.setIsQuery(true);
  
  if (resultType != null) {
    result.setType(resultType);
  }
  
  int i = 0;
  for (String pname : paramNames) {
    result.createOwnedParameter(pname, paramTypes.get(i++));
  }
  
  return result;
}

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

getOwnedOperations(classifier).add(operation);
operation.setName(eOperation.getName());

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

public Operation defineOperation(Classifier owner, String name,
    Classifier type, List<Variable<Classifier, Parameter>> params,
    Constraint constraint) {
  resetTypeCaches();        
  Operation result = UMLFactory.eINSTANCE.createOperation();
  result.addKeyword(UMLReflection.OCL_HELPER);
  result.setName(name);
  result.setType(type == null ? getOCLStandardLibrary().getOclVoid()
    : type);
  result.setIsQuery(true); // OCL can only define queries
  for (Variable<Classifier, Parameter> next : params) {
    Parameter param = UMLFactory.eINSTANCE.createParameter();
    param.setName(next.getName());
    param.setType(next.getType() == null ? getOCLStandardLibrary()
      .getOclVoid()
      : next.getType());
    param.setDirection(ParameterDirectionKind.IN_LITERAL);
    param.setEffect(ParameterEffectKind.READ_LITERAL);
    result.getOwnedParameters().add(param);
  }
  annotate(result, constraint);
  addHelperOperation(owner, result);
  return result;
}

相关文章