當前位置: 首頁>>代碼示例>>Java>>正文


Java AbstractIvmlVariable類代碼示例

本文整理匯總了Java中net.ssehub.easy.instantiation.core.model.vilTypes.configuration.AbstractIvmlVariable的典型用法代碼示例。如果您正苦於以下問題:Java AbstractIvmlVariable類的具體用法?Java AbstractIvmlVariable怎麽用?Java AbstractIvmlVariable使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


AbstractIvmlVariable類屬於net.ssehub.easy.instantiation.core.model.vilTypes.configuration包,在下文中一共展示了AbstractIvmlVariable類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getValue

import net.ssehub.easy.instantiation.core.model.vilTypes.configuration.AbstractIvmlVariable; //導入依賴的package包/類
/**
 * Returns the value of an observable in <code>elt</code>.
 * 
 * @param elt the IVML element to return the value for
 * @param observable the observable
 * @return the value, may be <b>null</b> if not defined
 */
private Double getValue(IvmlElement elt, IObservable observable) {
    Double result = null;
    if (null != state && elt instanceof AbstractIvmlVariable) {
        AbstractIvmlVariable var = (AbstractIvmlVariable) elt;
        TypeCharacterizer characterizer = TypeMapper.findCharacterizer(var.getIvmlType());
        if (null != characterizer) {
            String prefix = characterizer.getFrozenStatePrefix();
            String key = characterizer.getFrozenStateKey(var.getDecisionVariable());
            if (null != prefix && null != key) {
                result = state.getObservation(prefix, key, observable, null);
            }
        }
    }
    return result;
}
 
開發者ID:QualiMaster,項目名稱:Infrastructure,代碼行數:23,代碼來源:RtVilValueMapping.java

示例2: variableToID

import net.ssehub.easy.instantiation.core.model.vilTypes.configuration.AbstractIvmlVariable; //導入依賴的package包/類
@Override
protected String variableToID(ObservableTuple variable) {
    String id = null; 
    if (variable.element instanceof AbstractIvmlVariable) {
        AbstractIvmlVariable var = (AbstractIvmlVariable) variable.element;
        TypeCharacterizer characterizer = TypeMapper.findCharacterizer(var.getIvmlType());
        if (null != characterizer) {
            String prefix = characterizer.getFrozenStatePrefix();
            String key = characterizer.getFrozenStateKey(var.getDecisionVariable());

            id = prefix + FrozenSystemState.SEPARATOR + key + FrozenSystemState.SEPARATOR
                    + (null == variable.observable ? null : variable.observable.name());
        }
    }

    return id;
}
 
開發者ID:QualiMaster,項目名稱:QM-EASyProducer,代碼行數:18,代碼來源:IvmlElementIdentifier.java

示例3: test

import net.ssehub.easy.instantiation.core.model.vilTypes.configuration.AbstractIvmlVariable; //導入依賴的package包/類
/**
 * Tests an IVML decision variable versus an abstract IVML variable.
 * 
 * @param decVar the IVML decision variable
 * @param var the IVML variable
 */
private void test(IDecisionVariable decVar, AbstractIvmlVariable var) {
    if (null != decVar && AssignmentState.FROZEN == decVar.getState()) {
        AbstractVariable decl = decVar.getDeclaration();
        Assert.assertEquals(var.getName(), decl.getName());
        Assert.assertEquals(var.getQualifiedName(), decl.getQualifiedName());
        Assert.assertEquals(var.getTypeName(), decl.getType().getName());
        Assert.assertEquals(var.getQualifiedType(), decl.getType().getQualifiedName());
        Assert.assertNotNull(decVar.getValue()); // FROZEN!
        ValueTester tester = new ValueTester(var);
        decVar.getValue().accept(tester);
        if (!Container.TYPE.isAssignableFrom(decVar.getDeclaration().getType())) {
            Map<String, IDecisionVariable> attrMap = new HashMap<String, IDecisionVariable>();
            for (int a = 0; a < decVar.getAttributesCount(); a++) {
                IDecisionVariable attrib = decVar.getAttribute(a);
                attrMap.put(attrib.getDeclaration().getName(), attrib);
            }
            for (net.ssehub.easy.instantiation.core.model.vilTypes.configuration.Attribute attr
                : var.attributes()) {
                IDecisionVariable origAttrib = attrMap.get(attr.getName());
                Assert.assertNotNull(origAttrib);
                test(origAttrib, attr);
            }
        }
    }            
}
 
