Package org.eclipse.uml2

Examples of org.eclipse.uml2.ValueSpecification.stringValue()


        {
            valueAsString = tagValue.toString();
            if (tagValue instanceof ValueSpecification)
            {
                ValueSpecification literal = (ValueSpecification)tagValue;
                valueAsString = literal.stringValue();
            }
            else if (tagValue instanceof InstanceSpecification)
            {
                InstanceSpecification instance = (InstanceSpecification)tagValue;
                valueAsString = instance.getName();
View Full Code Here


    when(slot.getValues()).thenReturn(valueSpecifications);
    when(valueSpecifications.iterator()).thenReturn(valueSpecificationIter);
    when(valueSpecificationIter.hasNext()).thenReturn(true).thenReturn(
        false);
    when(valueSpecificationIter.next()).thenReturn(valueSpecification);
    when(valueSpecification.stringValue()).thenReturn("Home");

    enumGenerator.generateConstants(enumeration, ast, ed);

    assertEquals("public enum Company {HOME(\"Home\")}\n", ed.toString());
  }
View Full Code Here

    when(valueSpecificationIter2.hasNext()).thenReturn(true).thenReturn(
        false);
    when(valueSpecificationIter1.next()).thenReturn(valueSpecification1);
    when(valueSpecificationIter2.next()).thenReturn(valueSpecification2);
    when(valueSpecification1.booleanValue()).thenReturn(true);
    when(valueSpecification2.stringValue()).thenReturn("Lofi");

    ArrayList<String> constructorParameterNames = new ArrayList<String>();
    constructorParameterNames.add("type");
    constructorParameterNames.add("name");
    enumGenerator.setConstructorParameterNames(constructorParameterNames);
View Full Code Here

    when(valueSpecificationIter2.hasNext()).thenReturn(true).thenReturn(
        false);
    when(valueSpecificationIter1.next()).thenReturn(valueSpecification1);
    when(valueSpecificationIter2.next()).thenReturn(valueSpecification2);
    when(valueSpecification1.booleanValue()).thenReturn(true);
    when(valueSpecification2.stringValue()).thenReturn("Lofi");

    // Cannot find the parameter name of the constructor!
    ArrayList<String> constructorParameterNames = new ArrayList<String>();
    constructorParameterNames.add("typeX");
    constructorParameterNames.add("nameY");
View Full Code Here

      return "null";
    } else {
      if (vs.getType() == null) {
        return vs.stringValue();
      } else if (vs.getType().getName().equals("String")) {
        return vs.stringValue();
      } else if (vs.getType().getName().equals("Integer")) {
        return vs.integerValue() + "";
      } else if (vs.getType().getName().equals("Boolean")) {
        return vs.booleanValue() + "";
      }
View Full Code Here

      } else if (vs.getType().getName().equals("Integer")) {
        return vs.integerValue() + "";
      } else if (vs.getType().getName().equals("Boolean")) {
        return vs.booleanValue() + "";
      }
      return vs.stringValue();
    }
  }

  private String getFormatedComment(EList<?> comments, String prefix,
      String annotation) {
View Full Code Here

        }
      }
      return "null";
    } else {
      if (vs.getType() == null) {
        return vs.stringValue();
      } else if (vs.getType().getName().equals("String")) {
        return vs.stringValue();
      } else if (vs.getType().getName().equals("Integer")) {
        return vs.integerValue() + "";
      } else if (vs.getType().getName().equals("Boolean")) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.