本文整理了Java中com.google.common.reflect.TypeToken.isWrapper()
方法的一些代码示例,展示了TypeToken.isWrapper()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TypeToken.isWrapper()
方法的具体详情如下:
包路径:com.google.common.reflect.TypeToken
类名称:TypeToken
方法名:isWrapper
暂无
代码示例来源:origin: google/guava
/**
* Returns the corresponding primitive type if this is a wrapper type; otherwise returns {@code
* this} itself. Idempotent.
*
* @since 15.0
*/
public final TypeToken<T> unwrap() {
if (isWrapper()) {
@SuppressWarnings("unchecked") // this is a wrapper class
Class<T> type = (Class<T>) runtimeType;
return of(Primitives.unwrap(type));
}
return this;
}
代码示例来源:origin: google/j2objc
/**
* Returns the corresponding primitive type if this is a wrapper type; otherwise returns {@code
* this} itself. Idempotent.
*
* @since 15.0
*/
public final TypeToken<T> unwrap() {
if (isWrapper()) {
@SuppressWarnings("unchecked") // this is a wrapper class
Class<T> type = (Class<T>) runtimeType;
return of(Primitives.unwrap(type));
}
return this;
}
代码示例来源:origin: wildfly/wildfly
/**
* Returns the corresponding primitive type if this is a wrapper type; otherwise returns {@code
* this} itself. Idempotent.
*
* @since 15.0
*/
public final TypeToken<T> unwrap() {
if (isWrapper()) {
@SuppressWarnings("unchecked") // this is a wrapper class
Class<T> type = (Class<T>) runtimeType;
return of(Primitives.unwrap(type));
}
return this;
}
代码示例来源:origin: Nextdoor/bender
/**
* Returns the corresponding primitive type if this is a wrapper type; otherwise returns
* {@code this} itself. Idempotent.
*
* @since 15.0
*/
public final TypeToken<T> unwrap() {
if (isWrapper()) {
@SuppressWarnings("unchecked") // this is a wrapper class
Class<T> type = (Class<T>) runtimeType;
return TypeToken.of(Primitives.unwrap(type));
}
return this;
}
代码示例来源:origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger
/**
* Returns the corresponding primitive type if this is a wrapper type; otherwise returns {@code
* this} itself. Idempotent.
*
* @since 15.0
*/
public final TypeToken<T> unwrap() {
if (isWrapper()) {
@SuppressWarnings("unchecked") // this is a wrapper class
Class<T> type = (Class<T>) runtimeType;
return of(Primitives.unwrap(type));
}
return this;
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
/**
* Returns the corresponding primitive type if this is a wrapper type; otherwise returns {@code
* this} itself. Idempotent.
*
* @since 15.0
*/
public final TypeToken<T> unwrap() {
if (isWrapper()) {
@SuppressWarnings("unchecked") // this is a wrapper class
Class<T> type = (Class<T>) runtimeType;
return of(Primitives.unwrap(type));
}
return this;
}
代码示例来源:origin: com.google.guava/guava-jdk5
/**
* Returns the corresponding primitive type if this is a wrapper type; otherwise returns
* {@code this} itself. Idempotent.
*
* @since 15.0
*/
public final TypeToken<T> unwrap() {
if (isWrapper()) {
@SuppressWarnings("unchecked") // this is a wrapper class
Class<T> type = (Class<T>) runtimeType;
return TypeToken.of(Primitives.unwrap(type));
}
return this;
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/com.google.guava
/**
* Returns the corresponding primitive type if this is a wrapper type; otherwise returns
* {@code this} itself. Idempotent.
*
* @since 15.0
*/
public final TypeToken<T> unwrap() {
if (isWrapper()) {
@SuppressWarnings("unchecked") // this is a wrapper class
Class<T> type = (Class<T>) runtimeType;
return TypeToken.of(Primitives.unwrap(type));
}
return this;
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
/**
* Returns the corresponding primitive type if this is a wrapper type; otherwise returns
* {@code this} itself. Idempotent.
*
* @since 15.0
*/
public final TypeToken<T> unwrap() {
if (isWrapper()) {
@SuppressWarnings("unchecked") // this is a wrapper class
Class<T> type = (Class<T>) runtimeType;
return TypeToken.of(Primitives.unwrap(type));
}
return this;
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
/**
* Returns the corresponding primitive type if this is a wrapper type; otherwise returns
* {@code this} itself. Idempotent.
*
* @since 15.0
*/
public final TypeToken<T> unwrap() {
if (isWrapper()) {
@SuppressWarnings("unchecked") // this is a wrapper class
Class<T> type = (Class<T>) runtimeType;
return TypeToken.of(Primitives.unwrap(type));
}
return this;
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics
/**
* Returns the corresponding primitive type if this is a wrapper type; otherwise returns
* {@code this} itself. Idempotent.
*
* @since 15.0
*/
public final TypeToken<T> unwrap() {
if (isWrapper()) {
@SuppressWarnings("unchecked") // this is a wrapper class
Class<T> type = (Class<T>) runtimeType;
return TypeToken.of(Primitives.unwrap(type));
}
return this;
}
内容来源于网络,如有侵权,请联系作者删除!