Class Directive

java.lang.Object
application.model.rules.ruleloader.Directive
Direct Known Subclasses:
ColourDirective, RuleDirective, RuleNameDirective

public abstract class Directive
extends java.lang.Object
Represents directives (@...) in *.rule files
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected java.lang.String directiveName
    Name of the directive
  • Constructor Summary

    Constructors 
    Constructor Description
    Directive​(java.lang.String content)
    Constructs a directive containing the given content
  • Method Summary

    Modifier and Type Method Description
    abstract java.lang.Object clone()
    Deep copies the directive
    java.lang.String getDirectiveName()
    The name of the directive
    abstract void parseContent​(java.lang.String content)
    Parses the content of the directive

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • directiveName

      protected java.lang.String directiveName
      Name of the directive
  • Constructor Details

    • Directive

      public Directive​(java.lang.String content)
      Constructs a directive containing the given content
      Parameters:
      content - The content of the directive
  • Method Details

    • parseContent

      public abstract void parseContent​(java.lang.String content)
      Parses the content of the directive
      Parameters:
      content - The content of the directive
    • getDirectiveName

      public java.lang.String getDirectiveName()
      The name of the directive
      Returns:
      The name of the directive
    • clone

      public abstract java.lang.Object clone()
      Deep copies the directive
      Overrides:
      clone in class java.lang.Object
      Returns:
      Return a deepcopy of the directive