Class JSONToken

    • Constructor Detail

      • JSONToken

        public JSONToken​(@NotNull
                         @NotNull JSONTokenType type,
                         @NotNull
                         @NotNull String text,
                         @NotNull
                         @NotNull StringLocation begin,
                         @NotNull
                         @NotNull StringLocation end,
                         @NotNull
                         @NotNull JSONText source)
        Create one JSON text token.
        Parameters:
        type - type of this token
        text - text of this token
        begin - beginning location of this token within the source JSON text
        end - end location of this token within the source JSON text
        source - source JSON text where this token was extracted from
      • JSONToken

        public JSONToken​(@NotNull
                         @NotNull JSONTokenType type,
                         @NotNull
                         @NotNull String text,
                         @NotNull
                         @NotNull StringLocation location,
                         @NotNull
                         @NotNull JSONText source)
        Create one JSON text token.
        Parameters:
        type - type of this token
        text - text of this token
        location - location of this token within the source JSON text
        source - source JSON text where this token was extracted from
    • Method Detail

      • type

        @NotNull
        public @NotNull JSONTokenType type()
        Type of this token.
        Returns:
        type of this token
      • text

        @NotNull
        public @NotNull String text()
        Text representation of this token as it appears in the source JSON text.
        Returns:
        text representation of this token as it appears in the source JSON text.
      • range

        @NotNull
        public @NotNull StringRange range()
        Location of this token within the source JSON text.
        Returns:
        location of this token within the source JSON text.
      • beginningLocation

        @NotNull
        public @NotNull StringLocation beginningLocation()
        Location of the beginning of the token within the source JSON text.
        Returns:
        location of the beginning of the token within the source JSON text.
      • endLocation

        @NotNull
        public @NotNull StringLocation endLocation()
        Location of the end of the token within the source JSON text.
        Returns:
        location of the end of the token within the source JSON text.
      • source

        @NotNull
        public @NotNull JSONText source()
        Source JSON text where this token was extracted from.
        Returns:
        source JSON text where this token was extracted from.