Class GraphClassParser


  • public class GraphClassParser
    extends com.martiansoftware.jsap.stringparsers.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

      Fields 
      Modifier and Type Field Description
      static java.lang.String[] PACKAGE
      The packages that will be prepended to each graph class.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected GraphClassParser()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static ImmutableGraph getGraphFromSpec​(java.lang.String spec)
      Deprecated.
      Use ObjectParser.fromSpec(String, Class, String[], String[]).
      static com.martiansoftware.jsap.stringparsers.ClassStringParser getParser()  
      java.lang.Object parse​(java.lang.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 java.lang.String[] PACKAGE
        The packages that will be prepended to each graph class.
    • Constructor Detail

      • GraphClassParser

        protected GraphClassParser()
    • Method Detail

      • getParser

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

        public java.lang.Object parse​(java.lang.String className)
                               throws com.martiansoftware.jsap.ParseException
        Parses the given class name, but as a first try prepends the package names found in 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
      • getGraphFromSpec

        @Deprecated
        public static ImmutableGraph getGraphFromSpec​(java.lang.String spec)
                                               throws com.martiansoftware.jsap.ParseException
        Deprecated.
        Use ObjectParser.fromSpec(String, Class, String[], String[]).
        Throws:
        com.martiansoftware.jsap.ParseException