kadabra‐js‐apis‐breaking‐changes - specs-feup/kadabra GitHub Wiki

Kadabra-JS APIs' Breaking Changes

From Factory.ts

  • aspectdef GetOrNewClass is now function getOrNewClass and returns a value of type Class instead of an object with that single value as a property
  • aspectdef NewClass is now function newClass and returns a value of type Class instead of an object with that single value as a property
  • aspectdef GenerateFunctionalInterface is now called generateFunctionalInterface
  • function Mod is now a class

From KadabraAst.ts

  • var KadabraAst is now a class

From KadabraNodes.ts

  • var KadabraNodes is now a class

From Metrics.ts

  • aspectdef Main is now function main
  • aspectdef Extract is now function extract and is no longer exported
  • function merge is now called mergeReports and is no longer exported
  • aspectdef ReportType is now function reportType and is no longer exported
  • aspectdef ReportMethod is now function reportMethod and is no longer exported
  • aspectdef ProcessBody is now function processBody and is no longer exported
  • aspectdef ProcessStatement is now function processStatement and is no longer exported
  • function toCSVLine no longer exists
  • aspectdefs ProcessBodyFrom, ProcessIfElse and ProcessSwitch no longer exist
  • Created 3 interfaces for the metrics: MetricsReport, TypeReport and MethodReport

From Transform.ts

  • aspectdef ExtractToField is now function extractToField
  • aspectdef NewMappingClass is now function newMappingClass and all parameters except the last (target) are mandatory
  • aspectdef NewFunctionalMethodCaller2 is now function newFunctionalMethodCaller

From Types.ts

  • var KTypes is now a class
  • var PRIMITIVE_TYPES is now a const
  • var Types is now an enum

From Utils.ts

  • aspectdef ShowAST is now function showAST
  • aspectdef ConvertPrimitive is now function convertPrimitive
  • aspectdef PrintOnMain is now function printOnMain2
  • aspectdef BeforeExitMain is now function beforeExitMain
  • aspectdef BeforeExit is now function beforeExit
  • aspectdef APINames is now function getAPINames
  • aspectdef IntegerProperty is now function integerProperty
  • aspectdef GetMethod is now function getMethod
  • aspectdef GetClass is now function getClass
  • function selectMethods no longer exists

From monitor/Counter.ts

  • aspectdef NewCounter now returns an object without the property $counter, as the value being returned was never initialized
  • aspectdef GetCountingMonitor and NewCountingMonitor now return a value of type Class instead of an object with that single value as a property

From monitor/CounterList.ts

  • aspectdef GetCountingMonitorList and NewCountingMonitorList now return a value of type Class instead of an object with that single value as a property