Top Description Fields Constructors Methods
org.eclipse.lsp4j

public Class ClientCapabilities

extends Object
Class Inheritance
Annotations
@SuppressWarnings:all
Imports
com.google.gson.annotations.JsonAdapter, org.eclipse.lsp4j.jsonrpc.json.adapters.JsonElementTypeAdapter, org.eclipse.lsp4j.jsonrpc.util.ToStringBuilder

`ClientCapabilities` now define capabilities for dynamic registration, workspace and text document features the client supports. The experimental can be used to pass experimental capabilities under development. For future compatibility a `ClientCapabilities` object literal can have more properties set than currently defined. Servers receiving a `ClientCapabilities` object literal with unknown properties should ignore these properties. A missing property should be interpreted as an absence of the capability. If a property is missing that defines sub properties all sub properties should be interpreted as an absence of the capability.

Client capabilities got introduced with the version 3.0 of the protocol. They therefore only describe capabilities that got introduced in 3.x or later. Capabilities that existed in the 2.x version of the protocol are still mandatory for clients. Clients cannot opt out of providing them. So even if a client omits the TextDocumentClientCapabilities#synchronization it is still required that the client provides text document synchronization (e.g. open, changed and close notifications).

Field Summary

Modifier and TypeField and Description
private Object
experimental

Experimental client capabilities.

private GeneralClientCapabilities
general

General client capabilities.

private NotebookDocumentClientCapabilities
notebookDocument

Capabilities specific to the notebook document support.

private TextDocumentClientCapabilities
textDocument

Text document specific client capabilities.

private WindowClientCapabilities
window

Window specific client capabilities.

private WorkspaceClientCapabilities
workspace

Workspace specific client capabilities.

Constructor Summary

AccessConstructor and Description
public
public
ClientCapabilities(final WorkspaceClientCapabilities workspace, final TextDocumentClientCapabilities textDocument, final Object experimental)

public
ClientCapabilities(final WorkspaceClientCapabilities workspace, final TextDocumentClientCapabilities textDocument, final WindowClientCapabilities window, final Object experimental)

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(final Object obj)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public Object
getExperimental()

Experimental client capabilities.

public GeneralClientCapabilities
getGeneral()

General client capabilities.

public NotebookDocumentClientCapabilities
getNotebookDocument()

Capabilities specific to the notebook document support.

public TextDocumentClientCapabilities
getTextDocument()

Text document specific client capabilities.

public WindowClientCapabilities
getWindow()

Window specific client capabilities.

public WorkspaceClientCapabilities
getWorkspace()

Workspace specific client capabilities.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public void
setExperimental(final Object experimental)

Experimental client capabilities.

public void
setGeneral(final GeneralClientCapabilities general)

General client capabilities.

public void
setNotebookDocument(final NotebookDocumentClientCapabilities notebookDocument)

Capabilities specific to the notebook document support.

public void
setTextDocument(final TextDocumentClientCapabilities textDocument)

Text document specific client capabilities.

public void
setWindow(final WindowClientCapabilities window)

Window specific client capabilities.

public void
setWorkspace(final WorkspaceClientCapabilities workspace)

Workspace specific client capabilities.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

experimentalback to summary
private Object experimental

Experimental client capabilities.

Annotations
@JsonAdapter:Factory
generalback to summary
private GeneralClientCapabilities general

General client capabilities.

Since 3.16.0

notebookDocumentback to summary
private NotebookDocumentClientCapabilities notebookDocument

Capabilities specific to the notebook document support.

Since 3.17.0

textDocumentback to summary
private TextDocumentClientCapabilities textDocument

Text document specific client capabilities.

windowback to summary
private WindowClientCapabilities window

Window specific client capabilities.

workspaceback to summary
private WorkspaceClientCapabilities workspace

Workspace specific client capabilities.

Constructor Detail

ClientCapabilitiesback to summary
public ClientCapabilities()
ClientCapabilitiesback to summary
public ClientCapabilities(final WorkspaceClientCapabilities workspace, final TextDocumentClientCapabilities textDocument, final Object experimental)
ClientCapabilitiesback to summary
public ClientCapabilities(final WorkspaceClientCapabilities workspace, final TextDocumentClientCapabilities textDocument, final WindowClientCapabilities window, final Object experimental)

Method Detail

equalsback to summary
public boolean equals(final Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Annotations
@Override
getExperimentalback to summary
public Object getExperimental()

Experimental client capabilities.

getGeneralback to summary
public GeneralClientCapabilities getGeneral()

General client capabilities.

Since 3.16.0

getNotebookDocumentback to summary
public NotebookDocumentClientCapabilities getNotebookDocument()

Capabilities specific to the notebook document support.

Since 3.17.0

getTextDocumentback to summary
public TextDocumentClientCapabilities getTextDocument()

Text document specific client capabilities.

getWindowback to summary
public WindowClientCapabilities getWindow()

Window specific client capabilities.

getWorkspaceback to summary
public WorkspaceClientCapabilities getWorkspace()

Workspace specific client capabilities.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Annotations
@Override
setExperimentalback to summary
public void setExperimental(final Object experimental)

Experimental client capabilities.

setGeneralback to summary
public void setGeneral(final GeneralClientCapabilities general)

General client capabilities.

Since 3.16.0

setNotebookDocumentback to summary
public void setNotebookDocument(final NotebookDocumentClientCapabilities notebookDocument)

Capabilities specific to the notebook document support.

Since 3.17.0

setTextDocumentback to summary
public void setTextDocument(final TextDocumentClientCapabilities textDocument)

Text document specific client capabilities.

setWindowback to summary
public void setWindow(final WindowClientCapabilities window)

Window specific client capabilities.

setWorkspaceback to summary
public void setWorkspace(final WorkspaceClientCapabilities workspace)

Workspace specific client capabilities.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override