javacommons/utils/javasrc/com/nokia/mj/impl/runtime/rtport/RuntimeInfoFactory.java
branchRCL_3
changeset 24 0fd27995241b
parent 20 f9bb0fca356a
child 25 9ac0a0a7da70
equal deleted inserted replaced
20:f9bb0fca356a 24:0fd27995241b
     1 /*
       
     2 * Copyright (c) 2006 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 */
       
    17 
       
    18 
       
    19 package com.nokia.mj.impl.runtime.rtport;
       
    20 
       
    21 /**
       
    22  * Factory to get the RuntimeInfo implementation.
       
    23  *
       
    24  * The RuntimeInfo implementation class is searched and dynamically loaded
       
    25  * based on the value of "nokia.rt.port" system property.
       
    26  *
       
    27  * The class named "com.nokia.mj.impl.runtime.rtport.<value>.RuntimeInfoImpl"
       
    28  * is tried to be loaded first, and if that is not found the value is tried to
       
    29  * be used as a full class name.
       
    30  *
       
    31  * If the system property does not exist, then the default value "midp" is used.
       
    32  */
       
    33 public class RuntimeInfoFactory
       
    34 {
       
    35     /** RuntimeInfo instance */
       
    36     private static RuntimeInfo sInstance = new RuntimeInfoImpl();
       
    37 
       
    38     /**
       
    39      * Returns the RuntimeInfo
       
    40      *
       
    41      * @return RuntimeInfo
       
    42      */
       
    43     public static RuntimeInfo getRuntimeInfo()
       
    44     {
       
    45         return sInstance;
       
    46     }
       
    47 }