tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/utils/TraceCompilerVersion.java
changeset 56 aa2539c91954
parent 41 838cdffd57ce
child 62 1c2bb2fc7c87
equal deleted inserted replaced
54:a151135b0cf9 56:aa2539c91954
       
     1 /*
       
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 * Version number abstraction
       
    17 *
       
    18 */
       
    19 package com.nokia.tracecompiler.utils;
       
    20 
       
    21 /**
       
    22  * Version number abstraction
       
    23  * 
       
    24  */
       
    25 public abstract class TraceCompilerVersion {
       
    26 
       
    27 	/**
       
    28 	 * Sub-class, which implements getVersion
       
    29 	 */
       
    30 	private static TraceCompilerVersion versionImpl;
       
    31 
       
    32 	/**
       
    33 	 * Gets TraceCompiler version number
       
    34 	 * 
       
    35 	 * @return version number
       
    36 	 */
       
    37 	public static String getVersion() {
       
    38 		String version = null;
       
    39 		if (versionImpl != null) {
       
    40 			version = versionImpl.getTraceCompilerVersion();
       
    41 		} else {
       
    42 			// TODO: This is used in console builds -> Maintenance needed
       
    43 			version = "2.3.0"; //$NON-NLS-1$
       
    44 		}
       
    45 		return version;
       
    46 	}
       
    47 
       
    48 	/**
       
    49 	 * Gets the version number as x.y.z
       
    50 	 * 
       
    51 	 * @return the version string
       
    52 	 */
       
    53 	protected abstract String getTraceCompilerVersion();
       
    54 
       
    55 }