Class VariableSymbol

java.lang.Object
org.ek9lang.compiler.symbols.Symbol
org.ek9lang.compiler.symbols.VariableSymbol
All Implemented Interfaces:
Serializable, ISymbol, ITokenReference

public class VariableSymbol extends Symbol
Models a variable.
See Also:
  • Constructor Details

  • Method Details

    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Symbol
    • clone

      public VariableSymbol 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 ISymbol
      Overrides:
      clone in class Symbol
    • cloneIntoVariable

      protected VariableSymbol cloneIntoVariable(VariableSymbol newCopy)
    • isPropertyField

      public boolean isPropertyField()
    • setAggregatePropertyField

      public void setAggregatePropertyField(boolean isAggregatePropertyField)
    • isPrivate

      public boolean isPrivate()
    • setPrivate

      public void setPrivate(boolean isPrivate)
    • isPublic

      public boolean isPublic()
    • isLoopVariable

      public boolean isLoopVariable()
    • setLoopVariable

      public void setLoopVariable(boolean asLoopVar)
    • isIncomingParameter

      public boolean isIncomingParameter()
    • setIncomingParameter

      public void setIncomingParameter(boolean incomingParameter)
    • isReturningParameter

      public boolean isReturningParameter()
    • setReturningParameter

      public void setReturningParameter(boolean returningParameter)
    • isMutable

      public boolean isMutable()
      Description copied from interface: ISymbol
      Even constants can be mutable until set. then they change to being none mutable. Likewise in 'pure' scopes a variable can be mutable until it is first set then none mutable.
      Specified by:
      isMutable in interface ISymbol
      Overrides:
      isMutable in class Symbol
      Returns:
      If this symbol is mutable or not.
    • getFriendlyName

      public String getFriendlyName()
      Description copied from interface: ISymbol
      Provide the name an end user would need to see on the screen. Normally this is just 'getName' but in the case of Templates We use a very nasty internal naming for List of SomeClass - which will probably be something like _List_hashed_version_of_ComeClass and the end user needs to see 'List of SomeClass' for it to be meaningful.
      Specified by:
      getFriendlyName in interface ISymbol
      Overrides:
      getFriendlyName in class Symbol
      Returns:
      a user presentable of the symbol name.