it.unimi.di.mg4j.util
Class MG4JClassParser

java.lang.Object
  extended by com.martiansoftware.jsap.StringParser
      extended by com.martiansoftware.jsap.stringparsers.ClassStringParser
          extended by it.unimi.di.mg4j.util.MG4JClassParser

public class MG4JClassParser
extends com.martiansoftware.jsap.stringparsers.ClassStringParser

A small wrapper around JSAP's standard ClassStringParser. It tries to prefix it.unimi.di.mg4j.package. to the provided class name, making the specification of graph classes on the command line much easier.


Field Summary
static String[] PACKAGE
           
 
Constructor Summary
protected MG4JClassParser()
           
 
Method Summary
static com.martiansoftware.jsap.stringparsers.ClassStringParser getParser()
           
 Object parse(String className)
          Parses the given class name, but as a first try prepends it.unimi.di.mg4j.package..
 
Methods inherited from class com.martiansoftware.jsap.StringParser
setUp, tearDown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PACKAGE

public static final String[] PACKAGE
Constructor Detail

MG4JClassParser

protected MG4JClassParser()
Method Detail

getParser

public static com.martiansoftware.jsap.stringparsers.ClassStringParser getParser()

parse

public Object parse(String className)
             throws com.martiansoftware.jsap.ParseException
Parses the given class name, but as a first try prepends it.unimi.di.mg4j.package..

Overrides:
parse in class com.martiansoftware.jsap.stringparsers.ClassStringParser
Parameters:
className - the name of a class, possibly without package specification.
Throws:
com.martiansoftware.jsap.ParseException