Class LightWeightImportationVisitor

All Implemented Interfaces:
GenericVisitor<Node,Void,ParseException>, JepComponent, Serializable

public class LightWeightImportationVisitor extends GenericDeepCopyVisitor<Void>
A variant off the ImportationVisitor that uses either the same pfmc for a node or its getLightWeightInstance() if the function implements JepComponent. The ImportationVisitor finds the function by looking it up in the FunctionTable.

This class is used by the MacroFunction to ensure that these work correctly with the com.singularsys.jep.misc.overloadedfunctions package.

  Jep sourceJep = ...;
  Jep destJep = ...;
  LightWeightImportationVisitor iv = new LightWeightImportationVisitor(destJep);
  Node node = sourceJep.parse("x^2-y^2");
  Node imported = iv.importEqn(node);
Since:
Jep 4.1
See Also: