Nicolai Parlog 1/18/2017

Reflection vs Encapsulation

Read Original

This technical article examines the historical ability of Java reflection to access any code in the JVM and how the new module system (JPMS) in Java 9 enforces strong encapsulation to prevent this. It discusses the resulting conflict and the proposed solution of 'open modules' to reconcile reflection with encapsulation, including code examples and module descriptor syntax.

Reflection vs Encapsulation

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser