Package org.eclipse.uml2.uml

Examples of org.eclipse.uml2.uml.Type


          &&(getContainerService() instanceof InterfaceService)
      ) {
        InterfaceService clParent =
          (InterfaceService)getContainerService();
        ITypeService<?, ?> rType = getReturnTypeHandler();
        Type rTypeElement = null;
        if(rType!=null) {
          rTypeElement = rType.getUMLElement();
        }
        EList<String> paramsNames = new BasicEList<String>();
        EList<Type> paramsTypes = new BasicEList<Type>();
        paramsNames.addAll(getParametersNames());
        List<ITypeService<?, ?>> tpsH = getParametersTypesServices();
        if(tpsH!=null) {
          ITypeService<?, ?> tpH = null;
          for(int i=0 ; i<tpsH.size() ; i++) {
            tpH = tpsH.get(i);
            if(tpH!=null) {
              Type t = tpH.getUMLElement();
              if(t!=null) {
                paramsTypes.add(t);
              }
            }
          }
View Full Code Here


  public static String buildFullyQualifiedName(Property prop) {
    String name = new String();
    if(prop!=null) {
      Element owner = prop.getOwner();
      if(owner instanceof Type) {
        Type cl = (Type)owner;
        String containerName =
          ClassifierService.buildFullyQualifiedName(cl);
        name = containerName + '#' + codeSimpleNameExtraction(prop);
      }
View Full Code Here

  public void setUpUMLModelElement() {
    if(umlModelElement==null) {
      //FIXME missing parameters
      if(getContainerService()!=null) {
        ITypeService<?, ?> tHandler = resolveTypeService();
        Type t = null;
        if(tHandler!=null){
          t = tHandler.getUMLElement();
        }
        umlModelElement =
          getContainerService().getUMLElement()
View Full Code Here

            &&(simpleName.length()>0)
        ) {
          try {
            String content = new String();
            String typeName = new String();
            Type t = objective.getType();
            if(t!=null) {
              typeName += t.getName();
            }
            else {
              typeName +=
                Resources.getCodeConstant(
                    "constants.defaultType"
View Full Code Here

    Boolean isAtomic = true;
    FlowSpecification flowSpec = null;

    if(getBase_Port() != null) {
      // Find FlowPort type
      Type type = getBase_Port().getType();
      if((type != null) && (type instanceof Interface)) {
        flowSpec = UMLUtil.getStereotypeApplication(type, FlowSpecification.class);
      }

      if(flowSpec != null) {
View Full Code Here

    // Without inheritance
    EList<Property> properties = clazz.getAttributes();
    for (Property property : properties) {
      // Create getter for each property
      // Return type?
      Type type = property.getType();
      logger.log(Level.FINE, "Class: " + clazz.getName() + " - "
          + "Property: " + property.getName() + " - "
          + "Property Upper: " + property.getUpper() + " - "
          + "Property Lower: " + property.getLower());
      String umlTypeName = type.getName();
      String umlQualifiedTypeName = type.getQualifiedName();

      // Only for parameterized type
      if (dataTypeUtils.isParameterizedType(umlTypeName)) {
        Map<String, String> types = umlHelper
            .checkParameterizedTypeForTemplateParameterSubstitution(type);
        umlTypeName = types.get("umlTypeName");
        umlQualifiedTypeName = types.get("umlQualifiedTypeName");
      }

      // Check the property name, no content means we have to get the
      // "type" and use it as the name
      if (property.getName().equals("")) {
        Type targetType = property.getType();
        String newPropertyName = "";
        if (property.getUpper() >= 0) {
          // Upper Cardinality 0..1
          newPropertyName = targetType.getName();
        } else {
          // Upper Cardinality 0..*
          newPropertyName = methodHelper.getPluralName(targetType
              .getName());
        }
        property.setName(StringUtils.uncapitalize(newPropertyName));
      }

View Full Code Here

    }
  }

  private void generateMethodReturnType(AST ast, TypeDeclaration td,
      Operation operation, MethodDeclaration md) {
    Type type = operation.getType();
    String umlTypeName = type.getName();
    String umlQualifiedTypeName = type.getQualifiedName();
    logger.log(Level.FINE, "UmlQualifiedTypeName: " + umlQualifiedTypeName
        + " - " + "umlTypeName: " + umlTypeName);

    if (operation.getUpper() >= 0) {
      // Upper Cardinality 0..1
View Full Code Here

  public void generateMethodParams(AST ast, TypeDeclaration td,
      Operation operation, MethodDeclaration md) {
    EList<Parameter> parameters = operation.getOwnedParameters();
    for (Parameter parameter : parameters) {
      if (parameter.getDirection().getValue() != ParameterDirectionKind.RETURN) {
        Type type = parameter.getType();
        String umlTypeName = type.getName();
        String umlQualifiedTypeName = type.getQualifiedName();
        String umlPropertyName = StringUtils.uncapitalize(parameter
            .getName());
        logger.log(Level.FINE, "Parameter: " + parameter.getName()
            + " - " + "Type: " + umlTypeName);
View Full Code Here

   *            UML2 property
   * @return FieldDeclaration
   */
  public FieldDeclaration generateAttribute(Classifier clazz, AST ast,
      Property property) {
    Type type = property.getType();
    logger.log(Level.FINE, "Class: " + clazz.getName() + " - "
        + "Property: " + property.getName() + " - "
        + "Property Upper: " + property.getUpper() + " - "
        + "Property Lower: " + property.getLower());
    String umlTypeName = type.getName();
    String umlQualifiedTypeName = type.getQualifiedName();

    // Check whether primitive or array type or simple type?
    org.eclipse.jdt.core.dom.Type chosenType = jdtHelper.getChosenType(ast,
        umlTypeName, umlQualifiedTypeName, sourceDirectoryPackageName);

View Full Code Here

  @SuppressWarnings("unchecked")
  public void generateGetterMethod(Classifier clazz, AST ast,
      EnumDeclaration ed) {
    EList<Property> properties = clazz.getAttributes();
    for (Property property : properties) {
      Type type = property.getType();
      logger.log(Level.FINE, "Class: " + clazz.getName() + " - "
          + "Property: " + property.getName() + " - "
          + "Property Upper: " + property.getUpper() + " - "
          + "Property Lower: " + property.getLower());
      String umlTypeName = type.getName();
      String umlQualifiedTypeName = type.getQualifiedName();
      MethodDeclaration methodDeclaration = interfaceGenerator
          .generateGetterMethod(ast, ed, property, umlTypeName,
              umlQualifiedTypeName, sourceDirectoryPackageName);

      // Public
View Full Code Here

TOP

Related Classes of org.eclipse.uml2.uml.Type

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.