Coverage Report - org.apache.commons.scxml.test.StandaloneJexlExpressions

Classes in this File Line Coverage Branch Coverage Complexity
StandaloneJexlExpressions
0% 
0% 
1.5

 1  
 /*
 2  
  * Licensed to the Apache Software Foundation (ASF) under one or more
 3  
  * contributor license agreements.  See the NOTICE file distributed with
 4  
  * this work for additional information regarding copyright ownership.
 5  
  * The ASF licenses this file to You under the Apache License, Version 2.0
 6  
  * (the "License"); you may not use this file except in compliance with
 7  
  * the License.  You may obtain a copy of the License at
 8  
  *
 9  
  *     http://www.apache.org/licenses/LICENSE-2.0
 10  
  *
 11  
  * Unless required by applicable law or agreed to in writing, software
 12  
  * distributed under the License is distributed on an "AS IS" BASIS,
 13  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 14  
  * See the License for the specific language governing permissions and
 15  
  * limitations under the License.
 16  
  */
 17  
 package org.apache.commons.scxml.test;
 18  
 
 19  
 import org.apache.commons.scxml.Evaluator;
 20  
 import org.apache.commons.scxml.env.jexl.JexlEvaluator;
 21  
 
 22  
 /**
 23  
  * Standalone SCXML interpreter, useful for command-line testing and
 24  
  * debugging, where expressions are JEXL expressions.
 25  
  *
 26  
  * <p>USAGE:</p>
 27  
  * <p><code>java org.apache.commons.scxml.test.StandaloneJexlExpressions
 28  
  *          url</code></p>
 29  
  * <p>or</p>
 30  
  * <p><code>java org.apache.commons.scxml.test.StandaloneJexlExpressions
 31  
  *          filename</code>
 32  
  * </p>
 33  
  *
 34  
  * <p>RUNNING:</p>
 35  
  * <ul>
 36  
  *  <li>Enter a space-separated list of "events"</li>
 37  
  *  <li>To quit, enter "quit"</li>
 38  
  *  <li>To populate a variable in the current context,
 39  
  *      type "name=value"</li>
 40  
  *  <li>To reset state machine, enter "reset"</li>
 41  
  * </ul>
 42  
  *
 43  
  */
 44  
 public final class StandaloneJexlExpressions {
 45  
 
 46  
     /**
 47  
      * Launcher.
 48  
      * @param args The arguments, one expected, the URI or filename of the
 49  
      *             SCXML document
 50  
      */
 51  
     public static void main(final String[] args) {
 52  0
         if (args.length < 1) {
 53  0
             System.out.println("USAGE: java "
 54  0
                     + StandaloneJexlExpressions.class.getName()
 55  
                     + "<url|filename>");
 56  0
             System.exit(-1);
 57  
         }
 58  0
         Evaluator evaluator = new JexlEvaluator();
 59  0
         StandaloneUtils.execute(args[0], evaluator);
 60  0
     }
 61  
 
 62  
     /**
 63  
      * Discourage instantiation since this is a utility class.
 64  
      */
 65  
     private StandaloneJexlExpressions() {
 66  0
         super();
 67  0
     }
 68  
 
 69  
 }
 70