Interface IAggregateSymbol

All Superinterfaces:
ICanBeGeneric, IScope, IScopedSymbol, ISymbol, ITokenReference, Serializable
All Known Implementing Classes:
AggregateSymbol, AggregateWithTraitsSymbol

public interface IAggregateSymbol extends ICanBeGeneric, IScopedSymbol
Interface for an aggregate, typically a class or something like that.
  • Method Details

    • getScopeType

      IScope.ScopeType getScopeType()
      What sort of scope is this aggregate.
      Specified by:
      getScopeType in interface IScope
    • isMarkedAsDispatcher

      boolean isMarkedAsDispatcher()
      Is this aggregate a dispatcher or just a normal class component whatever.
      Returns:
      true if marked as a dispatcher.
    • getPipeSinkType

      Optional<String> getPipeSinkType()
    • getSubAggregateSymbols

      List<IAggregateSymbol> getSubAggregateSymbols()
      To get a full hierarchy you will need to get these subclasses and then get the subclasses of those.
      Returns:
      a list of all the subclasses of this class
    • addSubAggregateSymbol

      void addSubAggregateSymbol(IAggregateSymbol sub)
      used to add back pointers to subclasses.
      Parameters:
      sub - The sub-class to point back to.
    • getAllMethods

      List<MethodSymbol> getAllMethods()
      Get all methods on this and any supers or traits.
      Returns:
      the list
    • getAllOperators

      List<MethodSymbol> getAllOperators()
      Get all operators on this and any supers or traits.
      Returns:
      the list
    • getAllAbstractMethods

      List<MethodSymbol> getAllAbstractMethods()
      Get all methods marked as abstract in this or any supers.
      Returns:
      The list.
    • getAllNonAbstractMethods

      List<MethodSymbol> getAllNonAbstractMethods()
      Get all methods not marked as abstract in this or any supers.
      Returns:
      The list.
    • getConstructors

      List<MethodSymbol> getConstructors()
      A list of all the defined constructors.
      Returns:
      The list of constructors
    • getAllMethodInThisScopeOnly

      List<MethodSymbol> getAllMethodInThisScopeOnly()
      All methods abstract and non-abstract in this scope.
    • getAllNonAbstractMethodsInThisScopeOnly

      List<MethodSymbol> getAllNonAbstractMethodsInThisScopeOnly()
      Get all methods in this scope only that are not abstract.
      Returns:
      The list
    • getAllAbstractMethodsInThisScopeOnly

      List<MethodSymbol> getAllAbstractMethodsInThisScopeOnly()
      Get all methods in this scope only that are abstract.
      Returns:
      The list
    • getProperties

      List<ISymbol> getProperties()
      Just access to the properties in this aggregate - no supers.
      Returns:
      The list
    • getName

      String getName()
      Name of this aggregate.
      Specified by:
      getName in interface ISymbol
      Returns:
      The basic internal name we'd use to resolve the symbol
    • resolveMatchingMethods

      MethodSymbolSearchResult resolveMatchingMethods(MethodSymbolSearch search, MethodSymbolSearchResult result)
      Resolve for matching methods and add matches to result. Idea is to be able to gather all these up and ensure only one single good result i.e. matching methods does exist and one single method matches best. Else ambiguity or no match.
      Specified by:
      resolveMatchingMethods in interface IScope
    • resolveMember

      Optional<ISymbol> resolveMember(SymbolSearch search)
      Just try and resolve a member in this or super scopes.
      Specified by:
      resolveMember in interface IScope
    • getSuperAggregate

      Optional<IAggregateSymbol> getSuperAggregate()
    • setSuperAggregate

      void setSuperAggregate(Optional<IAggregateSymbol> superAggregate)
    • setSuperAggregate

      void setSuperAggregate(IAggregateSymbol superAggregateSymbol)
    • isInAggregateHierarchy

      boolean isInAggregateHierarchy(IAggregateSymbol theAggregateToCheck)
    • getTraits

      default List<IAggregateSymbol> getTraits()
    • getAllExtensionConstrainedTraits

      default List<AggregateWithTraitsSymbol> getAllExtensionConstrainedTraits()
    • getAllTraits

    • isExtensionConstrained

      default boolean isExtensionConstrained()
    • isImplementingInSomeWay

      boolean isImplementingInSomeWay(IAggregateSymbol aggregate)
      Only really used by aggregates that can have one or more traits. But also super classes or super traits. So can either be implementing directly, super, super - super or traits and supe traits.
    • getAggregateDescription

      String getAggregateDescription()
    • clone

      IScopedSymbol clone(IScope withParentAsAppropriate)
      Description copied from interface: ISymbol
      Clone the symbol and re-parent if this symbol like a method should have a parent. Other symbols like VariableSymbols are un-parented
      Specified by:
      clone in interface IScope
      Specified by:
      clone in interface IScopedSymbol
      Specified by:
      clone in interface ISymbol