edu.cmu.emulator
Class UserClassDefParser

java.lang.Object
  extended by edu.cmu.emulator.UserClassDefParser

public class UserClassDefParser
extends Object

The parser for parsing the UserClassDef tag in the config file. After parsing the tag and the child nodes of the tag, this class creates a list of the specified user defined classes which are to be loaded into the system at runtime.

See Also:
EmuClassLoader

Field Summary
private  ArrayList argList
           
 String[][] args
           
private  ArrayList className
           
 String[] classNames
           
private  ArrayList url
           
 String[] urls
           
 
Constructor Summary
UserClassDefParser()
          Constructor.
 
Method Summary
 void parse(Element userClassDefElement)
          This method takes as input the DOM element representing the UserClassDef tag and parses through its subtree.It creates an array of URLs and user defined class names from the information extracted.
 void print()
           
protected  String[] stringToArgs(String argString)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

urls

public String[] urls

classNames

public String[] classNames

args

public String[][] args

url

private ArrayList url

className

private ArrayList className

argList

private ArrayList argList
Constructor Detail

UserClassDefParser

public UserClassDefParser()
Constructor.

Method Detail

parse

public void parse(Element userClassDefElement)
This method takes as input the DOM element representing the UserClassDef tag and parses through its subtree.It creates an array of URLs and user defined class names from the information extracted. The URLs and classnames are used by the EmuClassLoader to locate and load the user defined classes at run time.

Parameters:
userClassDefElement - The DOM element representing the UserClassDef tag subtree.

stringToArgs

protected String[] stringToArgs(String argString)

print

public void print()


Copyright © 2013. All Rights Reserved.