sirp Posted February 1, 2011 Posted February 1, 2011 Reflection - The Java Reflection APIWith the introduction of Java Beans was also the birth of Reflection (formerly " Introspection ")forced initiated because objects were previously found only in static structures. This in turn meantthat the classes had already at compile be available. Because of this fact but the genericapplication form request can not be extended to the interface of a plugin, corresponded, it wasdecided to introduce a new technique? Introspection (later Reflection ).The term Reflection here means that programs which are a generic design to be able put in for herclasses (unknown such as by direct user input) to create instances of objects. The Reflection APIincludes the following features:Determine the class of an objectDetails of Klassenmodifikatoren, members, methods, constructors, and superclasses get.Get out what constants and method declarations belong to an interface.Creating an instance of a class known until runtime.Reading and setting of values of a member even if the member is known by name at run time.Calling methods of an unknown object at runtime.Generation of arrays, the size and type until run time are not known and modifications to theindividual array components.Contents1Investigation of classes1.1Querying the Class object2.1Query the class name1.3Finding of Klassenmodifikatoren4.1superclasses identify1.5Identification of implemented interfaces1.6classes for their members (Fields) analyze1.7constructors of a class determine1.8The methods of a class representing2objects manipulated2.1 Position theobject generation2.1.1Creating objects using parameterless constructors2.1.2Creating objects using parameterized constructors2.2 Valueof members read2.3Values of members and share2.4Calling methods3 UsingArrays3.1 Identificationof arrays3.2 To identifythe array type3.3arrays produce read, and fill4Summary of all the reflection classesInvestigationREFLECTIONreflect
C0M3ND4D0R Posted February 1, 2011 Posted February 1, 2011 Material from the first line thanks for sharing
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now