This must be so simple...

I have a static method in a class. It needs to be able to get the name of its own class. How can it do this? One way would be to create an instance of its own class then call xxx.getClass().getName() but that would call the constructor as a side effect and I don't want to do that. I'm sure this is easy - in fact I'm fairly sure I've done this before - but right now I just can't see it.

use the class field, like java.lang.String.class, and so in your case my.package.toto.class

Similar Messages

  • Changing Default Template ... this must be simple ??

    Hi
    This must be a simple task ... make a setting somewhere in BW such that the default template is no longer 0Analysis_Pattern, but rather ZD_TML_TML_01 (my custom template).
    If I look in the SPRO settings, there is even a section called Set Standard Web Templates. If I open that section, then I can specify templates for Broadcasting, Query Precalculation, Report Precalculation, Enterprise Reporting and Ad Hoc Analysis. I have put my template in all of the above, just to be sure. However, when I run a query from query designer, it still executes in the SAP standard template.
    The real reason for wanting to do this, is we want to add 3 buttons to our template, which are on the standard template, namely "New Analysis", "Open" and "Save As". I can easily add these buttons and their associated commands to my custom template, but the problem is that if you press the Open button, choose the query from the resulting popup window, it then loads in the SAP standard template, and not in my custom template.
    I am assuming the 2 issues are related.
    We are running NetWeaver 2004s if that helps.
    Any ideas would be greatly appreciated.
    Cheers,
    Andrew

    HI,
    I was having the same problem.But later solved using advice from Josh Hoarding!!.
    Actually the setting from SPRO is not working.Jut open the 0ANALYIS_PATTERN take a backup for that.
    . In 0analysis_pattern go to the xhtml tab and delete everything between the <body>.....</body> tags, then save the template and run, the template should be blank, now you copy paste the code from the template You designed( which u want as default) in 0analysis_pattern .This is working.
    We dont y and how  but it works!!!
    mandha

  • 1078: Label must be a simple identifier.

    I am trying to access the value of variable (which is written process function of Loc class in as file ) in text box, in my fla file I am trying to access that var action:int , but it is showing an error
    1078: Label must be a simple identifier.
    this is my code
    var loc:Loc = new Loc();
    myTxt.text=Loc.process.action:int;

    Loc:  public class Loc extends MovieClip
    process: is public function in Loc class
    action : is var in process function and its deta type is int
    Trying to display the valu of  action:int in text box 

  • This might be a simple question.   On those sites that do not differentiate between models when on the internet I.e. Facebook when after your comment and you cannot hit "enter" on an iPad for examp. And speed is slow to connect.  What is = to post?

    This might be a simple question. On those sites that do not differentiate between CRT, laptop, tablet etc. such as an iPad Mini and using the Facebook site fir example when going to post a comment and you do not have a enter button on the IPad and the speed is slow how do you get your comments to post if we do not have a enter button? 
    <Email Edited By Host>

    I don't have facebook so I cannot answer but for your personal security, I have asked the hosts to remove your e-mail address.   It is very unwise to publish this.

  • I have OS X Lion and the messages beta on my macbook pro. When in messages, if I initiate a video chat there is no audio. I know this must be something on my end because if I'm invited to a video chat it works fine. Please help

    I have OS X Lion and the messages beta on my macbook pro. When in messages, if I initiate a video chat there is no audio. I know this must be something on my end because if I'm invited to a video chat it works fine. Please help

    Hi,
    The Buddy's Audio can get dropped completely if the speed of your Internet connections are vastly different.
    For example the minimum speed for a 1-1 video chat is only 128kbps Upload (As Downloads tend to be faster).
    Where I live in the United Kingdom I can only get DLS.  This is further subject to the distance to the Exchange.
    DLS at less than 3.5 km can be done at 20Mb at most exchanges.
    At some exchanges there is roll out of some Fibre optic services.
    In most larger towns and cities there is normally the option of a Cable service that offers similar figures.
    In some parts of Sweden you can get 100Mbps services.
    When the speed from your ISP varies a large amount then iChat will drop Frames to smooth out the Video
    There comes a point when so many frames are dropped that the Audio will not make sense and will be dropped.
    At about 128kbps a 5% variance will take you below the 100kbps mark (after allowing for the actual connection overheads)
    At 10Mbps that 5% variance can be (in round terms) 500kbps
    (A 500kbps service is itself good enough for a 4 way Video chat)
    My experience is that PC users on AIM tend to only send the Pic at 10 frames a second (Fps). Any slower than this and the picture losses it's smoothness and flow.
    You may see different Speeds and Frame Rates when you Call Out  compared to when others Call In.
    Setting the Bandwidth Limit to a lower figure such as 500kbps (fast enough for 4 way chats) may get around any variances in the speeds you see in the Connection Doctor during a live chat.
    7:43 PM      Friday; June 22, 2012
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
      iMac 2.5Ghz 5i 2011 (Lion 10.7.4)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.7.4),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • Array: Label must be a simple identifier

    Hi,
    I'm getting the "Label must be a simple identifier" when trying to add to my array, any ideas why?
    thanks,
    // var roundOne:     set outside of function on main timeline
    // var allRoundWinners:Array ;    is declared outside of the function on main timeline
    // both reside where all the code is created.. frame 1 -> layer "actions".
    Here is the code with the problem? Am I spelling/doing something wrong?
    Line: 974   if(roundOne!="Blank"){
    Line: 975       allRoundWinners.push(roundOne):
    Line: 976    }
    Line: 975   1078: Label must be a simple identifier.

    I think it is because you have colon - not semicolon at the end of line:
    allRoundWinners.push(roundOne):
    Should be:
    allRoundWinners.push(roundOne);

  • Again on "call to this must be first statement in constructor"

    Hi, I've spent the last hour reading tons of docs & threads about the "call to this must be first statement in constructor" problem, but I still cannot work it out.
    Here is the code
         public Orologio(String s)
              StringTokenizer exploder=new StringTokenizer(s,":",false);
              this(Integer.parseInt(exploder.nextToken()),Integer.parseInt(exploder.nextToken()));
              }Well, I know this..() must be the first line in the method, but I need to parse my input string before passing the parameters to the Orologio(int,int) constructor!
    Thankyou!

    You could define an initialization method:private void init(int a, int b) {
        ... your initialization code that was in your constructor...
    public Orologio(String s) {
        StringTokenizer exploder=new StringTokenizer(s,":",false);
        init(Integer.parseInt(exploder.nextToken()),Integer.parseInt(exploder.nextToken()));
    public Orlogio(int a, int b) {
        init(a, b);
    }However, make sure it is the responsability of this class to handle String as constructor parameter. Maybe you should force the client to tokenize the string and provide integer values to the constructor (and then get rid of the Orologio(String s) constructor.)

  • TS1717 Im new to itunes so this might be a simple answer but...

    Im new to itunes so this might be a simple answer but...I downloaded 20 songs a few days ago and the last 45-60 second ds of more than half didn't download. When playing the song it will kirt move to the next song. How can I get it to download again or get my money back? It does this whether I'm on my ipod touch, laptop, shuffle, etc.

    That has been a common problem at the Store for several months.  The easiest thing is to download fresh copies at no charge, per these instructions: 
    http://support.apple.com/kb/PH1619

  • Can't believe that I can't run movie videos simultaneously on my ipad. Just spent all weekend trying to do it. Downloaded 2 Apps but they just keep freezing. Come on apple this must be easy!

    Can't believe that I can't run music videos simultaneouslly on ipad. ust spent 2 days trying to do it. Downloaded 2 Apps but they just keep freezing. Come on Apple this must be easy to fix!

    first then this is a user helping forum only users like you read or write here if you want apples ear
    http://www.apple.com/feedback/ipad.html
    other then that it's unclear what you are trying to do or if it's 1 or 2 things
    playing music videos simultaneously would imply you trying to play more then 1 at once, this is not something it support out of the box I'd say.
    then there is the 2 apps, are you refearing to apps which should let play many music videos at once?
    and do they freeze when you try to download them, or when you try to start them,
    and maybe the name of the apps, in question would make it easier for people to help.

  • I *just* want to buy Lightroom, I don't want a "plan".   Surely this must be possible or is adobe just forcing us to buy more than we need?

    I *just* want to buy Lightroom, I don't want a "plan".   Surely this must be possible or is adobe just forcing us to buy more than we need?
    Thanks,
    Jack.

    Yes, I think they would like you to by the CC plan.  But you can still get the standalone.
    The Trial Download is here:
    https://www.adobe.com/cfusion/tdrc/index.cfm?product=photoshop_lightroom
    This is exactly the same as the paid for version but time limited. I seem to recall that the option to convert the Trial to a Paid for version pops up every time you start it.

  • Notes - this MUST be simple!

    I can't get my notes to work from the mail application. I press the notes icon, and nothing happens. What simple thing am I overlooking? Thanks!

    what happens when you try to create a new note?

  • I have no status bar, no menu bar, no maneuverability at all. There appears to be only the center of the webpage and I have to ctl-alt-del to close firefox. There must be a simple solution to correct this.

    Problem began this am- opened firefox 4 and have lost all the manageability buttons-tabs-toolbars. It appears that all I have is the center of the page and the frames around the edge are out of sight or gone. Can't grab a corner/edge to make screen smaller or scroll up/down. Tried reloading and reinstalling FF4 but still same problem

    I mucked about and solved the issue myself by uninstalling FF4 then installing FF3.16.... it still opened up wrong. I deleted something from Mozilla FF ( I had 3 sets of search engine folders) and then managed to get back online with FF instead of Chrome. Will keep your advice in mind should the problem occur again - I never run anything in full screen mode and dumb me does not even know how to do that with FF. Thanks for the answer.....

  • Help - this must be simple!

    I'm tying to create a 'calculator' where the end user enters
    numeric values into 3 fields (gas, electricity and phone) then
    those values are added together and the answer automatically
    appears in a fourth field entitled 'total'. Seems easy but I am
    banging my head against a wall. Do I apply lingo to the field? What
    is the lngo? Aaaargh!
    Also, I need to add a print button. When pressed, an Adobe
    PDF file entitles 'form' is accessed from the same CD and printed,
    with or without opening first. The Director project will be saved
    as a Projector file.
    Thanks a million if you can help

    for the first, do you want to appear the answer
    automatically, when you enter into the fields or do you have a
    button like "calculate results"?
    For the button an attached behaviour like the one below
    should do it
    for the second: sorry, have no time to look around for the
    moment but I guess an xtra like Buddy API or PDF xtra should do the
    job
    Behaviour:

  • When downlading a particular webpage the print does not seem to fit. I am sure there must be a simple solution to this but not for me!!

    Print does not seem to fit in any downlaoded webpage - please help

    I'm not sure what you mean by downloaded.
    * Is the problem with Firefox displaying the page on the screen, and part of the text is off the right side of the screen? If everything is gigantic, your Firefox icon might be set up to start in a low resolution. If only the page content is too big, it could be an issue with Zoom.
    * Is the problem with printing the web page, either to paper or PDF? If you use Print Preview and adjust the scaling setting (e.g., change Shrink to fit to something like 90%), perhaps you can get it to work. There are some sites that do not Shrink to fit.

  • This has to be Simple !

    Hello, this i think is a simple one,
    I have made a site, with 4 pages, made with tables. The site
    is rectangle in shape, with margins left and rite.
    In the top table, there is the company logo. I have text in
    the index page, and it all looks nice, but when i paste more text
    for other pages (approx twice the amount of the index page) the top
    table shifts up, and the bottom table shifts down a liittle -
    inconsistent with the index page, and i do not want this, it looks
    poor when viewing in a browser. Is there a way to have the top
    table hold its position on the page when entering in alot of text
    and other items?
    I do not know CSS, still to learn !
    I hope someone can help, this is doing my head in !!
    Thank you so much in advance,
    S

    Post a link to the pages, please. The answer would be in your
    code.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "simey70" <[email protected]> wrote in
    message
    news:fljmc7$b9b$[email protected]..
    > Hello, this i think is a simple one,
    >
    > I have made a site, with 4 pages, made with tables. The
    site is rectangle
    > in
    > shape, with margins left and rite.
    >
    > In the top table, there is the company logo. I have text
    in the index
    > page,
    > and it all looks nice, but when i paste more text for
    other pages (approx
    > twice
    > the amount of the index page) the top table shifts up,
    and the bottom
    > table
    > shifts down a liittle - inconsistent with the index
    page, and i do not
    > want
    > this, it looks poor when viewing in a browser. Is there
    a way to have the
    > top
    > table hold its position on the page when entering in
    alot of text and
    > other
    > items?
    >
    > I do not know CSS, still to learn !
    >
    > I hope someone can help, this is doing my head in !!
    >
    > Thank you so much in advance,
    >
    > S
    >

Maybe you are looking for

  • Passing the structure to rfc function module

    hi, iam having a rfc function module which is importing structure. i have to pass only one field value to that structure. how can i pass that field value to that structure. it is very urgent. thanks in advance

  • Problems with non-electable client

    Hello! I am not sure if this forum is the right place to submit feedback, but since I have not find another places I will try to do it here. If anybody knows more appropriate way, please let me know. I am setting up the replication environment with t

  • How Can I define itab for VBFA in SD_SALES_DOCUMENT_PREFETCH??

    Hi Experts, Am using FM of SD_SALES_DOCUMENT_PREFETCH to pull the data, like, CALL FUNCTION 'SD_SALES_DOCUMENT_PREFETCH'     EXPORTING       i_sales_view  = wa_view       i_memory_read = 'A'     TABLES       i_vbak_keytab = t_vbeln       fxvbak      

  • Programming for third party DAQ

    Hi all!!  i am using third party DAQ (HBM MGCplus ML01 amplifier).. i installed the instrument driver in my labview, wer i cud see my DAQ in Functions - Instrument I/O - Instr Drivers - mgcplus.. Now pls let me know how shud i configure the inputs an

  • Exclusion of creating a copy

    How to replace once the original images, while improving the quality of the mass. The  idea is that when processed by the organizer and throw the pictures,  and it gives me correct it creates a tactile files (copies) and I want  to immediately change