当前位置: 首页>>代码示例>>Java>>正文


Java Invisible类代码示例

本文整理汇总了Java中net.ssehub.easy.instantiation.core.model.vilTypes.Invisible的典型用法代码示例。如果您正苦于以下问题:Java Invisible类的具体用法?Java Invisible怎么用?Java Invisible使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Invisible类属于net.ssehub.easy.instantiation.core.model.vilTypes包,在下文中一共展示了Invisible类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createVariableMapping

import net.ssehub.easy.instantiation.core.model.vilTypes.Invisible; //导入依赖的package包/类
/**
 * Creates a runtime variable mapping for <code>configuration</code>.
 * 
 * @param config the configuration
 * @return the runtime variable mapping
 * @throws ModelQueryException in case of problems accessing model elements
 */
@Invisible
public static RuntimeVariableMapping createVariableMapping(
    net.ssehub.easy.varModel.confModel.Configuration config) throws ModelQueryException {
    Project project = config.getProject();
    Compound sourceType = findCompound(project, TYPE_SOURCE);
    Compound familyElementType = findCompound(project, TYPE_FAMILYELEMENT);
    Compound sinkType = findCompound(project, TYPE_SINK);
    RuntimeVariableMapping result = new RuntimeVariableMapping();
    Iterator<IDecisionVariable> iter = config.iterator();
    while (iter.hasNext()) {
        IDecisionVariable var = iter.next();
        IDatatype type = var.getDeclaration().getType();
        if (sourceType.isAssignableFrom(type) || sinkType.isAssignableFrom(type)
            || familyElementType.isAssignableFrom(type)) {
            addVariableMapping(var, SLOT_AVAILABLE, result);
        }
    }
    return result;
}
 
开发者ID:QualiMaster,项目名称:QM-EASyProducer,代码行数:27,代码来源:ConfigurationInitializer.java

示例2: weightAllImpl

import net.ssehub.easy.instantiation.core.model.vilTypes.Invisible; //导入依赖的package包/类
/**
 * Implements a weighting of mass predictions.
 * 
 * @param predictions the predictions given as name-observable-prediction mapping, may be <b>null</b>, entries 
 *     may be <b>null</b>
 * @param weighting the weighting of the observables, negative weights invert the value by subtracting from the 
 *     respective maximum
 * @param costs the costs, i.e., observables to be counted negative (may be <b>null</b> for no costs)
 * @return the "best" solution in terms of the name as the maximum the average weighted value if no 
 *     <code>costs</code>, the maximum weighted sum if <code>costs</code>
 */
@Invisible
public static java.util.Map<String, Double> weightAllImpl(
    @ParameterMeta(generics = {String.class, Map.class, IObservable.class, Double.class}) 
    Map<String, Map<IObservable, Double>> predictions, 
    @ParameterMeta(generics = {IObservable.class, Double.class}) 
    Map<IObservable, Double> weighting,
    @ParameterMeta(generics = {IObservable.class})
    Set<IObservable> costs) {
 
    HashMap<String, Double> result = new HashMap<String, Double>();
    if (null != predictions && null != weighting) {
        MaxProcessor maxProcessor = new MaxProcessor();
        processPredictions(predictions, weighting, maxProcessor);

        UpdateProcessor updateProcessor = new UpdateProcessor(maxProcessor, weighting, result, costs);
        processPredictions(predictions, weighting, updateProcessor);
    }
    return result;
}
 
开发者ID:QualiMaster,项目名称:QM-EASyProducer,代码行数:31,代码来源:Weighting.java

示例3: obtainPipeline

import net.ssehub.easy.instantiation.core.model.vilTypes.Invisible; //导入依赖的package包/类
/**
 * Returns the pipeline decision for the given pipeline <code>element</code>.
 * 
 * @param configuration the configuration for the lookup
 * @param element the pipeline element (may be <b>null</b>, leads to <b>null</b>)
 * @return the pipeline, may be <b>null</b> if the pipeline was not found
 * @throws ModelQueryException if accessing type information fails
 */
@Invisible
public static IDecisionVariable obtainPipeline(net.ssehub.easy.varModel.confModel.Configuration configuration, 
    IDecisionVariable element) throws ModelQueryException {
    IDecisionVariable result = null;
    if (null != element) {
        AbstractVariable elementDecl = element.getDeclaration();
        IDatatype elementType = elementDecl.getType();
        IModelElement par = elementDecl.getTopLevelParent();
        if (par instanceof Project) {
            Project prj = (Project) par;
            IDatatype pipelineElementType = ModelQuery.findType(prj, QmConstants.TYPE_PIPELINE_ELEMENT, null);
            if (null != pipelineElementType && pipelineElementType.isAssignableFrom(elementType)) {
                IDatatype pipelineType = ModelQuery.findType(prj, QmConstants.TYPE_PIPELINE, null);
                if (null != pipelineType) {
                    result = searchScope(configuration, prj, pipelineType);
                }
            }
        }
    }
    return result;
}
 
