Class StandardProcedure


public final class StandardProcedure extends ProcedureDeclaration

Standard Procedure.

Link to GitHub: Source File.

Author:
Øystein Myhre Andersen
  • Field Details

    • mtdSet

      private String[] mtdSet
      Set of method type descriptors.
    • overLoadMatch

      private ProcedureSpecification overLoadMatch
      The overload match
    • mtdPicked

      private String mtdPicked
      The mtd picked by 'getLegalOverLoadMatch'
  • Constructor Details

    • StandardProcedure

      StandardProcedure(DeclarationScope declaredIn, int kind, Type type, String ident)
      Create a new StandardProcedure without parameters.
      Parameters:
      declaredIn - the enclosing scope
      kind - the declaration kind
      type - the procedure's type
      ident - the procedure identifier
    • StandardProcedure

      StandardProcedure(DeclarationScope declaredIn, int kind, Type type, String ident, Parameter... param)
      Create a new StandardProcedure with parameters.
      Parameters:
      declaredIn - the enclosing scope
      kind - the declaration kind
      type - the procuedre's type
      ident - the procedure identifier
      param - the parameters
    • StandardProcedure

      StandardProcedure(DeclarationScope declaredIn, int kind, String[] mtdSet, Type type, String ident, Parameter... param)
      Create a new StandardProcedure with parameters.
      Parameters:
      declaredIn - the enclosing scope
      kind - the declaration kind
      mtdSet - the set of Method Type Descriptors
      type - the procuedre's type
      ident - the procedure identifier
      param - the parameters
  • Method Details

    • doChecking

      public void doChecking()
      Description copied from class: SyntaxClass

      Perform semantic checking.

      This must be redefined in every subclass.

      Overrides:
      doChecking in class ProcedureDeclaration
    • getOverLoadMatch

      public ProcedureSpecification getOverLoadMatch(Vector<Expression> params)
      Get OverLoadMatch.
      Parameters:
      params - the actual parameters
      Returns:
      OverLoadMatch
    • getLegalOverLoadMatch

      private ProcedureSpecification getLegalOverLoadMatch(String mtd, Vector<Expression> params)
      Get LegalOverLoadMatch.
      Parameters:
      mtd - a method type descriptor
      params - the actual parameters.
      Returns:
      a legal OverLoadMatch or null.
    • getProcedureSpecification

      public ProcedureSpecification getProcedureSpecification(String mtd)
      Return the getProcedureSpecification obtained from the given MethodTypeDesc.
      Parameters:
      mtd - the MethodTypeDesc
      Returns:
      the getProcedureSpecification obtained from the given MethodTypeDesc.
    • getMethodTypeDesc

      public MethodTypeDesc getMethodTypeDesc(Expression beforeDot, Vector<Expression> params)
      Get MethodTypeDesc
      Parameters:
      beforeDot - the Expression beforeDot
      params - the actual parameters
      Returns:
      MethodTypeDesc
    • edMethodTypeDesc

      private String edMethodTypeDesc(Expression beforeDot, Vector<Expression> params)
      Edit MethodTypeDesc
      Parameters:
      beforeDot - the Expression beforeDot
      params - the actual parameters
      Returns:
      MethodTypeDesc String
    • toString

      public String toString()
      Overrides:
      toString in class ProcedureDeclaration