Class TokenSourceFragment

java.lang.Object
spoon.support.sniper.internal.TokenSourceFragment
All Implemented Interfaces:
SourceFragment

public class TokenSourceFragment extends Object implements SourceFragment
a SourceFragment of some primitive String token, like separator, operator, whitespace, ...
  • Constructor Details

    • TokenSourceFragment

      public TokenSourceFragment(String source, TokenType type)
  • Method Details

    • getSourceCode

      public String getSourceCode()
      Specified by:
      getSourceCode in interface SourceFragment
      Returns:
      origin source code of whole fragment represented by this instance
    • getType

      public TokenType getType()
      Returns:
      type of token of this fragment
    • toString

      public String toString()
      Overrides:
      toString in class Object