Package org.overturetool.vdmj.values

Examples of org.overturetool.vdmj.values.ObjectValue


  private static List<ValueInfo> getNamePairListFromResult(Value value)
  {
    if (value instanceof ObjectValue)
    {
      ObjectValue objVal = ((ObjectValue) value);
      List<ValueInfo> values = new Vector<ValueInfo>();
      Set<String> existingFields = new HashSet<String>();

      for (NameValuePair child : objVal.members.asList())
      {
        existingFields.add(child.name.name);
        values.add(createValue(child.name, objVal.type.classdef, child.value, objVal.getCPU()));
      }

      // FIXME: Fix for BUG: 54536, problematic static initialization with more then 30 files
      // https://chessforge.chess-it.com/gf/project/destecs/tracker/?action=TrackerItemEdit&tracker_item_id=54536&start=0
      try
      {
        for (Field fi : objVal.type.classdef.getClass().getDeclaredFields())
        {
          if (fi.getName().equals("privateStaticValues"))
          {
            fi.setAccessible(true);
            NameValuePairMap privateStaticValues = (NameValuePairMap) fi.get(objVal.type.classdef);

            for (NameValuePair child : privateStaticValues.asList())
            {
              if (!existingFields.contains(child.name.name))
              {
                values.add(createValue(child.name, objVal.type.classdef, child.value, objVal.getCPU()));
              }
            }
          }
          if (fi.getName().equals("publicStaticValues"))
          {
            fi.setAccessible(true);
            NameValuePairMap privateStaticValues = (NameValuePairMap) fi.get(objVal.type.classdef);

            for (NameValuePair child : privateStaticValues.asList())
            {
              if (!existingFields.contains(child.name.name))
              {
                values.add(createValue(child.name, objVal.type.classdef, child.value, objVal.getCPU()));
              }
            }
          }
        }
View Full Code Here


    {
      for (NameValuePair p : members)
      {
        if (p.value.deref() instanceof ObjectValue)
        {
          ObjectValue po = (ObjectValue) p.value.deref();
          parameters.putAll(getParameters(prefix + p.name.name, po.members.asList(), depth++));

        } else if (p.value.deref() instanceof RealValue)
        {
          List<Double> realValue = new Vector<Double>();
View Full Code Here

TOP

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

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.