当前位置: 首页>>代码示例>>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;未经允许,请勿转载。