Code example for WildcardType

Methods: getLowerBounds

0
      GenericArrayType g = (GenericArrayType) type;
      return new GenericArrayTypeImpl(g.getGenericComponentType());
 
    } else if (type instanceof WildcardType) {
      WildcardType w = (WildcardType) type;
      return new WildcardTypeImpl(w.getUpperBounds(), w.getLowerBounds());
 
    } else { 
      // type is either serializable as-is or unsupported 
      return type;
    } 
  } 
 
  public static Class<?> getRawType(Type type) {
    if (type instanceof Class<?>) {
      // type is a normal class. 
      return (Class<?>) type;
 
    } else if (type instanceof ParameterizedType) {
      ParameterizedType parameterizedType = (ParameterizedType) type;
Contextual code suggestions in your IDE  Get Codota for Java