APT - getting declared variables and parameter names

Hi,
I would like start using APT, but if I am not mistaken, there are severe limitations what you can do with the tool. How is it possible to get the declared name of variables or parameters and methods from the apt tool?
@someAnnotation
public void someMethod(A para1, B para2) {...}I would need to get the name of the method and the name of the parameters to generate new sourcecode (AspectJ -Source), how is this possible? Without the names I cannot call the method from another place right?
Where can I find the planned features for APT? It is a pitty that the tool is in a way very powerful and in another so limitated because you cannot extract the sourcecode or names.
Regards,
Klaas

What about getSimpleName? This method is defined on
declarations.You know, ParameterDeclaration is a Declaration ...
All of the declarations returned by
the mirror API are for elements that exist inside
classes, not inside methods.Huh? Parameters are an integral part of methods and methods are elements that exist inside classes (or types in general). What's your point?
The apt API does not expose any information about the
interiors of methods or constructors.Oh boy. For a ParameterDeclaration getSimpleName() will return the name of the parameter, e.g. suppose you are "scanning" a standard main method:public static void main(String[] args) {...}and you already have the ParameterDeclaration instance representing the sole parameter of the method, then getSimpleName() will return "args".
BTW - this has nothing to do with exposing interiors. Just try it.

Similar Messages

  • Location of variable and function names in SWF bytecode?

    Ok, so I'm looking at the specification PDF for v10 of a SWF file.
    Here is a link to it: http://www.adobe.com/devnet/swf/pdf/swf_file_format_spec_v10.pdf
    I can't find anything in there about where or how a SWF stores variable and function names in the bytecode, though SWF decompilers can find them in any SWF file. So they must be in there somewhere.
    Can any one help me on this one?

    Hi check the varaibles by giving ur tech.name of report input parameter to the below program,
    RSRQ_QUERYDEFINITION
    it will all the query details. So you can find ur varaibles where it is used exactly.
    bhaskar

  • How to parser a HTML page to get its variable and values?

    Hi, everyone, here is my situation:
    I need to parser a HTML page to get the variables and their associated values between <form>...</form> tag. for example, if you have a piece of HTML as below
    <form>
    <input type = "hidden" name = "para1" value = "value1">
    <select name = "para2">
    <option>value2</option>
    </form>
    the actual page is much complex than this. I want retrive pare1 = value1 and para2 = value2, I tried Jtidy but it doesn't reconginze select, could you recomend some good package this purpose? better with sample code.
    Thanks a lot
    Kevin

    See for example Request taglib from Coldtags suite:
    http://www.servletsuite.com/jsp.htm

  • Get a variable by a name string? how

    Hi,
    I am currently developing an interpreter which is of cause a class.
    This interpreter will be initiated with several pieces of strings mixed
    with unknown number of variables with some order which is unknown previously.
    So the better way is just passing one string which contains the variable
    name strings and return a collection of variables specified by the variable
    ames contained in this string.
    Problem is:
    How can I get a variable from a name string, instead of a name
         variable?
         Java Reflection can only return fields, but not variables
         Any idea?
         And how JNI could do perphaps?
    Any help appreciated
    Thanks in adv
    dunson

    As far as i know, the names of local variables, that are only used inside methods, are not preserved in the bytecode. That means you can't grab from them by name, whatever you do. You are able to grab members though, through reflection, but it's not very efficient. I wouldn't recommend it.
    As suggested, I think you need to make special provision for this with a structure like a Hashtable. It's better programming practice, it's more efficient, and you'll find it much easier to program.
    Something like this:
    import java.util.*;
    class Doodad {
      Map stuff = new HashMap();
      Object getValue(String code) {
        return stuff.get(code);
      void setValue(String code, Object value) {
        stuff.put(code, value);

  • I lost all of my artist names and album names for my iTunes library. They are all now on one album. How can I get the album and artist names back?

    I lost all of my artist names and album names for my iTunes library. They are all now on one album. How can I get the album and artist names back?

    I have a script called ExportImport for this task, but it only runs in Windows.
    In principle something similar should be possible in AppleScript, but I don't currently have access to a Mac to write it myself.
    tt2

  • Get a variable by a name string?

    Hi,
    I am currently developing an interpreter.
    This interpreter will be initiated with several pieces of strings mixed
    with unknown number of variables with some order which is unknown previously.
    So the better way is just passing one string which contains the variable
    name strings and return a collection of variables specified by the variable
    names contained in this string.
    Problem is:
    How can I get a local variable from a name string in a method, instead of
    by a name variable?
    Java Reflection can only return fields, but not variables
    Any idea?
    And does JNI could do it?
    Any help appreciated
    Thanks in adv
    dunson

    Interpreter for what?

  • Getting sequence filename and sequence name in process model error handler

    We are using the sequential process model and would like to log sequence step error information to a file.  We have an Error Handler callback in SequentialModel.seq and that is where we will write to the error file.  In the Error Handler callback, I can get the error container info for the step where the error occurs and the name of the that step thru the Error Handler Step parameter.  I would also like to record the sequence file and the sequence where the error occurred, but I have not been able to find those in the sequence context.  I know they are available because the TestStand RunTime Error dialog box displays them.  How can I access the name of the sequence file and the name of the sequence where the error occurred?
    Thanks,
    Hans

    Hey hans,
    Use the API.  Since you already have the Step object reference coming in as a parameter you can just use a few ActiveX steps to get the Sequence File and Sequence from which the error was thrown.
    Step.Sequence
    Sequence.Name (gets the name of the sequence)
    Sequence.SequenceFile
    SequenceFile.Path (gets the path of the sequence file)
    So basically just 4 activex steps.  I hope this helps.
    Regards,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • Variable and column name

    Hi all,
    In an interface, I've got a column which has the same name as a variable.
    When I execute it in ODI 10g all is fine.
    With ODI 11g, it replace the column name by the variable one. If the variable has no value, I've got an SQLException.
    I believe it comes from the colon.
    In the execution code, I have
    INSERT ... VALUES PROJECT.NAME instead of NAME.
    I assume that ODI interprets the NAME with the variable name instead of the column name.
    Has anyone experienced it ?
    Thanks.

    Hi,
    I just tried to reproduce your issue, I didn't experience the case where ODI takes variable name instead of column name. ODI should be able to differentiate between column name and variable name with '#' Symbol prefixed to it. Any name prefixed with #, ODI thinks thats a variable and, it need to be declared in a package.
    In your case, looks like issue is not with the NAME, its with variable having no value. May be that ODI 10g has a default value. However, if a variable has no value, its definitely going to fail the process.
    Regards,
    K

  • How to get truck no and transporter name from header.text(vf03) to webi rep

    Hi
    making a stock received details bill wise with webi (bo 3.1)
    so require a truck no and transporter name along with consignor detail and bill wise detail.
    picking data from vbrk and vbrp tables.
    pls assist in this
    Thanks and Regards
    Ritu Raj
    BI/BO Consultant

    Thanks M
    Yes It is Sales and Distribution process and we are using ODBC Connectivity through database client for the connection parameter in the Universe designed to the R/3 ECC.
    So we dont have
    a) DS
    b) BW
    c) Data Connector
    So Universe is basically on the relational Data
    base where by linking VBRK,VBRP and various Master tables.
    (OLTP level universe)
    So the quesion remain as it is bcos we cant access functional module READ_TEXT in the R/3
    Pls suggest for the following Alternatives
    a)Using Crystal Reports
    b)Use BW (Currently it is not there,but soon be Implemented)
    What do you think?
    Bcos we dont want to refresh z table which could be developed from given functional module before running our report.
    Regards
    Ritu Raj

  • Declaring namespace and Parameter in PDF template

    Hi,
    I am using PDF template for generating reports. is there any limitation on declaring these objects in PDF template? when I try doing that the report gives form proccesor error.
    Thank in advance

    Hi,
    If you are working in XML Publisher reports.
    Before calling the report, you have to set the propery class of parameter.
    <parameters>
    <parameter name="p_cpu_make" type="character" defaultValue="AMD"/>
    </parameters>
    Properties prop = new Properties();
    prop.put("xslt.p_cpu_make", "INTEL");
    Thanks.

  • Get jms queue and topic names from JNDI

    Hello all,
    How do I get all possible queue and Topic names from JNDI (in my app) so I can store them in a HashMap?
    Thanks

    I'm guessing you know where in the JNDI you put your queue and topic names. Then you can do:
    context.listBindings("myJNDIContext");
    and go through the NamingEnumeration that this returns.

  • How to get the Calendar and Holiday Name from ALBPM engine

    Hi,
    I want to fetch the Calendar Name and Holiday Name that are defined in ALBPM studio/engine.
    How to fetch these through fuego ?
    Bibhu

    Hi,
    Thanks for your help.
    I have executed the code but it did not give me the calendar name as fetchAll() gives me an array.
    I could not find any such method which will give me the Calendar Name.
    The above code give the following result:
    Total Calendar Count: 2 (OK, since I have two calendar in my workspace)
    Calendar Name : fuego.components.CalendarRule@677770 (Want the Calendar Name not this format)
    Calendar Name: fuego.components.CalendarRule@d293b7
    Bibhu

  • High number of "The connection has timed out" errors. Where do I set the time out period (variable and file name) - windows 7

    I usually use a wireless network at home and have very few time out problems with Firefox.
    I am travelling and using Optus Wireless broadband where the average ping to a site is 700+ms .
    I suspect that this is the cause of the high number of timeouts I am experiencing.
    Optus say there are no problems so I think I will have to set the timeout to a longer period.
    Please advise what variable name/s (and in which file) the timeout is set for LOADING PAGES.
    Thanks in anticipation.
    Greg Atkinson.
    By the way the same is happening in IE8
    and on many sites other than the Yahoo one below.
    ================Full Error Page ==============
    URL is http://au.mg4.mail.yahoo.com/dc/launch?.gx=1&.rand=81jkv757qfdqt
    =========================================
    The connection has timed out
    The server at au.mg4.mail.yahoo.com is taking too long to respond.
    * The site could be temporarily unavailable or too busy. Try again in a few moments.
    * If you are unable to load any pages, check your computer's network connection.
    * If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.

    Having the same problem 4 out of 5 times I try to navigate to a new site I get the error "connection has timed out".
    My I phone works fine on the same wireless connection so it must be something to do with the computer. The problem occurs on IE, firefox, and google chrome.
    I too would like to know how to how to either fix this problem or failing that to extend the length of time before the connection times out (which is currently only about 5 seconds).
    Please help!
    Thanks in advance

  • ST22 , Need to  get the Transaction and Pgm name using a FUNCTION MODULE ?

    Hi All,
    I need to create a Report for monitoring Dumps which is seen in ST22 every day.
    The function module RS_ST22_GET_DUMPS gives the dump information . But i need to fetch the Program name and the transaction where the dump has happened for my report.(Like when we double click the alv output in ST22 and the next list gives us the complete information , Transaction , Main program name ...etc)
    Kindly suggest me and help me on this .
    Regards,
    Richard A

    Hi
    Funcion module RS_ST22_GET_DUMPS will return the program names where the dump has taken place.
    Pass this program name to function module RPY_TRANSACTION_READ to get the trascation code of the program.
    Regards
    Srilaxmi

  • How to get the constraintlist and column name in a table?

    Hi,
    can anyone please tell me how to get the constraint type ,and it's imposed on columns names in a table.
    Thanks,
    Deekay

    Deekay wrote:
    can anyone please tell me how to get the constraint type ,and it's imposed on columns names in a table.To get constraint type:
    select constraint_type from user_constraints where constraint_name = 'YOUR CONSTRAINT NAME';To get constraint columns:
    SELECT column_name from user_cons_columns where constraint_name = 'YOUR CONSTRAINT NAME';SY.

