Class TokenImpl

  • All Implemented Interfaces:
    Token

    public class TokenImpl
    extends java.lang.Object
    implements Token
    • Field Detail

      • begin

        public int begin
      • end

        public int end
      • beginLineNumber

        public int beginLineNumber
      • endLineNumber

        public int endLineNumber
      • source

        public java.lang.String source
    • Constructor Detail

      • TokenImpl

        public TokenImpl​(java.lang.String filePath,
                         int begin,
                         int end,
                         TemplateToken state,
                         int beginLineNumber,
                         int endLineNumber,
                         java.lang.String source)
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getValue

        public java.lang.String getValue()
      • getCleanValue

        public java.lang.String getCleanValue()
        Description copied from interface: Token
        Get's the entire String between #{ and }# including arguments
        Specified by:
        getCleanValue in interface Token
      • getFilePath

        public java.lang.String getFilePath()
      • getSourceLocation

        public java.lang.String getSourceLocation​(boolean dueToError)
        Description copied from interface: Token
        When you throw an exception, you can add the location in the source by reading from the token it's location
        Specified by:
        getSourceLocation in interface Token
      • isEndTag

        public boolean isEndTag()
        Specified by:
        isEndTag in interface Token
      • getTagName

        public java.lang.String getTagName()
      • verifyContentsHaveNoStartTag

        public void verifyContentsHaveNoStartTag()