Code example for WildcardType

Methods: getUpperBounds

0
        public Class onVariable(TypeVariable v,Void _) { 
            return visit(v.getBounds()[0],null); 
        } 
 
        public Class onWildcard(WildcardType w,Void _) { 
            return visit(w.getUpperBounds()[0],null); 
        } 
    }; 
 
    /** 
     * Returns the runtime representation of the given type. 
     * 
     * This corresponds to the notion of the erasure in JSR-14. 
     */ 
    public static <T> Class<T> erasure(Type t) {
        return eraser.visit(t,null);
    } 
 
    private static final TypeVisitor<Type,Class> baseClassFinder = new TypeVisitor<Type,Class>() {
        public Type onClass(Class c, Class sup) { 
            // t is a raw type