Maybe you are looking for

  • MQ - Problems with receiver adapter

    Hello experts, has anybody experience with this kind of MQ error: Message-Verarbeitung fehlgeschlagen. Grund: com.sap.aii.af.ra.ms.api.RecoverableException: Connector for ConnectionProfile of channel: jms_rcv_aleg on node: 517708350 having object id:

  • Simple Questions regarding temperatures for MacBook Pro

    Hey, I just bought a brand new Macbook Pro Mid-2012 2.9 Ghz, i7 Processor, 8 GB of ram, and 750 HDD. It's my first Mac I've bought I'm switching over from an overheating windows laptop. Now my Mac gets extremely hot under light usage. First thing I d

  • Problem installing because of "iTunesMiniPlayerLocalized.dll"

    I can't install itunes because I get the error, "Error writing to file. Verify that you have access to ...... iTunesMiniPlayerLocalized.dll". I have tried to delete this file myself and it can't, because it says it's corrupt. I have run the "check ha

  • Help with SAP notes for SD process     please

    i m new to Sd, but for a urgent work, i require help, can i have SAP NOTES relevant to SD logicistic process like, sales order, outbound delivery, shipment, pls pls pls help

  • Help with dynamic sql across multiple tables

    I have more than one similar table that stores data from different dynamically generated relations: Following are the scripts to create and populate tables CREATE TABLE RELATION_1(     SRC            NUMBER(38, 0)               NOT NULL,     TRG