14.3. Reflection


When working with Java, you can use the reflection method to inspect and modify objects within the runtime. It can be added to a piece of code to assist the user in finding terms within the script, adding and modifying parts of it, and invoking applications. It can be used to call services and applications during runtime. It is useful in instances where you need to find the name of a field that you cannot remember or need to modify something efficiently.

Note

Using the reflection method can result in slower loading times and it is sometimes better to simply perform these tasks manually.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.