Interface TokenFactory

    • Method Detail

      • recordToken

        void recordToken​(@NonNull String image,
                         int startLine,
                         int startCol,
                         int endLine,
                         int endCol)
        Record a token given its coordinates. Coordinates must match the requirements of FileLocation, ie, be 1-based and ordered properly.
        Parameters:
        image - Image of the token. This will be taken into account to determine the hash value of the token.
        startLine - Start line of the token
        startCol - Start column of the token
        endLine - End line of the token
        endCol - End column of the token
      • recordToken

        default void recordToken​(@NonNull String image,
                                 @NonNull FileLocation location)
        Record a token given its coordinates. Coordinates must match the requirements of FileLocation, ie, be 1-based and ordered properly.
        Parameters:
        image - Image of the token. This will be taken into account to determine the hash value of the token.
        location - Location of the token.
      • setImage

        void setImage​(TokenEntry entry,
                      @NonNull String newImage)
        Sets the image of an existing token entry.
      • peekLastToken

        @Nullable TokenEntry peekLastToken()
        Returns the last token that has been recorded in this file.