Module suggest

Class MethodSymbol

All Implemented Interfaces:
MemberSymbol, Scope, Symbol, SymbolWithModifiers, TypedSymbol
Direct Known Subclasses:
ConstructorSymbol, MethodSymbolImport

public class MethodSymbol extends FunctionSymbol implements MemberSymbol, SymbolWithModifiers
A method symbol is a function that lives within an aggregate/class and has a slot number.
  • Field Details

    • slot

      protected int slot
    • modifier

      protected int modifier
  • Constructor Details

    • MethodSymbol

      public MethodSymbol(String name)
  • Method Details

    • getSlotNumber

      public int getSlotNumber()
      Specified by:
      getSlotNumber in interface MemberSymbol
    • getParameters

      public Collection<Symbol> getParameters()
    • addModifier

      public void addModifier(int m)
      Specified by:
      addModifier in interface SymbolWithModifiers
    • getModifiers

      public int getModifiers()
      Specified by:
      getModifiers in interface SymbolWithModifiers
    • match

      public boolean match(MethodSymbol m)
      check if the given methodsymbol has the same set of parameters/ name/ and return value. List are not ordered so there is not reason the getparam provide the same order. Which will still provide true.... TODO: check the order of the parameters as well
    • match

      public boolean match(Method m)