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

public Class InitializeParamsTypeAdapter

extends TypeAdapter<InitializeParams>
Class Inheritance
Annotations
@SuppressWarnings:all
Imports
com.google.gson.Gson, .JsonElement, .TypeAdapter, .TypeAdapterFactory, com.google.gson.reflect.TypeToken, com.google.gson.stream.JsonReader, .JsonToken, .JsonWriter, java.io.IOException, java.util.List, org.eclipse.lsp4j.ClientCapabilities, .ClientInfo, .InitializeParams, .WorkspaceFolder, org.eclipse.lsp4j.jsonrpc.messages.Either

A type adapter for the InitializeParams protocol type.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private final Gson
private static final TypeToken<Either<String, Integer>>
private static final TypeToken<List<WorkspaceFolder>>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public InitializeParams
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 ClientCapabilities
protected ClientInfo
protected Object
protected String
protected Integer
protected String
protected String
protected String
protected Either<String, Integer>
protected List<WorkspaceFolder>
public void
write(final JsonWriter out, final InitializeParams 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
writeClientInfo(final JsonWriter out, final ClientInfo value)

protected void
protected void
writeLocale(final JsonWriter out, final String value)

protected void
writeProcessId(final JsonWriter out, final Integer value)

protected void
writeRootPath(final JsonWriter out, final String value)

protected void
writeRootUri(final JsonWriter out, final String value)

protected void
writeTrace(final JsonWriter out, final String value)

protected void
protected void
Inherited from com.google.gson.TypeAdapter:
fromJsonfromJsonfromJsonTreenullSafetoJsontoJsontoJsonTree

Field Detail

gsonback to summary
private final Gson gson
WORKDONETOKEN_TYPE_TOKENback to summary
private static final TypeToken<Either<String, Integer>> WORKDONETOKEN_TYPE_TOKEN
WORKSPACEFOLDERS_TYPE_TOKENback to summary
private static final TypeToken<List<WorkspaceFolder>> WORKSPACEFOLDERS_TYPE_TOKEN

Constructor Detail

InitializeParamsTypeAdapterback to summary
public InitializeParamsTypeAdapter(final Gson gson)

Method Detail

readback to summary
public InitializeParams 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.

readCapabilitiesback to summary
protected ClientCapabilities readCapabilities(final JsonReader in) throws IOException
readClientInfoback to summary
protected ClientInfo readClientInfo(final JsonReader in) throws IOException
readInitializationOptionsback to summary
protected Object readInitializationOptions(final JsonReader in) throws IOException
readLocaleback to summary
protected String readLocale(final JsonReader in) throws IOException
readProcessIdback to summary
protected Integer readProcessId(final JsonReader in) throws IOException
readRootPathback to summary
protected String readRootPath(final JsonReader in) throws IOException
readRootUriback to summary
protected String readRootUri(final JsonReader in) throws IOException
readTraceback to summary
protected String readTrace(final JsonReader in) throws IOException
readWorkDoneTokenback to summary
protected Either<String, Integer> readWorkDoneToken(final JsonReader in) throws IOException
readWorkspaceFoldersback to summary
protected List<WorkspaceFolder> readWorkspaceFolders(final JsonReader in) throws IOException
writeback to summary
public void write(final JsonWriter out, final InitializeParams 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.

writeCapabilitiesback to summary
protected void writeCapabilities(final JsonWriter out, final ClientCapabilities value) throws IOException
writeClientInfoback to summary
protected void writeClientInfo(final JsonWriter out, final ClientInfo value) throws IOException
writeInitializationOptionsback to summary
protected void writeInitializationOptions(final JsonWriter out, final Object value) throws IOException
writeLocaleback to summary
protected void writeLocale(final JsonWriter out, final String value) throws IOException
writeProcessIdback to summary
protected void writeProcessId(final JsonWriter out, final Integer value) throws IOException
writeRootPathback to summary
protected void writeRootPath(final JsonWriter out, final String value) throws IOException
writeRootUriback to summary
protected void writeRootUri(final JsonWriter out, final String value) throws IOException
writeTraceback to summary
protected void writeTrace(final JsonWriter out, final String value) throws IOException
writeWorkDoneTokenback to summary
protected void writeWorkDoneToken(final JsonWriter out, final Either<String, Integer> value) throws IOException
writeWorkspaceFoldersback to summary
protected void writeWorkspaceFolders(final JsonWriter out, final List<WorkspaceFolder> value) throws IOException
org.eclipse.lsp4j.adapters back to summary

public Class InitializeParamsTypeAdapter.Factory

extends Object
implements TypeAdapterFactory
Class Inheritance
  • java.lang.Object
  • org.eclipse.lsp4j.adapters.InitializeParamsTypeAdapter.Factory
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.