Top Description Inners Fields Constructors Methods
org.eclipse.lsp4j.adapters

public Class HoverTypeAdapter

extends TypeAdapter<Hover>
Class Inheritance
Annotations
@SuppressWarnings:all
Imports
com.google.gson.Gson, .JsonElement, .JsonObject, .JsonParser, .TypeAdapter, .TypeAdapterFactory, com.google.gson.reflect.TypeToken, com.google.gson.stream.JsonReader, .JsonToken, .JsonWriter, java.io.IOException, java.util.ArrayList, .List, org.eclipse.lsp4j.Hover, .MarkedString, .MarkupContent, .Range, org.eclipse.lsp4j.jsonrpc.messages.Either

A type adapter for the Hover protocol type.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private static final TypeToken<Either<List<Either<String, MarkedString>>, MarkupContent>>
private final Gson
private static final TypeToken<List<Either<String, MarkedString>>>
private static final TypeToken<Either<String, MarkedString>>

Constructor Summary

AccessConstructor and Description
public
HoverTypeAdapter(final Gson gson)

Method Summary

Modifier and TypeMethod and Description
public Hover
read(final JsonReader in)

Implements abstract com.google.gson.TypeAdapter.read.

Reads one JSON value (an array, object, string, number, boolean or null) and converts it to a Java object.

protected Either<List<Either<String, MarkedString>>, MarkupContent>
protected Range
public void
write(final JsonWriter out, final Hover value)

Implements abstract com.google.gson.TypeAdapter.write.

Writes one JSON value (an array, object, string, number, boolean or null) for value.

protected void
protected void
writeRange(final JsonWriter out, final Range value)

Inherited from com.google.gson.TypeAdapter:
fromJsonfromJsonfromJsonTreenullSafetoJsontoJsontoJsonTree

Field Detail

CONTENTS_TYPE_TOKENback to summary
private static final TypeToken<Either<List<Either<String, MarkedString>>, MarkupContent>> CONTENTS_TYPE_TOKEN
gsonback to summary
private final Gson gson
LIST_STRING_MARKEDSTRINGback to summary
private static final TypeToken<List<Either<String, MarkedString>>> LIST_STRING_MARKEDSTRING
STRING_MARKEDSTRINGback to summary
private static final TypeToken<Either<String, MarkedString>> STRING_MARKEDSTRING

Constructor Detail

HoverTypeAdapterback to summary
public HoverTypeAdapter(final Gson gson)

Method Detail

readback to summary
public Hover read(final JsonReader in) throws IOException

Implements abstract com.google.gson.TypeAdapter.read.

Doc from com.google.gson.TypeAdapter.read.

Reads one JSON value (an array, object, string, number, boolean or null) and converts it to a Java object. Returns the converted object.

readContentsback to summary
protected Either<List<Either<String, MarkedString>>, MarkupContent> readContents(final JsonReader in) throws IOException
readRangeback to summary
protected Range readRange(final JsonReader in) throws IOException
writeback to summary
public void write(final JsonWriter out, final Hover value) throws IOException

Implements abstract com.google.gson.TypeAdapter.write.

Doc from com.google.gson.TypeAdapter.write.

Writes one JSON value (an array, object, string, number, boolean or null) for value.

writeContentsback to summary
protected void writeContents(final JsonWriter out, final Either<List<Either<String, MarkedString>>, MarkupContent> contents) throws IOException
writeRangeback to summary
protected void writeRange(final JsonWriter out, final Range value) throws IOException
org.eclipse.lsp4j.adapters back to summary

public Class HoverTypeAdapter.Factory

extends Object
implements TypeAdapterFactory
Class Inheritance
All Implemented Interfaces
com.google.gson.TypeAdapterFactory

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public <T> TypeAdapter<T>
create(final Gson gson, final TypeToken<T> typeToken)

Implements com.google.gson.TypeAdapterFactory.create.

Returns a type adapter for type, or null if this factory doesn't support type.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Factoryback to summary
public Factory()

Method Detail

createback to summary
public <T> TypeAdapter<T> create(final Gson gson, final TypeToken<T> typeToken)

Implements com.google.gson.TypeAdapterFactory.create.

Doc from com.google.gson.TypeAdapterFactory.create.

Returns a type adapter for type, or null if this factory doesn't support type.