Class ResolutionDirective

java.lang.Object
org.ek9lang.compiler.directives.ResolutionDirective
All Implemented Interfaces:
Directive
Direct Known Subclasses:
GenusDirective, ImplementsDirective, NotResolvedDirective, ResolvedDirective

public abstract class ResolutionDirective extends Object implements Directive
To be used in EK9 source code to assert that a type can or cannot be resolved. //@Resolved: EXPLICIT_TYPE_SYMBOL_DEFINITION: TEMPLATE_TYPE: "List" //@NotResolved: EXPLICIT_TYPE_SYMBOL_DEFINITION: TYPE: "List of Integer"
  • Constructor Details

    • ResolutionDirective

      ResolutionDirective(DirectiveSpec spec)
      A new resolution style directive. The symbol Name can be single like Integer or parameterised like List of (String). If parameterised it must have the parenthesis.
  • Method Details

    • isForPhase

      public boolean isForPhase(CompilationPhase phase)
      returns true if the directive is for the phase passed in.
      Specified by:
      isForPhase in interface Directive
    • getDirectiveToken

      public IToken getDirectiveToken()
      Description copied from interface: Directive
      Provide a token from the source, by default if not possible supply synthetic.
      Specified by:
      getDirectiveToken in interface Directive
    • getAppliesToLineNumber

      public int getAppliesToLineNumber()
      Description copied from interface: Directive
      Which line number does this directive apply to.
      Specified by:
      getAppliesToLineNumber in interface Directive
    • getSymbolCategory

      public ISymbol.SymbolCategory getSymbolCategory()
    • getSymbolName

      public String getSymbolName()
    • getAdditionalName

      public String getAdditionalName()
    • isForVariable

      public boolean isForVariable()
    • getSymbolSearch

      public SymbolSearch getSymbolSearch()
    • toString

      public String toString()
      Overrides:
      toString in class Object