View Javadoc

1   /*
2    * To change this template, choose Tools | Templates
3    * and open the template in the editor.
4    */
5   
6   package net.sf.zel.vm;
7   
8   import net.sf.zel.math.ExtendedMathContext;
9   
10  /**
11   *
12   * @author zoly
13   */
14  public final class NullParsingContext implements ParsingContext
15  {
16  
17      private NullParsingContext()
18      {
19      }
20  
21      @Override
22      public void generateCode(Object... args)
23      {
24      }
25  
26      /**
27       * return the current code address
28       * @return
29       */
30      @Override
31      public int getAddress()
32      {
33          throw new UnsupportedOperationException("Not supported yet.");
34      }
35  
36  
37      @Override
38      public void process(Object obj)
39      {
40      }
41  
42      @Override
43      public ProgramBuilder getProgramBuilder()
44      {
45          return null;
46      }
47  
48      @Override
49      public void generateCodeAll(ParsingContext parsingContext)
50      {
51      }
52  
53      @Override
54      public NullParsingContext createSubContext()
55      {
56          return instance;
57      }
58  
59      public static NullParsingContext instance = new NullParsingContext();
60  
61      @Override
62      public ExtendedMathContext getMathContext()
63      {
64          return null;
65      }
66  
67      @Override
68      public void generateCodeAt(int address, Object... args)
69      {
70      }
71  
72  }