Examples of ValueSpecification


Examples of com.opengamma.engine.value.ValueSpecification

    final ValueProperties externalProperties = createCurrencyValueProperties(target)
                      .withAny(ValuePropertyNames.CURRENCY)
                      .withAny(ValuePropertyNames.CURVE)
                      .withAny(ValuePropertyNames.CURVE_CURRENCY)
                      .withAny(ValuePropertyNames.CURVE_CALCULATION_CONFIG).get();
    final Set<ValueSpecification> results = Collections.singleton(new ValueSpecification(PV01_REQUIREMENT, target.toSpecification(), externalProperties));
    return results;
  }
View Full Code Here

Examples of org.eclipse.uml2.ValueSpecification

        if (tagValue != null)
        {
            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

Examples of org.eclipse.uml2.uml.ValueSpecification

   * <!-- begin-user-doc --> <!-- end-user-doc -->
   *
   * @generated
   */
  public void setProbability(ValueSpecification newProbability) {
    ValueSpecification oldProbability = probability;
    probability = newProbability;
    if(eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, ActivitiesPackage.PROBABILITY__PROBABILITY, oldProbability, probability));
  }
View Full Code Here

Examples of org.eclipse.uml2.uml.ValueSpecification

    Property property = mock(Property.class);
    Type type = mock(Type.class);

    EList<ValueSpecification> valueSpecifications = mock(EList.class);
    Iterator<ValueSpecification> valueSpecificationIter = mock(Iterator.class);
    ValueSpecification valueSpecification = mock(ValueSpecification.class);

    when(enumeration.getOwnedLiterals()).thenReturn(enumLiterals);
    when(enumLiterals.iterator()).thenReturn(enumIter);
    when(enumIter.hasNext()).thenReturn(true).thenReturn(false);
    when(enumIter.next()).thenReturn(enumLiteral);
    when(enumLiteral.getName()).thenReturn("Home");

    when(enumLiteral.getSlots()).thenReturn(slots);
    when(slots.iterator()).thenReturn(slotIter);
    when(slotIter.hasNext()).thenReturn(true).thenReturn(false);
    when(slotIter.next()).thenReturn(slot);
    when(slot.getDefiningFeature()).thenReturn(property);

    when(property.getType()).thenReturn(type);
    when(type.getName()).thenReturn("Integer");

    when(slot.getValues()).thenReturn(valueSpecifications);
    when(valueSpecifications.iterator()).thenReturn(valueSpecificationIter);
    when(valueSpecificationIter.hasNext()).thenReturn(true).thenReturn(
        false);
    when(valueSpecificationIter.next()).thenReturn(valueSpecification);
    when(valueSpecification.integerValue()).thenReturn(0);

    enumGenerator.generateConstants(enumeration, ast, ed);

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

Examples of org.eclipse.uml2.uml.ValueSpecification

    Property property = mock(Property.class);
    Type type = mock(Type.class);

    EList<ValueSpecification> valueSpecifications = mock(EList.class);
    Iterator<ValueSpecification> valueSpecificationIter = mock(Iterator.class);
    ValueSpecification valueSpecification = mock(ValueSpecification.class);

    when(enumeration.getOwnedLiterals()).thenReturn(enumLiterals);
    when(enumLiterals.iterator()).thenReturn(enumIter);
    when(enumIter.hasNext()).thenReturn(true).thenReturn(false);
    when(enumIter.next()).thenReturn(enumLiteral);
    when(enumLiteral.getName()).thenReturn("Home");

    when(enumLiteral.getSlots()).thenReturn(slots);
    when(slots.iterator()).thenReturn(slotIter);
    when(slotIter.hasNext()).thenReturn(true).thenReturn(false);
    when(slotIter.next()).thenReturn(slot);
    when(slot.getDefiningFeature()).thenReturn(property);

    when(property.getType()).thenReturn(type);
    when(type.getName()).thenReturn("String");

    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

Examples of org.eclipse.uml2.uml.ValueSpecification

    Property property = mock(Property.class);
    Type type = mock(Type.class);

    EList<ValueSpecification> valueSpecifications = mock(EList.class);
    Iterator<ValueSpecification> valueSpecificationIter = mock(Iterator.class);
    ValueSpecification valueSpecification = mock(ValueSpecification.class);

    when(enumeration.getOwnedLiterals()).thenReturn(enumLiterals);
    when(enumLiterals.iterator()).thenReturn(enumIter);
    when(enumIter.hasNext()).thenReturn(true).thenReturn(false);
    when(enumIter.next()).thenReturn(enumLiteral);
    when(enumLiteral.getName()).thenReturn("Home");

    when(enumLiteral.getSlots()).thenReturn(slots);
    when(slots.iterator()).thenReturn(slotIter);
    when(slotIter.hasNext()).thenReturn(true).thenReturn(false);
    when(slotIter.next()).thenReturn(slot);
    when(slot.getDefiningFeature()).thenReturn(property);

    when(property.getType()).thenReturn(type);
    when(type.getName()).thenReturn("Long");

    when(slot.getValues()).thenReturn(valueSpecifications);
    when(valueSpecifications.iterator()).thenReturn(valueSpecificationIter);
    when(valueSpecificationIter.hasNext()).thenReturn(true).thenReturn(
        false);
    when(valueSpecificationIter.next()).thenReturn(valueSpecification);
    when(valueSpecification.integerValue()).thenReturn(1);

    enumGenerator.generateConstants(enumeration, ast, ed);

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

