Skip to content

joker-pper/java-type-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

java-type-tool

Java support Maven Central Last SNAPSHOT Upload coverage reports to Codecov codecov License

轻量级java type工具类库.

引入方式

<dependencies>
    <dependency>
        <groupId>io.github.joker-pper</groupId>
        <artifactId>java-type-tool</artifactId>
        <version>TAG</version>
    </dependency>
</dependencies>       

使用说明


ParameterizedTypeReference 用于获取Type,适用于手动指定的场景。(copied from spring-core ParameterizedTypeReference)

示例(获取List<String>类型): 
new ParameterizedTypeReference<List<String>>(){}.getType();


JavaTypeBuildUtils 用于获取Type,适用于动态构造的场景。

示例(获取List<String>类型): 
JavaTypeBuildUtils.getParameterizedTypeList(String.class);

About

轻量级java type工具类库.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages