Class StreamCallSymbol

All Implemented Interfaces:
Serializable, IMayReturnSymbol, IScope, IScopedSymbol, ISymbol, ITokenReference

public class StreamCallSymbol extends MethodSymbol
Just re-uses the bulk of method symbol. This is only used in part of the stream pipeline. We need additional information surrounding the type that can be accepted and the type that is produced (chained). In some cases (like a call to head) we can accept anything in and will produce the same back out. But a filter can only accept a certain type in - but will then also product that same type out. A map on the other hand will only accept a certain type and will product another type (maybe - depending on the map). Flatten can only accept something is can iterate over and will then product whatever that type is that is provided by the iterator. This is the 'glue' between streaming commands and functions.
See Also:
  • Constructor Details

    • StreamCallSymbol

      public StreamCallSymbol(String name, IScope enclosingScope)
  • Method Details

    • clone

      public StreamCallSymbol 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
      Overrides:
      clone in class MethodSymbol
    • cloneIntoStreamCallSymbol

      protected StreamCallSymbol cloneIntoStreamCallSymbol(StreamCallSymbol newCopy)
    • isConsumesSymbolPromotionRequired

      public boolean isConsumesSymbolPromotionRequired()
    • setConsumesSymbolPromotionRequired

      public void setConsumesSymbolPromotionRequired(boolean consumesSymbolPromotionRequired)
    • isSinkInNature

      public boolean isSinkInNature()
    • setSinkInNature

      public void setSinkInNature(boolean sinkInNature)
    • isCapableOfConsumingAnything

      public boolean isCapableOfConsumingAnything()
    • setCapableOfConsumingAnything

      public void setCapableOfConsumingAnything(boolean capableOfConsumingAnything)
    • setProducerSymbolTypeSameAsConsumerSymbolType

      public void setProducerSymbolTypeSameAsConsumerSymbolType(boolean producerSymbolTypeSameAsConsumerSymbolType)
    • isDerivesProducesTypeFromConsumesType

      public boolean isDerivesProducesTypeFromConsumesType()
    • setDerivesProducesTypeFromConsumesType

      public void setDerivesProducesTypeFromConsumesType(boolean derivesProducesTypeFromConsumesType)
    • isProducesTypeMustBeAFunction

      public boolean isProducesTypeMustBeAFunction()
    • setProducesTypeMustBeAFunction

      public void setProducesTypeMustBeAFunction(boolean producesTypeMustBeAFunction)
    • getConsumesSymbolType

      public ISymbol getConsumesSymbolType()
    • setConsumesSymbolType

      public void setConsumesSymbolType(ISymbol consumesSymbolType)
      This sets the type of symbol that stream can consume.
    • getProducesSymbolType

      public ISymbol getProducesSymbolType()
    • setProducesSymbolType

      public void setProducesSymbolType(ISymbol producesSymbolType)
      This sets the type of symbol that stream can produce.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class MethodSymbol
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class MethodSymbol