it.unimi.dsi.webgraph
Class GraphClassParser

java.lang.Object
  extended by com.martiansoftware.jsap.StringParser
      extended by com.martiansoftware.jsap.stringparsers.ClassStringParser
          extended by it.unimi.dsi.webgraph.GraphClassParser

public class GraphClassParser
extends ClassStringParser

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


Field Summary
static String[] PACKAGE
          The packages that will be prepended to each graph class.
 
Constructor Summary
protected GraphClassParser()
           
 
Method Summary
static ImmutableGraph getGraphFromSpec(String spec)
          Deprecated. Use ObjectParser.fromSpec(String, Class, String[], String[]).
static ClassStringParser getParser()
           
 Object parse(String className)
          Parses the given class name, but as a first try prepends the package names found in 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
The packages that will be prepended to each graph class.

Constructor Detail

GraphClassParser

protected GraphClassParser()
Method Detail

getParser

public static ClassStringParser getParser()

parse

public Object parse(String className)
             throws ParseException
Parses the given class name, but as a first try prepends the package names found in PACKAGE.

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

getGraphFromSpec

@Deprecated
public static ImmutableGraph getGraphFromSpec(String spec)
                                       throws ParseException
Deprecated. Use ObjectParser.fromSpec(String, Class, String[], String[]).

Throws:
ParseException