类org.eclipse.lsp4j.jsonrpc.json.adapters.EnumTypeAdapter源码实例Demo

下面列出了怎么用org.eclipse.lsp4j.jsonrpc.json.adapters.EnumTypeAdapter的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: lsp4j   文件: MessageJsonHandler.java
/**
 * Create a {@link GsonBuilder} with default settings for parsing JSON-RPC messages.
 */
public GsonBuilder getDefaultGsonBuilder() {
	return new GsonBuilder()
		.registerTypeAdapterFactory(new CollectionTypeAdapter.Factory())
		.registerTypeAdapterFactory(new ThrowableTypeAdapter.Factory())
		.registerTypeAdapterFactory(new EitherTypeAdapter.Factory())
		.registerTypeAdapterFactory(new TupleTypeAdapters.TwoTypeAdapterFactory())
		.registerTypeAdapterFactory(new EnumTypeAdapter.Factory())
		.registerTypeAdapterFactory(new MessageTypeAdapter.Factory(this));
}
 
private static Gson createGson() {
	return new GsonBuilder().registerTypeAdapterFactory(new EnumTypeAdapter.Factory()).create();
}
 
 类所在包
 类方法
 同包方法