Package com.martiansoftware.jsap

Examples of com.martiansoftware.jsap.PropertyStringParser


            }
        }

        if (this.hasProperties()) {
            try {
                PropertyStringParser psp =
                    (PropertyStringParser) option.getStringParser();
                ParserProperty[] props = this.getParserProperties();
                for (int i = 0; i < props.length; ++i) {
                    psp.setProperty(props[i].getName(), props[i].getValue());
                }
            } catch (Exception e) {
                throw (
                    new IllegalArgumentException(
                        "Option \""
View Full Code Here


        result = (StringParser) Class.forName(classname).newInstance();
      } else {
        result = (StringParser) Class.forName("com.martiansoftware.jsap.stringparsers." + classname).newInstance();
      }
      if ((properties != null) && (properties.size() > 0)) {
        PropertyStringParser p = (PropertyStringParser) result;
        for (Iterator i = properties.iterator(); i.hasNext(); ) {
          Property property = (Property) i.next();
          p.setProperty(property.getName(), property.getValue());
        }
      }
      return (result);
    } catch (Throwable t) {
      throw (new RuntimeException("Unable to create StringParser " + classname + ": " + t.getMessage(), t));
View Full Code Here

TOP

Related Classes of com.martiansoftware.jsap.PropertyStringParser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.