開發者ID:SSEHUB,項目名稱:EASyProducer,代碼行數:32,代碼來源:TestVisitor.java

示例4: convertVariables

import net.ssehub.easy.instantiation.core.model.vilTypes.configuration.AbstractIvmlVariable; //導入依賴的package包/類
/**
 * Converts variables to objects, e.g., for reflection calls.
 * 
 * @param params the parameters (may be changed as a side effect)
 */
protected void convertVariables(Object[] params) {
    final TypeDescriptor<?> any = TypeRegistry.anyType();
    for (int p = 0, n = Math.min(getParameterCount(), params.length); p < n; p++) {
        if (any == getParameterType(p) && (params[p] instanceof AbstractIvmlVariable)) {
            params[p] = ((AbstractIvmlVariable) params[p]).getValue();
        }
    }
}
 
開發者ID:SSEHUB,項目名稱:EASyProducer,代碼行數:14,代碼來源:OperationDescriptor.java

示例5: recordedOriginalVariable

import net.ssehub.easy.instantiation.core.model.vilTypes.configuration.AbstractIvmlVariable; //導入依賴的package包/類
@Override
public void recordedOriginalVariable(AbstractIvmlVariable variable, Value value) {
    getDelegate().trace("Change history - orig variable " + getInstanceName(variable) + " " + value);
}
 
開發者ID:QualiMaster,項目名稱:Infrastructure,代碼行數:5,代碼來源:DebugTimeMeasurementTracerFactory.java

示例6: recordedChangedVariable

import net.ssehub.easy.instantiation.core.model.vilTypes.configuration.AbstractIvmlVariable; //導入依賴的package包/類
@Override
public void recordedChangedVariable(AbstractIvmlVariable variable, Value value) {
    getDelegate().trace("Change history - changed variable " + getInstanceName(variable) + " " + value);
}
 
開發者ID:QualiMaster,項目名稱:Infrastructure,代碼行數:5,代碼來源:DebugTimeMeasurementTracerFactory.java

示例7: getInstanceName

import net.ssehub.easy.instantiation.core.model.vilTypes.configuration.AbstractIvmlVariable; //導入依賴的package包/類
/**
 * Returns the IVML instance name of <code>variable</code>.
 * 
 * @param variable the variable
 * @return the instance name
 */
private String getInstanceName(AbstractIvmlVariable variable) {
    return net.ssehub.easy.varModel.confModel.Configuration.getInstanceName(variable.getDecisionVariable());
}
 
開發者ID:QualiMaster,項目名稱:Infrastructure,代碼行數:10,代碼來源:DebugTimeMeasurementTracerFactory.java

示例8: assertAssignable

import net.ssehub.easy.instantiation.core.model.vilTypes.configuration.AbstractIvmlVariable; //導入依賴的package包/類
/**
 * Asserts that the type of <code>var</code> is assignable to <code>type</code>.
 * 
 * @param type the type defining the required base type
 * @param var the variable to check
 */
private static void assertAssignable(IDatatype type, AbstractIvmlVariable var) {
    Assert.assertTrue(type.isAssignableFrom(var.getVariable().getDeclaration().getType()));
}
 
開發者ID:SSEHUB,項目名稱:EASyProducer,代碼行數:10,代碼來源:ConfigurationTests.java

示例9: ValueTester

import net.ssehub.easy.instantiation.core.model.vilTypes.configuration.AbstractIvmlVariable; //導入依賴的package包/類
/**
 * Creates a value tester instance.
 * 
 * @param decl the VIL instance to test
 */
ValueTester(AbstractIvmlVariable decl) {
    this.decl = decl;
}
 
開發者ID:SSEHUB,項目名稱:EASyProducer,代碼行數:9,代碼來源:ValueTester.java


注:本文中的net.ssehub.easy.instantiation.core.model.vilTypes.configuration.AbstractIvmlVariable類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。