开发者ID:QualiMaster,项目名称:QM-EASyProducer,代码行数:30,代码来源:PipelineHelper.java

示例4: readFileToString

import net.ssehub.easy.instantiation.core.model.vilTypes.Invisible; //导入依赖的package包/类
/**
 * Reads a file to String.
 * 
 * @param filePath
 *            The file path as String.
 * @return File as String.
 */
@Invisible
public static String readFileToString(File filePath) {
    // TODO check whether this can be replaced by related apache.commons
    // method
    StringBuilder fileData = new StringBuilder(1000);
    BufferedReader reader;
    try {
        reader = new BufferedReader(new FileReader(filePath));
        char[] buf = new char[10];
        int numRead = 0;
        while ((numRead = reader.read(buf)) != -1) {
            String readData = String.valueOf(buf, 0, numRead);
            fileData.append(readData);
            buf = new char[1024];
        }
        reader.close();
    } catch (FileNotFoundException fnf) {
        logger.exception(fnf);
    } catch (IOException ioe) {
        logger.exception(ioe);
    }
    return fileData.toString();
}
 
开发者ID:SSEHUB,项目名称:EASyProducer,代码行数:31,代码来源:JavaFileArtifact.java

示例5: deleteStatement

import net.ssehub.easy.instantiation.core.model.vilTypes.Invisible; //导入依赖的package包/类
/**
 * Deletes a statement within a method. Right now only JavaCall can be
 * deleted.
 * 
 * @param evaluator
 *            A wrapper type to pass and evaluate
 * @throws VilException
 *             in case something goes wrong
 */
@Invisible
public void deleteStatement(ExpressionEvaluator evaluator) throws VilException {
    // Check if type is JavaCall
    TypeDescriptor<?> obj = evaluator.getIteratorVariable().getType();
    ArraySet<AbstractJavaStatement> statements = null;
    if (obj.getTypeClass().isAssignableFrom(JavaCall.class)) {
        statements = statements();
    }
    if (obj.getTypeClass().isAssignableFrom(JavaAssignment.class)) {
        statements = assignments();
    }
    if (null != statements) {
        for (AbstractJavaStatement statement : statements) {
            Object object = evaluator.evaluate(statement);
            if (null != object && object instanceof Boolean && Boolean.TRUE == ((Boolean) object).booleanValue()) {
                statement.delete();
                notifyChanged();
                store();
            }
        }
    }
}
 
开发者ID:SSEHUB,项目名称:EASyProducer,代码行数:32,代码来源:JavaMethod.java

示例6: matches

import net.ssehub.easy.instantiation.core.model.vilTypes.Invisible; //导入依赖的package包/类
/**
 * Returns whether this path matches the given path.
 * 
 * @param path the path to check the match for
 * @return <code>true</code> of the match is positive, <code>false</code> else
 */
@Invisible
public boolean matches(Path path) {
    boolean result;
    if (path.isPattern()) {
        if (isPattern()) {
            result = false;
        } else {
            result = match(path, this, false);
        }
    } else {
        result = match(this, path, !isPattern());
        /*String thisPath = PathUtils.normalize(getAbsolutePath().getAbsolutePath());
        String pathPath = PathUtils.normalize(path.getAbsolutePath().getAbsolutePath());
        result = SelectorUtils.matchPath(thisPath, pathPath); */
    }
    return result;
}
 
开发者ID:SSEHUB,项目名称:EASyProducer,代码行数:24,代码来源:Path.java

示例7: includeMethod

import net.ssehub.easy.instantiation.core.model.vilTypes.Invisible; //导入依赖的package包/类
/**
 * Determines whether a <code>method</code> shall be included as automatically mapped operation.
 * 
 * @param method the method to be considered
 * @return <code>true</code> if <code>method</code> shall be included, <code>false</code> else
 */
private static boolean includeMethod(Method method) {
    int modifier = method.getModifiers();
    boolean include = Modifier.isPublic(modifier) && !Modifier.isAbstract(modifier);
    include &= (null == method.getAnnotation(Invisible.class));
    include &= (null == method.getAnnotation(Conversion.class));
    include &= Object.class != method.getDeclaringClass();
    if (include) {
        // specific comparison operations are defined in this class
        OperationMeta opMeta = method.getAnnotation(OperationMeta.class);
        if (null != opMeta && OperationType.INFIX == opMeta.opType()) {
            include = false;
        }
    }
    return include;
}
 
开发者ID:SSEHUB,项目名称:EASyProducer,代码行数:22,代码来源:AbstractIvmlTypeDescriptor.java

示例8: convert

import net.ssehub.easy.instantiation.core.model.vilTypes.Invisible; //导入依赖的package包/类
/**
 * Conversion operation.
 * 
 * @param val
 *            the value to be converted
 * @return the converted value or null
 */
@Invisible
@Conversion
public static JavaFileArtifact convert(IFileSystemArtifact val) {
    JavaFileArtifact convertedValue = null;
    if (val instanceof JavaFileArtifact) {
        convertedValue = (JavaFileArtifact) val;
    }
    return convertedValue;
}
 
开发者ID:SSEHUB,项目名称:EASyProducer,代码行数:17,代码来源:JavaFileArtifact.java

示例9: variablesSet

import net.ssehub.easy.instantiation.core.model.vilTypes.Invisible; //导入依赖的package包/类
/**
 * Returns the decision variables contained in this variable as a set.
 * 
 * @return the decision variables (unmodifiable)
 */
@Invisible
@OperationMeta(returnGenerics = { DecisionVariable.class } )
public Set<DecisionVariable> variablesSet() {
    initializeNested();
    return new UnmodifiableSet<DecisionVariable>(
        new ArraySet<DecisionVariable>(nested, DecisionVariable.class));
}
 
开发者ID:SSEHUB,项目名称:EASyProducer,代码行数:13,代码来源:AbstractIvmlVariable.java

示例10: clear

import net.ssehub.easy.instantiation.core.model.vilTypes.Invisible; //导入依赖的package包/类
/**
 * Clears the history.
 * 
 * @param resetOriginalValues also reset original values
 */
@Invisible
public void clear(boolean resetOriginalValues) {
    changeSetStack.clear();
    committed.clear();
    if (resetOriginalValues) {
        originalValues.clear();
    }
}
 
开发者ID:SSEHUB,项目名称:EASyProducer,代码行数:14,代码来源:ChangeHistory.java

示例11: changedFilter

import net.ssehub.easy.instantiation.core.model.vilTypes.Invisible; //导入依赖的package包/类
/**
 * Returns a filter for all changed variables.
 * 
 * @return a filter for all changed variables
 */
@Invisible
IVariableFilter changedFilter() {
    Set<IDecisionVariable> enabled = new HashSet<IDecisionVariable>();
    committed.addAllDecisionVariables(enabled);
    for (int i = 0; i < changeSetStack.size(); i++) {
        changeSetStack.get(i).addAllDecisionVariables(enabled);
    }
    return new SetVariablesFilter(enabled);
}
 
开发者ID:SSEHUB,项目名称:EASyProducer,代码行数:15,代码来源:ChangeHistory.java

示例12: toFileList

import net.ssehub.easy.instantiation.core.model.vilTypes.Invisible; //导入依赖的package包/类
/**
 * Turns a collection of file artifacts into files.
 * 
 * @param artifacts the artifacts to be processed
 * @return the corresponding files
 */
@Invisible
public static final List<File> toFileList(Collection<FileArtifact> artifacts) {
    List<File> files = new ArrayList<File>();
    for (FileArtifact artifact : artifacts) {
        files.add(artifact.getPath().getAbsolutePath());
    }
    return files;
}
 
开发者ID:SSEHUB,项目名称:EASyProducer,代码行数:15,代码来源:Zip.java

示例13: toFileArtifactSet

import net.ssehub.easy.instantiation.core.model.vilTypes.Invisible; //导入依赖的package包/类
/**
 * Turns a list of files into related file artifacts.
 * 
 * @param files the files to be turned into file artifacts
 * @param model the artifact model to be used (may be <b>null</b> for auto-detection)s
 * @return the set of file artifacts
 * @throws VilException if creating a file artifact instance fails
 */
@Invisible
public static final Set<FileArtifact> toFileArtifactSet(List<File> files, ArtifactModel model)
    throws VilException {
    FileArtifact[] result = new FileArtifact[files.size()];
    for (int f = 0; f < files.size(); f++) {
        File file = files.get(f);
        if (!file.isDirectory()) {
            result[f] = ArtifactFactory.createArtifact(FileArtifact.class, file, model);
        }
    }
    return new ArraySet<FileArtifact>(result, FileArtifact.class);
}
 
开发者ID:SSEHUB,项目名称:EASyProducer,代码行数:21,代码来源:Zip.java

示例14: setInTests

import net.ssehub.easy.instantiation.core.model.vilTypes.Invisible; //导入依赖的package包/类
/**
 * Allows to set the test flag.
 * 
 * @param inTests whether we are running tests and constant numbers shall be returned
 * @return the value before setting the flag
 */
@Invisible
public static boolean setInTests(boolean inTests) {
    boolean old = tests;
    tests = inTests;
    return old;
}
 
开发者ID:SSEHUB,项目名称:EASyProducer,代码行数:13,代码来源:RandomDouble.java

示例15: convert

import net.ssehub.easy.instantiation.core.model.vilTypes.Invisible; //导入依赖的package包/类
/**
 * Conversion operation.
 * 
 * @param val the value to be converted
 * @return the converted value
 */
@Invisible
@Conversion
public static JavaPath convert(String val) {
    JavaPath result;
    try {
        result = new JavaPath(Path.convert(val));
    } catch (VilException e) {
        result = null;
    }
    return result;
}
 
开发者ID:SSEHUB,项目名称:EASyProducer,代码行数:18,代码来源:JavaPath.java


注:本文中的net.ssehub.easy.instantiation.core.model.vilTypes.Invisible类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。