I have to add implements Serializable
dynamically in an object(different classes as Object
) to as Spring requires some functionality. I found workarounds but it does not fit because the adapter pattern is not compatible with with "dynamically" term. I found Proxy.newProxyInstance()
but it creates only a new instance of interface or class and doesn't make a class implement an interface. And I didn't find any methods that I might use in getClass()
Do you know how to do this?
Aucun commentaire:
Enregistrer un commentaire