IT Professional Curricula Software Development Solution Area Java 2 Programming Reflection for Runtime Inspection
Reflection is a popular programming technique that accesses and modifies class and object information at runtime. Reflection is available in many programming languages, but Java has an especially powerful set of reflection APIs that reflect - no pun intended - the emphasis that Java lays on type safety.
Learn how to access a Java class object. Use reflection APIs to view class fields, constructors, and methods. Create objects for various built-in classes and use reflection to view the class of an object.
Investigate the significance of the fully qualified name of a class and how you can use the .forName() method from the built-in class java.lang.Class. Use this method to obtain variables of primitive types and arrays of differing dimensionality. Then use reflection to access modifiers applied to member fields.
Upon completion, you'll be able to use reflection in your Java operations with confidence.
Learn how to access a Java class object. Use reflection APIs to view class fields, constructors, and methods. Create objects for various built-in classes and use reflection to view the class of an object.
Investigate the significance of the fully qualified name of a class and how you can use the .forName() method from the built-in class java.lang.Class. Use this method to obtain variables of primitive types and arrays of differing dimensionality. Then use reflection to access modifiers applied to member fields.
Upon completion, you'll be able to use reflection in your Java operations with confidence.
Objectives |
---|
Java: Getting Started with Reflection
|