当前位置: 首页>>代码示例>>Java>>正文


Java ValueSpecification.stringValue方法代码示例

本文整理汇总了Java中org.eclipse.uml2.uml.ValueSpecification.stringValue方法的典型用法代码示例。如果您正苦于以下问题:Java ValueSpecification.stringValue方法的具体用法?Java ValueSpecification.stringValue怎么用?Java ValueSpecification.stringValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.uml2.uml.ValueSpecification的用法示例。


在下文中一共展示了ValueSpecification.stringValue方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getPortProperty

import org.eclipse.uml2.uml.ValueSpecification; //导入方法依赖的package包/类
public PortProperty getPortProperty(EObject ePort) {
	PortProperty portProperty = null;
	if (ePort instanceof PortImpl) {

		ValueSpecification lowerValSpc = ((PortImpl) ePort).getLowerValue();
		ValueSpecification upperValSpc = ((PortImpl) ePort).getUpperValue();
		if (lowerValSpc != null || upperValSpc != null) {
			String lowerVal = lowerValSpc.stringValue();
			String upperVal = upperValSpc.stringValue();
			portProperty = new PortProperty(lowerVal, upperVal);
		}

		return portProperty;
	} else {
		return null;
	}
}
 
开发者ID:ZhengshuaiPENG,项目名称:org.lovian.eaxmireader,代码行数:18,代码来源:EAEObjInfoManager.java

示例2: createAttributeModel

import org.eclipse.uml2.uml.ValueSpecification; //导入方法依赖的package包/类
private Attribute createAttributeModel(Property property) {
    String name = property.getName();
    LOG.debug("Attribute: " + name);

    // Attribute type.
    Type type = property.getType();
    String typeName = type.getName();
    FHIMInformationModel.Type typeModel = getTypeModel(typeName);

    Attribute attributeModel = new Attribute(name, typeModel);

    // Default value.
    ValueSpecification valueSpec = property.getDefaultValue();
    String defaultValue = (valueSpec != null ? valueSpec.stringValue() : null);
    if (defaultValue != null) {
        attributeModel.setDefaultValue(defaultValue);
    }

    // Multiplicity.
    int lower = property.getLower();
    int upper = property.getUpper();
    Multiplicity multiplicity = new Multiplicity(lower, upper);
    attributeModel.setMultiplicity(multiplicity);

    // Visibility.
    VisibilityKind visibility = property.getVisibility();
    attributeModel.setVisibility(visibility);

    return attributeModel;
}
 
开发者ID:Apelon-VA,项目名称:ISAAC,代码行数:31,代码来源:UML2ModelConverter.java

示例3: renderObject

import org.eclipse.uml2.uml.ValueSpecification; //导入方法依赖的package包/类
public boolean renderObject(Property property, IndentedPrintWriter w, IRenderingSession context) {
      if (property.getName() == null)
          return false;
      if (RendererHelper.shouldSkip(context, property))
      	return false;
if (property.isDerived() && !context.getSettings().getBoolean(UML2DOTPreferences.SHOW_DERIVED_ELEMENTS, false))
	return false;
if (property.isStatic() && !context.getSettings().getBoolean(UML2DOTPreferences.SHOW_STATIC_FEATURES, true))
	return false;
      
      w.print("<TR><TD align=\"left\">");
      // TODO this is duplicated in ClassRenderer#renderNameAdornments
      if (context.getSettings().getBoolean(UML2DOTPreferences.SHOW_FEATURE_STEREOTYPES)
              && !property.getAppliedStereotypes().isEmpty()) {
          StringBuffer stereotypeList = new StringBuffer();
          for (Stereotype current : property.getAppliedStereotypes()) {
              stereotypeList.append(current.getName());
              stereotypeList.append(", ");
          }
          stereotypeList.delete(stereotypeList.length() - 2, stereotypeList.length());
          w.print(UML2DOTRenderingUtils.addGuillemots(stereotypeList.toString()));
      }
      if (context.getSettings().getBoolean(SHOW_FEATURE_VISIBILITY))
          w.print(UML2DOTRenderingUtils.renderVisibility(property.getVisibility()));
      if (property.isDerived())
          w.print('/');
      if (property.isStatic())
      	w.print("<u>");
      w.print(property.getName());
      if (property.isStatic())
      	w.print("</u>");
      if (property.getType() != null) {
          w.print(" : ");
          w.print(property.getType().getName());
          w.print(UML2DOTRenderingUtils.renderMultiplicity(property, true));
      }
      if (property.getDefaultValue() != null) {
          if (property.getDefaultValue() instanceof LiteralNull) {
              ValueSpecification defaultValue = property.getDefaultValue();
              String basicValue = defaultValue.stringValue();
              if ("String".equals(property.getType().getName()))
                  basicValue = "\"" + basicValue + "\"";
              w.print(" = " + basicValue);
          }
      } else if (property.getDefault() != null) {
          w.print(" = " + property.getDefault());
      }
      w.println("</TD></TR>");
      return true;
  }
 
开发者ID:abstratt,项目名称:textuml,代码行数:51,代码来源:PropertyRenderer.java


注:本文中的org.eclipse.uml2.uml.ValueSpecification.stringValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。