javax.enterprise.util.TypeLiteral.getTypeParameter()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(93)

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

TypeLiteral.getTypeParameter介绍

暂无

代码示例

代码示例来源:origin: javax.enterprise/cdi-api

/**
 * @return the actual type represented by this object
 */
public final Type getType() {
  if (actualType == null) {
    Class<?> typeLiteralSubclass = getTypeLiteralSubclass(this.getClass());
    if (typeLiteralSubclass == null) {
      throw new RuntimeException(getClass() + " is not a subclass of TypeLiteral");
    }
    actualType = getTypeParameter(typeLiteralSubclass);
    if (actualType == null) {
      throw new RuntimeException(getClass() + " does not specify the type parameter T of TypeLiteral<T>");
    }
  }
  return actualType;
}

代码示例来源:origin: weld/core

/**
 * @return the actual type represented by this object
 */
public final Type getType() {
  if (actualType == null) {
    Class<?> typeLiteralSubclass = getTypeLiteralSubclass(this.getClass());
    if (typeLiteralSubclass == null) {
      throw new RuntimeException(getClass() + " is not a subclass of TypeLiteral");
    }
    actualType = getTypeParameter(typeLiteralSubclass);
    if (actualType == null) {
      throw new RuntimeException(getClass() + " does not specify the type parameter T of TypeLiteral<T>");
    }
  }
  return actualType;
}

代码示例来源:origin: org.jboss.weld.se/weld-se

/**
 * @return the actual type represented by this object
 */
public final Type getType() {
  if (actualType == null) {
    Class<?> typeLiteralSubclass = getTypeLiteralSubclass(this.getClass());
    if (typeLiteralSubclass == null) {
      throw new RuntimeException(getClass() + " is not a subclass of TypeLiteral");
    }
    actualType = getTypeParameter(typeLiteralSubclass);
    if (actualType == null) {
      throw new RuntimeException(getClass() + " does not specify the type parameter T of TypeLiteral<T>");
    }
  }
  return actualType;
}

代码示例来源:origin: javax/javaee-web-api

/**
 * @return the actual type represented by this object
 */
public final Type getType() {
  if (actualType == null) {
    Class<?> typeLiteralSubclass = getTypeLiteralSubclass(this.getClass());
    if (typeLiteralSubclass == null) {
      throw new RuntimeException(getClass() + " is not a subclass of TypeLiteral");
    }
    actualType = getTypeParameter(typeLiteralSubclass);
    if (actualType == null) {
      throw new RuntimeException(getClass() + " does not specify the type parameter T of TypeLiteral<T>");
    }
  }
  return actualType;
}

代码示例来源:origin: org.jboss.weld.se/weld-se-shaded

/**
 * @return the actual type represented by this object
 */
public final Type getType() {
  if (actualType == null) {
    Class<?> typeLiteralSubclass = getTypeLiteralSubclass(this.getClass());
    if (typeLiteralSubclass == null) {
      throw new RuntimeException(getClass() + " is not a subclass of TypeLiteral");
    }
    actualType = getTypeParameter(typeLiteralSubclass);
    if (actualType == null) {
      throw new RuntimeException(getClass() + " does not specify the type parameter T of TypeLiteral<T>");
    }
  }
  return actualType;
}

代码示例来源:origin: weld/core

/**
 * @return the actual type represented by this object
 */
public final Type getType() {
  if (actualType == null) {
    Class<?> typeLiteralSubclass = getTypeLiteralSubclass(this.getClass());
    if (typeLiteralSubclass == null) {
      throw new RuntimeException(getClass() + " is not a subclass of TypeLiteral");
    }
    actualType = getTypeParameter(typeLiteralSubclass);
    if (actualType == null) {
      throw new RuntimeException(getClass() + " does not specify the type parameter T of TypeLiteral<T>");
    }
  }
  return actualType;
}

代码示例来源:origin: org.jboss.weld.servlet/weld-servlet-shaded

/**
 * @return the actual type represented by this object
 */
public final Type getType() {
  if (actualType == null) {
    Class<?> typeLiteralSubclass = getTypeLiteralSubclass(this.getClass());
    if (typeLiteralSubclass == null) {
      throw new RuntimeException(getClass() + " is not a subclass of TypeLiteral");
    }
    actualType = getTypeParameter(typeLiteralSubclass);
    if (actualType == null) {
      throw new RuntimeException(getClass() + " does not specify the type parameter T of TypeLiteral<T>");
    }
  }
  return actualType;
}

代码示例来源:origin: jboss/jboss-javaee-specs

/**
 * @return the actual type represented by this object
 */
public final Type getType() {
  if (actualType == null) {
    Class<?> typeLiteralSubclass = getTypeLiteralSubclass(this.getClass());
    if (typeLiteralSubclass == null) {
      throw new RuntimeException(getClass() + " is not a subclass of TypeLiteral");
    }
    actualType = getTypeParameter(typeLiteralSubclass);
    if (actualType == null) {
      throw new RuntimeException(getClass() + " does not specify the type parameter T of TypeLiteral<T>");
    }
  }
  return actualType;
}

相关文章