Class ServiceEndpoints
- java.lang.Object
-
- org.eclipse.lsp4j.jsonrpc.services.ServiceEndpoints
-
public final class ServiceEndpoints extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Map<java.lang.String,JsonRpcMethod>getSupportedMethods(java.lang.Class<?> type)Finds all Json RPC methods on a given class.static EndpointtoEndpoint(java.lang.Object serviceObject)Wraps a given object with service annotations behind anEndpointinterface.static EndpointtoEndpoint(java.util.Collection<java.lang.Object> serviceObjects)Wraps a collection of objects with service annotations behind anEndpointinterface.static <T> TtoServiceObject(Endpoint endpoint, java.lang.Class<T> interface_)Wraps a givenEndpointin the given service interface.static java.lang.ObjecttoServiceObject(Endpoint endpoint, java.util.Collection<java.lang.Class<?>> interfaces, java.lang.ClassLoader classLoader)Wraps a givenEndpointin the given service interfaces.
-
-
-
Method Detail
-
toServiceObject
public static <T> T toServiceObject(Endpoint endpoint, java.lang.Class<T> interface_)
Wraps a givenEndpointin the given service interface.- Returns:
- the wrapped service object
-
toServiceObject
public static java.lang.Object toServiceObject(Endpoint endpoint, java.util.Collection<java.lang.Class<?>> interfaces, java.lang.ClassLoader classLoader)
Wraps a givenEndpointin the given service interfaces.- Returns:
- the wrapped service object
-
toEndpoint
public static Endpoint toEndpoint(java.lang.Object serviceObject)
Wraps a given object with service annotations behind anEndpointinterface.- Returns:
- the wrapped service endpoint
-
toEndpoint
public static Endpoint toEndpoint(java.util.Collection<java.lang.Object> serviceObjects)
Wraps a collection of objects with service annotations behind anEndpointinterface.- Returns:
- the wrapped service endpoint
-
getSupportedMethods
public static java.util.Map<java.lang.String,JsonRpcMethod> getSupportedMethods(java.lang.Class<?> type)
Finds all Json RPC methods on a given class.- Returns:
- the supported JsonRpcMethods
-
-