Package org.overturetool.vdmj.values

Examples of org.overturetool.vdmj.values.ValueListener


        if (v instanceof UpdatableValue)
        {
          UpdatableValue upVal = (UpdatableValue) v;
          final String variableLogName = name;
          ValueListener listener = new ValueListener()
          {
            final String name = variableLogName;

            public void changedValue(LexLocation location,
                Value value, Context ctxt)
            {
              SimulationLogger.log(new SimulationMessage(name, SystemClock.getWallTime(), value.toString()));
            }
          };
          if (upVal.listeners == null)
          {
            upVal.listeners = new ValueListenerList(listener);
          } else
          {
            upVal.listeners.add(listener);
          }
          listener.changedValue(null, upVal, null);
        } else
        {
          System.err.println("A non updatable value cannot be logged...it is constant!");
        }
      }
View Full Code Here

TOP

Related Classes of org.overturetool.vdmj.values.ValueListener

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.