Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Get all method of one Object in java

  1. #1
    Junior Member didingnuriska's Avatar
    Join Date
    Apr 2013
    Posts
    21
    My Mood
    Cool
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Get all method of one Object in java

    hello there.
    Does anyone know how to get all the method of one Object,
    ie:
    public void extract(Object A){

    // we need to know what class that instantiated object A and all the method (getter/setter,etc) dynamically
    }
    thanks in advance..


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Get all method of one Object in java

    Do you know about reflection? The classes in the java.lang.reflect package can be used to get information about an object.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member didingnuriska's Avatar
    Join Date
    Apr 2013
    Posts
    21
    My Mood
    Cool
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Get all method of one Object in java

    Yes, I just know about that in a moment.
    thanks Norm.

Similar Threads

  1. create an equals() method that overrides the object equals() method
    By slinky29 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: March 3rd, 2013, 11:11 PM
  2. Call a method in all instances of an object
    By MaximusPrime in forum Java Theory & Questions
    Replies: 2
    Last Post: March 14th, 2012, 10:39 PM
  3. Basic Question Regarding Object/Method
    By aandcmedia in forum Object Oriented Programming
    Replies: 3
    Last Post: February 26th, 2012, 02:42 PM
  4. Replies: 1
    Last Post: February 14th, 2012, 07:42 AM
  5. calling a method from other object: thred
    By Sudheera in forum What's Wrong With My Code?
    Replies: 2
    Last Post: July 18th, 2011, 05:19 AM