sdkcreationmw/sdkruntimes/MIDP/nei/src/com/symbian/tools/j2me/sei/emulator/commands/VMLaunchArguments.java
changeset 1 ac50fd48361b
parent 0 b26acd06ea60
equal deleted inserted replaced
0:b26acd06ea60 1:ac50fd48361b
     1 /*
     1 /*
     2 * Copyright (c) 2003 - 2004 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2003 - 2004 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of the License "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     8 *
     9 * Initial Contributors:
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description: 
    14 * Description:
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 package com.symbian.tools.j2me.sei.emulator.commands;
    18 package com.symbian.tools.j2me.sei.emulator.commands;
    19 
    19 
    75 
    75 
    76 
    76 
    77   //
    77   //
    78   // Members
    78   // Members
    79   //
    79   //
    80 
       
    81 
       
    82   /**
       
    83    * MIDlet suite AMS arguments
       
    84    */
       
    85   private MIDletSuiteAMSArguments iAMSArguments = new MIDletSuiteAMSArguments();
       
    86 
    80 
    87   /**
    81   /**
    88    * VM arguments
    82    * VM arguments
    89    */
    83    */
    90   private VMArguments iVMArguments = new VMArguments();
    84   private VMArguments iVMArguments = new VMArguments();
   153    * Initialize arguments using the SEICommand object
   147    * Initialize arguments using the SEICommand object
   154    *
   148    *
   155    * @param aSEICommand SEI command
   149    * @param aSEICommand SEI command
   156    */
   150    */
   157   public VMLaunchArguments(SEICommand aSEICommand) {
   151   public VMLaunchArguments(SEICommand aSEICommand) {
   158     //properties
       
   159     if(aSEICommand.getSystemProperties() != null)
       
   160     {
       
   161       Map props = aSEICommand.getSystemProperties();
       
   162       String key;
       
   163       for(Iterator iter = props.keySet().iterator(); iter.hasNext(); )
       
   164       {
       
   165         key = (String)iter.next();
       
   166         iAMSArguments.setSystemProperty(key, (String)props.get(key));
       
   167       }
       
   168     }
       
   169 
       
   170     //verbose
   152     //verbose
   171     for(Iterator iter = aSEICommand.getVerboseTypes().iterator();iter.hasNext() ;)
   153     for(Iterator iter = aSEICommand.getVerboseTypes().iterator();iter.hasNext() ;)
   172     {
   154     {
   173       iVMArguments.setVerboseType((String)sVerboseArgsMap.get(iter.next()));
   155       iVMArguments.setVerboseType((String)sVerboseArgsMap.get(iter.next()));
   174     }
   156     }
   193    */
   175    */
   194   public VMArguments getVMArguments(){
   176   public VMArguments getVMArguments(){
   195     return iVMArguments;
   177     return iVMArguments;
   196   }
   178   }
   197 
   179 
   198 
       
   199   /**
       
   200    * Get MIDlet suite AMS arguments
       
   201    *
       
   202    * @return MIDlet suite AMS arguments
       
   203    */
       
   204   public MIDletSuiteAMSArguments getMIDletSuiteAMSArguments()
       
   205   {
       
   206     return iAMSArguments;
       
   207   }
       
   208 
       
   209 
       
   210   /**
   180   /**
   211    * Get MIDlet info
   181    * Get MIDlet info
   212    *
   182    *
   213    * @return MIDlet info
   183    * @return MIDlet info
   214    */
   184    */
   236    *
   206    *
   237    * @throws IOException if some error occured
   207    * @throws IOException if some error occured
   238    */
   208    */
   239   public void dump(DataOutputStream aDos) throws IOException{
   209   public void dump(DataOutputStream aDos) throws IOException{
   240     iMIDletInfo.dump(aDos);
   210     iMIDletInfo.dump(aDos);
   241     aDos.writeUTF(iVMArguments.getArguments() + " " + iAMSArguments.getArguments());
   211     //No need to write AMSArguments to the OutputStream 
       
   212     aDos.writeUTF(iVMArguments.getArguments());
   242   }
   213   }
   243 
   214 
   244 }
   215 }