當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。