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