Java: Accessing Constructors, Methods, & Fields Using Reflection

Java 15    |    Intermediate
  • 13 Videos | 1h 43m 42s
  • Includes Assessment
  • Earns a Badge
Reflective access allows a whole range of operations on objects that may not be permitted when you construct and use objects in the regular manner. This is extremely useful while building frameworks that may need access to the internals of your object. Use this course to extract information and metadata about the constructors in a class and use them, accessed via reflection, to instantiate objects. Access and modify fields or the member variables in an object. Access and invoke the methods defined on a class. Invoke static methods on the class itself and instance methods on specific objects of a class. When you're done, you'll have the ability to use reflection to access and work with all class members, whether they are fields, constructors, or methods.

WHAT YOU WILL LEARN

  • discover the key concepts covered in this course
    access the constructors in a class using reflection
    create objects of a class with handles to constructors
    access member variables of a class and its metadata
    access and update values of fields
    access and update protected and private fields
    access public, private, and protected methods
  • view method parameters, annotations, return types, and exceptions
    view annotations on methods and recall the use of the retention policy
    observe how not all annotations are available at runtime for reflective access
    use method heuristics to identify getters and setters in a class
    invoke and call methods using handles
    summarize the key concepts covered in this course

IN THIS COURSE

  • Playable
    1. 
    Course Overview
    2m 57s
    UP NEXT
  • Playable
    2. 
    Accessing Constructors Using Reflection
    9m 33s
  • Locked
    3. 
    Creating Objects Using Constructor Handles
    8m 54s
  • Locked
    4. 
    Accessing Field Metadata
    10m 14s
  • Locked
    5. 
    Getting and Setting Field Values
    8m 52s
  • Locked
    6. 
    Accessing and Updating Private and Protected Fields
    9m 13s
  • Locked
    7. 
    Accessing Public, Private, and Protected Methods
    8m 36s
  • Locked
    8. 
    Viewing Method Parameters, Annotations, and More
    7m 14s
  • Locked
    9. 
    Accessing Annotations on Methods
    7m 8s
  • Locked
    10. 
    Recognizing Annotation Runtime Policy Implications
    8m 12s
  • Locked
    11. 
    Identifying Getters and Setters Using Heuristics
    10m 14s
  • Locked
    12. 
    Invoking Functions Using Reflection
    4m 32s
  • Locked
    13. 
    Course Summary
    2m 33s

EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE

Skillsoft is providing you the opportunity to earn a digital badge upon successful completion of this course, which can be shared on any social network or business platform

Digital badges are yours to keep, forever.