![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
反射
文章平均质量分 50
codelmh
这个作者很懒,什么都没留下…
展开
-
反射、基础
一、获取字节码的四种方式1)通过对象的getClass 方法 // 1. 通过getClass 方法获取 AliPay aliPay = new AliPay(); Class<? extends AliPay> c1 = aliPay.getClass();2)通过对象内置的Class方法 // 2. 通过内置的class方法 Class<AliPay> c2 = AliPay.cla.原创 2021-11-28 19:21:26 · 143 阅读 · 0 评论 -
反射 简单实例
一、案例:支付功能---> 微信、支付宝、云闪付等等提供一个支付接口package com.lmh;/**提供支付接口 * @author codelmh * @data 2021/11/24 */public interface Payment { void payOnline();}微信支付实现 支付接口package com.lmh;/** 微信实现支付接口 * @author codelmh * @data 2021/11/24.原创 2021-11-24 14:03:58 · 612 阅读 · 0 评论