KnpCode
Java, Spring, BigData, Web development tutorials with examples
 
Skip to content
  • Ubuntu
  • Big Data
    • Hadoop Tutorials
  • Java
    • Core Java Tutorials – Beginner
    • Core Java Tutorials – Advanced
    • Java Programs
  • spring
    • Spring Framework
Home Posts tagged "Java reflection"

Tag: Java reflection

Java Reflection – Arrays

UshaK September 11, 2020 September 11, 2020Java Java, Java reflection 0

Since array in Java is also a class so many of the methods in java.lang.Class can be used with the array too. Apart from that in Java Reflection API there is a class java.lang.reflect.Array that has methods for creating new arrays, getting and setting array elements at run time. Table…

Continue reading

Java Reflection – Class Constructors

UshaK September 8, 2020 September 14, 2020Java Java, Java reflection 0

Using Java Reflection you can get information about the constructors of the class and create a new class instance too. In Java Reflection API there is a class java.lang.reflect.Constructor that has methods for finding constructors, retrieving constructor modifiers and creating new instance. Table of contents Getting Constructor instance Getting information…

Continue reading

Java Reflection – Class Methods

UshaK September 7, 2020 September 14, 2020Java Java, Java reflection 0

Using Java Reflection API you can get information about the methods of the class and even invoke methods at run time. In Java Reflection API there is a class java.lang.reflect.Method that has methods for accessing field’s type, field’s modifier and setting and getting values of a field. Table of contents…

Continue reading

Java Reflection – Class Fields

UshaK September 4, 2020 September 11, 2020Java Java, Java reflection 0

Using Java Reflection you can get information about the class fields and get and set field values at run time. In Java Reflection API there is a class java.lang.reflect.Field that has methods for accessing field’s type, field’s modifier and setting and getting values of a field. Table of contents Getting…

Continue reading

Invoke Getters and Setters Using Java Reflection

UshaK August 31, 2020 September 11, 2020Java Java, Java reflection 0

In this post we’ll see how to invoke getters and setters using reflection in Java. For calling get() and set() methods of a class there are two ways in Java. 1. Using PropertyDescriptor class. 2. Search for get and set methods of the class and call it. Using PropertyDescriptor class…

Continue reading

Privacy Policy | Disclaimer
Powered by Nirvana & WordPress.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkPrivacy Policy