0
我用下面的代碼如何檢查對象是否由字節好友創建?
Source source = new ByteBuddy()
.subclass(Source.class)
.method(named("hello"))
.intercept(MethodDelegation.to(Target.class))
.defineMethod("myNewMethod", void.class)
.intercept(MethodDelegation.to(Target.class))
.make()
.load(Source.class.getClassLoader())
.getLoaded()
.newInstance();
我怎麼能告訴我分析來源對象如果是由ByteBuddy創建創建源對象的實例?它是否實現了任何標記接口或類似的東西?生成對象的實際類是類似於來源$ ByteBuddy $ HFuwCkIQ謝謝!