Class PsyOperator

java.lang.Object
coneforest.psylla.core.PsyOperator
All Implemented Interfaces:
PsyAtomic, PsyConvertableToName, PsyConvertableToString, PsyExecutable, PsyObject
Direct Known Subclasses:
PsyOperator.Action, PsyOperator.Arity00, PsyOperator.Arity01, PsyOperator.Arity10, PsyOperator.Arity11, PsyOperator.Arity20, PsyOperator.Arity21, PsyOperator.Arity30, PsyOperator.Arity31, PsyOperator.Method

public abstract class PsyOperator extends Object implements PsyAtomic, PsyExecutable
A representation of operator object.
  • Constructor Details

  • Method Details

    • execute

      public void execute(PsyContext oContext)
      Execute this object in the context of the interpreter. Calls invoke(coneforest.psylla.core.PsyContext) method.
      Specified by:
      execute in interface PsyObject
      Parameters:
      oContext -
    • invoke

      public void invoke(PsyContext oContext)
      Invoke this object in the context of the interpreter performing an action associated with it.
      Specified by:
      invoke in interface PsyExecutable
      Specified by:
      invoke in interface PsyObject
      Parameters:
      oContext - the context
    • action

      public abstract void action(PsyContext oContext) throws ClassCastException, PsyErrorException
      Throws:
      ClassCastException
      PsyErrorException
    • toSyntaxString

      public String toSyntaxString()
      Returns a syntatctic string representation of this operator. A syntatctic representation has a form of "--name--", where name is a string returned by getName() method.
      Specified by:
      toSyntaxString in interface PsyObject
      Returns:
      a syntatctic string representation of a name of this operator.
    • getName

      public String getName()
      Returns a name of this operator. A name returned is an operator’s simple class name with first character (underscore) discarded. This method must be overriden when using another naming scheme.
      Returns:
      a name.
    • getPrefix

      public String getPrefix()
    • getSimpleName

      public String getSimpleName()