Is it possible in java to see how many methods i got or check if a method called 'blabla' is in the class.
what i want to do is that i neeed to provide a set of classes for a person who should add a class to classed i gave him and his class should include all functions or methods that i asked him to do so it will be like a marker system to test whther the person include all what i asked him for it so if possible i need to check if there is constructor or not, check the number of methods or check mame of methods and if possible any details for these methods like return vlaue and number of parameters.
i do not know if there is a API in JAVA provides these functionality but i wish some one can help me to acheive that.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Joined: Oct 07, 2005
Originally posted by fadil alnassar: thanks for reply !!
i am beginner in java can you give me an example of that.
thanks for your help !!
Reflection is an advanced concept, so if you can hold your breath, you can get to it when it's due. For now, if this is to help you understand more about methods in a class and such, you create javadocs for your classes and refer to them. [ January 03, 2006: Message edited by: Stuart Ash ]
ASCII silly question, Get a silly ANSI.
Joined: Sep 16, 2005
Originally posted by fadil alnassar:
his class should include all functions or methods that i asked him to do
Why do you need to know this? It sounds to me that you are either: 1) writing some sort of exercise checking program 2) Writing an abstract base class with abstract methods
In the second case, a non-abstract class will have no abstract methods, so that will force their implementation. But what are you really doing?