Examples of org.eclipse.uml2.uml.ValueSpecification

    Property property = mock(Property.class);
    Type type = mock(Type.class);

    EList<ValueSpecification> valueSpecifications = mock(EList.class);
    Iterator<ValueSpecification> valueSpecificationIter = mock(Iterator.class);
    ValueSpecification valueSpecification = mock(ValueSpecification.class);

    when(enumeration.getOwnedLiterals()).thenReturn(enumLiterals);
    when(enumLiterals.iterator()).thenReturn(enumIter);
    when(enumIter.hasNext()).thenReturn(true).thenReturn(false);
    when(enumIter.next()).thenReturn(enumLiteral);
    when(enumLiteral.getName()).thenReturn("Home");

    when(enumLiteral.getSlots()).thenReturn(slots);
    when(slots.iterator()).thenReturn(slotIter);
    when(slotIter.hasNext()).thenReturn(true).thenReturn(false);
    when(slotIter.next()).thenReturn(slot);
    when(slot.getDefiningFeature()).thenReturn(property);

    when(property.getType()).thenReturn(type);
    when(type.getName()).thenReturn("boolean");

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

    enumGenerator.generateConstants(enumeration, ast, ed);

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

Examples of org.eclipse.uml2.uml.ValueSpecification

    EList<ValueSpecification> valueSpecifications1 = mock(EList.class);
    Iterator<ValueSpecification> valueSpecificationIter1 = mock(Iterator.class);
    EList<ValueSpecification> valueSpecifications2 = mock(EList.class);
    Iterator<ValueSpecification> valueSpecificationIter2 = mock(Iterator.class);
    ValueSpecification valueSpecification1 = mock(ValueSpecification.class);
    ValueSpecification valueSpecification2 = mock(ValueSpecification.class);

    when(enumeration.getOwnedLiterals()).thenReturn(enumLiterals);
    when(enumLiterals.iterator()).thenReturn(enumIter);
    when(enumIter.hasNext()).thenReturn(true).thenReturn(false);
    when(enumIter.next()).thenReturn(enumLiteral);
    when(enumLiteral.getName()).thenReturn("Home");

    when(enumLiteral.getSlots()).thenReturn(slots);
    when(slots.iterator()).thenReturn(slotIter);
    when(slotIter.hasNext()).thenReturn(true).thenReturn(true)
        .thenReturn(false);
    when(slotIter.next()).thenReturn(slot1).thenReturn(slot2);
    when(slot1.getDefiningFeature()).thenReturn(property1);
    when(slot2.getDefiningFeature()).thenReturn(property2);

    when(property1.getType()).thenReturn(type1);
    when(property2.getType()).thenReturn(type2);
    when(property1.getName()).thenReturn("type");
    when(property2.getName()).thenReturn("name");
    when(type1.getName()).thenReturn("boolean");
    when(type2.getName()).thenReturn("String");

    when(slot1.getValues()).thenReturn(valueSpecifications1);
    when(slot2.getValues()).thenReturn(valueSpecifications2);
    when(valueSpecifications1.iterator()).thenReturn(
        valueSpecificationIter1);
    when(valueSpecifications2.iterator()).thenReturn(
        valueSpecificationIter2);
    when(valueSpecificationIter1.hasNext()).thenReturn(true).thenReturn(
        false);
    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

Examples of plan_runner.expressions.ValueSpecification

    throw new UnsupportedOperationException("Not supported yet.");
  }

  @Override
  public void visit(DateValue dv) {
    final ValueExpression ve = new ValueSpecification(_dateConv, dv.getValue());
    _exprStack.push(ve);
  }
View Full Code Here

Examples of plan_runner.expressions.ValueSpecification

    _exprStack.push(ve);
  }

  @Override
  public void visit(DoubleValue dv) {
    final ValueExpression ve = new ValueSpecification(_dblConv, dv.getValue());
    _exprStack.push(ve);
  }
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.