In this video, Nick Maiorano shows how strong encapsulation in JPMS prevents Java reflection from peering into classes, and how to enable reflection in modular applications.
- [Instructor] One design consideration…when creating an API is to make it easy to use…and difficult to misuse.…Whether intentional or not, some API users sometimes…may try to access internal classes that weren't meant to…be accessed from the outside.…Internal classes should be inaccessible.…Prior to Java 9, it wasn't easy to protect against this…because of limited language semantics.…Now, thanks to strong encapsulation provided by JPMS…API misuses can be prevented.…
JPMS can close access to a module's internal classes.…This is important to achieve a good API design.…For example, the red 30 tech company has different…implementations of the Chassis interface.…As currently designed, users of Chassis must go through…the service loader and let the run time configuration…choose the Chassis implementation.…This would be a misuse of the API…because the client is directly instantiating the SUVChassis.…
The application is hard coded…to run with this SUVChassis class.…An even worse example will be this because the client is…
In this course, instructor Nick Maiorano breaks down this complexity by explaining what modularity is all about, how Java has adopted modularity and how to start using to build better quality applications.
- What is modularity?
- The five pillars of modularity
- Modularity in the real world
- JPMS concepts and syntax
- Designing and implementing a modular structure
- Compiling, packaging and running modular applications
- Using the dependency checking tools
- Creating custom runtime images
- Managing backward compatibility with classes and modules
- Explicit, unnamed, and automatic modules
- JPMS tips and recommendations
Skill Level Intermediate
Java Essential Training: Syntax and Structurewith David Gassner3h 9m Intermediate
1. Introduction to Modularity
2. Java Modularity through the Ages
3. Building Modular Applications with Java
4. Tools and Strategies
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.