Class TokenImpl

java.lang.Object
org.webpieces.templatingdev.impl.source.TokenImpl
All Implemented Interfaces:
Token

public class TokenImpl extends Object implements Token
  • Field Details

    • begin

      public int begin
    • end

      public int end
    • state

      public TemplateToken state
    • beginLineNumber

      public int beginLineNumber
    • endLineNumber

      public int endLineNumber
    • source

      public String source
  • Constructor Details

    • TokenImpl

      public TokenImpl(String filePath, int begin, int end, TemplateToken state, int beginLineNumber, int endLineNumber, String source)
  • Method Details

    • toString

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

      public String getValue()
    • getCleanValue

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

      public String getFilePath()
    • getSourceLocation

      public 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 String getTagName()
    • verifyContentsHaveNoStartTag

      public void verifyContentsHaveNoStartTag()