Results 1 to 3 of 3
  1. #1
    udara135 is offline Member
    Join Date
    Aug 2012
    Posts
    1
    Rep Power
    0

    Question To extract the parameters (and their types) for each method

    To extract the parameters (and their types) for each
    method, and to store a list of Variable Definition objects with each method

    01.How do I recognize a parameter type ?
    The parameters will be listed
    in the following order: ( <Type> <Name> , <Type> <Name> )

    02.How should I represent each parameter?
    the name of the parameter, and
    the type of the parameter (stored as a String).

    this needTo process a text-file containing programming code (e.g., a
    Java file) and analyze its contents.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,937
    Rep Power
    20

    Default Re: To extract the parameters (and their types) for each method

    Moved from Advanced Java

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,051
    Blog Entries
    7
    Rep Power
    23

    Default Re: To extract the parameters (and their types) for each method

    Since Java version 1.6. there's a compiler syntax tree api; you can inspect each and every object from a parsed Java source 'file'. Google is your friend here.

    kind regards,

    Jos
    The only person who got everything done by Friday was Robinson Crusoe.

Similar Threads

  1. objects as parameters change in method
    By zcd in forum New To Java
    Replies: 0
    Last Post: 01-29-2012, 09:37 PM
  2. Replies: 5
    Last Post: 11-21-2010, 03:08 PM
  3. Need to dynamicaly get all parameters in a method call.
    By DavidJohns in forum Advanced Java
    Replies: 2
    Last Post: 05-21-2008, 07:15 AM
  4. Replies: 9
    Last Post: 12-18-2007, 10:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •