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


Java Project.getVersion方法代码示例

本文整理汇总了Java中net.ssehub.easy.varModel.model.Project.getVersion方法的典型用法代码示例。如果您正苦于以下问题:Java Project.getVersion方法的具体用法?Java Project.getVersion怎么用?Java Project.getVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.ssehub.easy.varModel.model.Project的用法示例。


在下文中一共展示了Project.getVersion方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: registerProject

import net.ssehub.easy.varModel.model.Project; //导入方法依赖的package包/类
/**
 * Registers an empty project with given names and given imports.
 * 
 * @param projectName the name of the project
 * @param importNames the imports (may be empty)
 */
private void registerProject(String projectName, String... importNames) {
    Project p = new Project(projectName);
    List<ModelImport<Project>> imps = null;
    if (null != importNames) {
        imps = new ArrayList<ModelImport<Project>>();
        for (int i = 0; i < importNames.length; i++) {
            if (null != importNames[i] && importNames[i].length() > 0) {
                ProjectImport imp = new ProjectImport(importNames[i], null);
                p.addImport(imp);
                imps.add(imp);
            }
        }
        if (imps.isEmpty()) {
            imps = null;
        }
    }
    File file = new File(BASE, projectName + ".ivml");
    // don't care whether this exists or not
    ModelInfo<Project> info = new ModelInfo<Project>(p.getName(), p.getVersion(), this, file.toURI(), imps);
    data.put(info, p);
    name2Info.put(projectName, info);
}
 
开发者ID:SSEHUB,项目名称:EASyProducer,代码行数:29,代码来源:UnloadTestModelLoader.java

示例2: marshal

import net.ssehub.easy.varModel.model.Project; //导入方法依赖的package包/类
/**
 * Marshals a given <code>object</code> to the given <code>writer</code> in the 
 * specified marshaling <code>context</code>. This method translates a Project
 * type singleton to a name.
 * 
 * @param object the object to be marshaled
 * @param writer the output stream writer
 * @param context the marshaling context
 */
@Override
public void marshal(Object object, HierarchicalStreamWriter writer, MarshallingContext context) {
    Project project = (Project) object;
    writer.startNode("project");
    writer.addAttribute("name", project.getName());
    Version version = project.getVersion();
    String versionAsString = "";
    if (null != version) {
        versionAsString = version.getVersion();
    }
    writer.addAttribute("version", versionAsString);
    writer.endNode();
    
}
 
开发者ID:SSEHUB,项目名称:EASyProducer,代码行数:24,代码来源:ProjectConverter.java

示例3: ivmlFileLocation

import net.ssehub.easy.varModel.model.Project; //导入方法依赖的package包/类
/**
 * This method locates the project file for the ivml variability model for a specific ivml project
 * within the given storage path.
 * 
 * @param project The ivml project which should be read/saved
 * @param storagePath The location (top level folder) of the configuration files
 * @return The absolute path for the file to be written/read.
 */
public static final String ivmlFileLocation(Project project, String storagePath) {
    String projectName = project.getQualifiedName();
    String projectVersion = null;
    Version version = project.getVersion();
    if (null != version) {
        projectVersion = version.getVersion();
    }
    
    return ivmlFileLocation(projectName, projectVersion, storagePath);
}
 
开发者ID:SSEHUB,项目名称:EASyProducer,代码行数:19,代码来源:PersistenceUtils.java

示例4: generateQualifiedName

import net.ssehub.easy.varModel.model.Project; //导入方法依赖的package包/类
/**
 * Returns the qualified name of a project as unique identifier for comparison whether the project was deleted.
 * @param project The project for which the qualified name shall be generated.
 * @return projectName[+Version].
 */
private String generateQualifiedName(Project project) {
    Version v = project.getVersion();
    return (null == v) ? project.getName() : project.getName() + "+" + v.getVersion();
}
 
开发者ID:SSEHUB,项目名称:EASyProducer,代码行数:10,代码来源:RewriteContext.java


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