com.google.common.reflect.TypeToken.isWrapper()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(4.5k)|赞(0)|评价(0)|浏览(117)

本文整理了Java中com.google.common.reflect.TypeToken.isWrapper()方法的一些代码示例,展示了TypeToken.isWrapper()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TypeToken.isWrapper()方法的具体详情如下:
包路径:com.google.common.reflect.TypeToken
类名称:TypeToken
方法名:isWrapper

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;
}

相关文章

微信公众号

最新文章

更多

TypeToken类方法