##### Coverage Report - org.apache.commons.scxml.test.StandaloneElExpressions

Classes in this File | Line Coverage | Branch Coverage | Complexity
StandaloneElExpressions |
0% |
0% |
| 1.5;1.5

1 |  |
     /*
2 |  |
      *
3 |  |
      *   Copyright 2005-2006 The Apache Software Foundation.
4 |  |
      *
5 |  |
      *  Licensed under the Apache License, Version 2.0 (the "License");
6 |  |
      *  you may not use this file except in compliance with the License.
7 |  |
      *  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 |  |
      */
18 |  |
     package org.apache.commons.scxml.test;
19 |  |
20 |  |
     import org.apache.commons.scxml.Evaluator;
21 |  |
     import org.apache.commons.scxml.env.jsp.ELEvaluator;
22 |  |
23 |  |
     /**
24 |  |
      * Standalone SCXML interpreter, useful for command-line testing and
25 |  |
      * debugging, where expressions are JSP 2.0 EL expressions.
26 |  |
      *
27 |  |
      * <p>USAGE:</p>
28 |  |
      * <p><code>java org.apache.commons.scxml.test.StandaloneElExpressions
29 |  |
      *          url</code></p>
30 |  |
      * <p>or</p>
31 |  |
      * <p><code>java org.apache.commons.scxml.test.StandaloneElExpressions
32 |  |
      *          filename</code>
33 |  |
      * </p>
34 |  |
      *
35 |  |
      * <p>RUNNING:</p>
36 |  |
      * <ul>
37 |  |
      *  <li>Enter a space-separated list of "events"</li>
38 |  |
      *  <li>To quit, enter "quit"</li>
39 |  |
      *  <li>To populate a variable in the current context,
40 |  |
      *      type "name=value"</li>
41 |  |
      *  <li>To reset state machine, enter "reset"</li>
42 |  |
      * </ul>
43 |  |
      *
44 |  |
      */
45 |  |
     public final class StandaloneElExpressions {
46 |  |
47 |  |
         /**
48 |  |
          * Launcher.
49 |  |
          * @param args The arguments, one expected, the URI or filename of the
50 |  |
          *             SCXML document
51 |  |
          */
52 |  |
         public static void main(final String[] args) {
53 | 0 |
             if (args.length < 1) {
54 | 0 |
                 System.out.println("USAGE: java "
55 | 0 |
                         + StandaloneElExpressions.class.getName()
56 |  |
                         + "<url|filename>");
57 | 0 |
                 System.exit(-1);
58 |  |
             }
59 | 0 |
             Evaluator evaluator = new ELEvaluator();
60 | 0 |
             StandaloneUtils.execute(args[0], evaluator);
61 | 0 |
         }
62 |  |
63 |  |
         /**
64 |  |
          * Discourage instantiation since this is a utility class.
65 |  |
          */
66 |  |
         private StandaloneElExpressions() {
67 | 0 |
             super();
68 | 0 |
         }
69 |  |
70 |  |
     }
71 |  |