Getting information about a class using generics...

Hi there.
I have declared a class: "public class SomeClass<SC extends SomeClass>{/*Do something*/}".
Can anyone tell me why a statement like "System.out.println(SC.class.getSimpleName());" within a method defined in SomeClass will not compile? Is there some other way to achieve what I want?

YoungWinston wrote:
Owen Thomas wrote:
Well then, it would be great to be able to key a switch that tells the compiler one isn't working with "legacy code", if this might allow generics to reach a hitherto untapped potential.I don't see how, since not everybody is going to need (or want) such a switch. It also sounds like a recipe for disaster. Should we add such a switch for every enhancement that might have backwards-compatibility problems?Isn't that what the "deprecated" feature is for? Sure, there'll be backwards compatibility issues for a while, but after a few years, with management, things should settle as code is moved from pre to post "super-generics".
Much of the Java core, and many third-party libraries might have to be re-written in that circumstance... economic stimulus.How could the Java core have been re-written if it requires use of a "not backwards-compatible" flag?i have not reason to believe that code compiled under a super-generics switch need not be backwards-compatible. One may have to simply exercise care in its use.
I didn't want to bore you with trivia, and I didn't want you to frustrate me with more quips (well-meant though I'm sure they are) about how to write code. ;-)In which case I can only assume that you're using generics for something that probably, more correctly, requires reflection. Have you looked at the relevant parts of Class, as I suggested?No, but as you are impressing on me to have a look, I could do no wrong to have a sniff around. However, with no specific motivation in the current context, I don't think anything will catch my eye. The current need isn't great enough.

Similar Messages

  • How to get information about the modules used in the RT system from host pc.

    hi all,
    i am trying to  read the modules of the RT tragets from my host pc without deploying the program.
    i have 2 or more than 2 rt systems from which i am trying to get the information about the modules used in that particular system.
    Regards,
    Santhosh M

    hi, you can use the sys_context function, like this:
    select sys_context('userenv','current_user'),
         sys_context('userenv','os_user'),
         sys_context('userenv','host'),
         sys_context('userenv','ip_address'),
         sys_context('userenv','instance'),
         sys_context('userenv','sessionid'),
         sys_context('userenv','terminal')
    from dual;
    Is this what you 're looking for?

  • How to get information about cluster disk using powershell

    Hi
    How can I list all cluster disks in my Hyper-V cluster using Powershell? I see two cluster disk "Cluster Disk 1" and "Cluster Disk 1" in my cluster management console but I would like to see them using powershell.
    Kind Regards Tomasz

    http://tinyurl.com/mfro3q5
    Get-ClusterResource
    Get-ClusterQuorum
    Get-ClusterSharedVolume
    . : | : . : | : . tim

  • How to get information about creation of a virtual machine on a Hyper-v host.

    Hi,
    How to get information about creation of a virtual machine on a Hyper-v host?
    I need: host name, time created, creator user.
    I saw in Hyper-V-VMMS but I found info about movements of VM between hosts.
    Thank's in advance.
    Denius Valiant

    For Host Name * Created Time Use This Command In PowerShell 
    Get-VM -Name (Read-Host "Type Your Vm Name") |select CreationTime , ComputerName
    and for Create User , As i know you should see on Event Log . 
    Go To Event Log Viewer--->Applications And Services Logs--->Microsoft--->Windows--->Hyper-V-VMMS--->Operational 
    You can see in Event Log who create the Vm.
    Whenever you see a helpful reply, click on Vote As Helpful & click on
    Mark As Answer if a post answers your question.
    LinkedIn:
      Facebook:
      

  • HOW TO GET INFORMATION ABOUT THE CLIENT MACHINE AT DATABASE LEVEL

    HOW TO GET INFORMATION ABOUT THE CLIENT MACHINE AT DATABASE LEVEL USING 10g Database and 10g Application Server
    we have developed an application using oracle forms 10g with
    oracle database 10g and Application server 10g
    Application uses a single Oracle User name to connect to database
    where as at Application level there are different users (these are not database users)
    Now how can we get the information about the user/his machine etc. at database level. earlier in 6i/8i we use to get by using
    USERENV('TERMINAL')
    we had written a triggers on tables on Insert/Update where we used to update a database field Last user terminal with USERENV('TERMINAL')
    but not this information is comming to be the machine name of application server where as we wish this to be the machine name of Client. Any Way outs
    thanks
    Chaand Kackria

    hi, you can use the sys_context function, like this:
    select sys_context('userenv','current_user'),
         sys_context('userenv','os_user'),
         sys_context('userenv','host'),
         sys_context('userenv','ip_address'),
         sys_context('userenv','instance'),
         sys_context('userenv','sessionid'),
         sys_context('userenv','terminal')
    from dual;
    Is this what you 're looking for?

  • How to get information about cursor? I had only a reference on it.

    Hello
    How to get information about cursor, that I receive in my procedure as a reference. For example I need to know, a number of columns. I know nothing about this cursor, except the link on it.
    Best Regards, Kostya Proskudin!

    However, I would seriously reconsider what you are trying to achieve.
    It looks like you are trying to write some ultimately generic cursor processor. i.e. pass any cursor and process it in some generic way.
    Good design should include knowledge of what is expected to be passed and that knowledge can be put into the code.
    Generic code is inherently difficult to maintain and debug and will never 100% deal with all possible situations e.g. even if you know the table being queried in the cursor you can't rely on the data dictionary to give you all the returned columns if some of the returned columns of the cursor are computed columns.
    Be careful you aren't writing something that's going to cause problems later.

  • How to get information about limitation Internal Memory on device

    hallo ..
    have some question here, so please some person able to answer my questions 
    1. How to get Information about limitation internal memory on device 
    2. is possible to improve internal memory on Blackberry ( move apps on external memory )
    3. any tools to get internal memory activity ?
    thanks for this people who joins here, hope we can share more information about blackberry .. 

    In addition...
    There are three types of potential memory on a BB: 1) Application Memory, 2) Device Memory, and 3) Media/SD Card Memory.
    Application Memory -- This is the most crucial; it is the protected (not user accessible), dedicated, and fixed (in size) space that is available as the destination for the installation of applications (plus some application storage, overhead and such). You cannot touch AppMemory. You cannot improve the maximum AppMemory that your BB has. It is what it is. Applications can only install here...there is no option.
    Device Memory -- This is space on your BB that you can touch to store files, pictures, media, etc. Typically, it is not terribly large, but it is available to you.
    SD/Media Card Memory-- This is what it says...your SD card, for you to store files, media, pictures, etc. It can be as large as your BB OS can support...see this KB:
    KB05461MicroSD card sizes supported by the BlackBerry device software
    On some devices/OS levels, you can only see "File Free" (Options > Status), which I think is equivalent to AppMemory. On other devices, you can see all three memory usage levels (Options > Memory). Here are some guidelines to use:
    KB02843What is the Low Memory Manager feature on the BlackBerry smartphone
    KB14320How to maximize free space and battery power on the BlackBerry smartphone
    KB14213Call logs, SMS text messages, and email messages are deleted from the BlackBerry smartphone
    Lastly, it is always important to properly close applications when you are done with them. Using the Back or the Red key will not do this -- those leave it to the app to decide what to do...and some will leave themselves resident in memory, consuming resources on your BB, slowing the overall performance. Rather, to close an app, press and select "Close" or "Exit"...that will force the application to be closed, freeing up for your new use the resources it was consuming. Some apps will always remain running (typically -- BBMessenger, Browser, Homescreen, Phone, and Messages)...but, you should still close them properly - especially the Browser...if it is left on an active web page, it will not only consume extra resources but battery power as well.
    Further, anytime random strange behavior or sluggishness creeps in, the first thing to do is a battery pop reboot. With power ON, remove the back cover and pull out the battery. Wait about a minute then replace the battery and cover. Power up and wait patiently through the long reboot -- ~5 minutes. See if things have returned to good operation. Like all computing devices, BB's suffer from memory leaks and such...with a hard reboot being the best cure. Some have taken to doing this on a regular basis as a preventive measure...some as frequently as once per day. Others have obtained the QuickPull app to automate a simulated Batt-Pull.
    Good luck!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Getting information about an object from JList

    Hi
    I have created a movie application and i have a JList displaying all registered movies, it uses a DefaultListModel to display these.
    I want to be able to click on an element in the JList and then push a button called "Show movie details" to display all information about the selected movie.'.
    Every new movie is added to the DefaultListModel as an object with "Titlle", "Genere" etc. If someone click on a movie, what do i do to get information about which object that was clicked. All i can see is that integers can be returned with the getSelectedIndex/Value methods. If i use one of these methods to get the object from the DefaultListModel, that would work i guess, but what when someone deletes a movie in the middle of the JList, then the indexes wouldnt match.
    Can someone help me out here? :)

    I get a big fat exception when trying to cast the returned object to a Movie object which im using.
    Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: java.lang.S
    tring cannot be cast to Movie
    ...sure that this is the way to do it? If so, what am i doing wrong..

  • Oracle BPM Java API - getting informations about process activities

    Hi
    I have a problem with Oracle BPM Java API, can someone help me?
    I have a business process project deployed in Oracle SOA Suite and I need to get some informations of my process programatically via Java API.
    Basically I need to get informations about process activities and the corresponding human tasks referenced by these activities.
    I'm able to get the HumanTasks of my Business Catalog and also to get the Activities of my Process, but the relationship between them is null.
    I did some tests, below a piece of code of my test:
    IBPMServiceClient bpmServiceClient = BPMConnectionUtil.getBPMServiceClient();
    IProcessMetadataService processMetadataService = bpmServiceClient.getProcessMetadataService();
    IProcessModelService processModelService = bpmServiceClient.getProcessModelService();
    List<ProcessMetadataSummary> processMetadataSummaryList =
    processMetadataService.listProcessMetadataSummary(BPMConnectionUtil.getBPMContext(), "processNameOrId to find", "processName", "ASC");
    if (processMetadataSummaryList == null || processMetadataSummaryList.size() == 0)
    return;
    ProcessMetadataSummary processMetadataSummary = null;
    for (ProcessMetadataSummary summary: processMetadataSummaryList) {
    if (summary.isIsDefaultRevision()) {
    processMetadataSummary = summary;
    break;
    if (processMetadataSummary == null)
    processMetadataSummary = processMetadataSummaryList.get(0);
    IProcessModelPackage pack = processModelService.getProcessModel(BPMConnectionUtil.getBPMContext(), processMetadataSummary.getCompositeDN(), processMetadataSummary.getProcessName());
    oracle.bpm.project.model.processes.Process process = pack.getProcessModel();
    Sequence<UserTask> activities = process.getActivities(UserTask.class);
    for (UserTask activity: activities) {
    System.out.println("Human Task: " +activity.getHumanTask()); // <<<<<<<<<<<<<<<<<<<<---------------------------- here is the problem. the human task is null, but my activity have a task associated
    There is another way to get this information?
    Thank's

    Hi
    I have a problem with Oracle BPM Java API, can someone help me?
    I have a business process project deployed in Oracle SOA Suite and I need to get some informations of my process programatically via Java API.
    Basically I need to get informations about process activities and the corresponding human tasks referenced by these activities.
    I'm able to get the HumanTasks of my Business Catalog and also to get the Activities of my Process, but the relationship between them is null.
    I did some tests, below a piece of code of my test:
    IBPMServiceClient bpmServiceClient = BPMConnectionUtil.getBPMServiceClient();
    IProcessMetadataService processMetadataService = bpmServiceClient.getProcessMetadataService();
    IProcessModelService processModelService = bpmServiceClient.getProcessModelService();
    List<ProcessMetadataSummary> processMetadataSummaryList =
    processMetadataService.listProcessMetadataSummary(BPMConnectionUtil.getBPMContext(), "processNameOrId to find", "processName", "ASC");
    if (processMetadataSummaryList == null || processMetadataSummaryList.size() == 0)
    return;
    ProcessMetadataSummary processMetadataSummary = null;
    for (ProcessMetadataSummary summary: processMetadataSummaryList) {
    if (summary.isIsDefaultRevision()) {
    processMetadataSummary = summary;
    break;
    if (processMetadataSummary == null)
    processMetadataSummary = processMetadataSummaryList.get(0);
    IProcessModelPackage pack = processModelService.getProcessModel(BPMConnectionUtil.getBPMContext(), processMetadataSummary.getCompositeDN(), processMetadataSummary.getProcessName());
    oracle.bpm.project.model.processes.Process process = pack.getProcessModel();
    Sequence<UserTask> activities = process.getActivities(UserTask.class);
    for (UserTask activity: activities) {
    System.out.println("Human Task: " +activity.getHumanTask()); // <<<<<<<<<<<<<<<<<<<<---------------------------- here is the problem. the human task is null, but my activity have a task associated
    There is another way to get this information?
    Thank's

  • Howto get information about available queues?

    Any ideas how to get information about available queues on a Weblogic Server to browse them?
              When you have the jndi namespace and the name of the queue it's no problem to browse that queue, but when you don't have the name of the queue is there a way to still be able to browse the queue(s)?
              Any information is warmly welcomed.
              Thanks,
              Chris

    A QueueBrowser is currently the only way to view message contents. WebLogic 9.0 (out in beta now), provides comprehensive message management both via console and JMX.
              For 8.1, the following links may help get you started.
              JMS technology page:
              http://dev2dev.bea.com/technologies/jms/index.jsp
              WebLogic public management/monitoring APIs:
              http://edocs.bea.com/wls/docs81/jmx/index.html
              jsp based dest browser (which ultimately uses a QueueBrowser):
              http://dev2dev.bea.com/codelibrary/code/jmsdest.jsp
              JMS statistics dump:
              http://dev2dev.bea.com/codelibrary/code/jms_stats.jsp
              Tom Barnes, BEA

  • [C] Get information about touchpad

    Hi,
    I'm completly new to writing Linux applications in C.
    In my program I want to enable/disable my touchpad based on whether or not a mouse is present. But I can't seem to figure out which library I need to use to get information about my touchpad and how to enable or disable it.

    Hello Caillen
    Thanks for reply.
    Where can I find APIs or SDKs for Nvidia and ATI Video Graphic cards?
    tnx again
    Edit 1:
    I've found these link about
    CUDA Toolkit 7 for Nvidia and
    APP SDK for AMD.
    Can I do what I want with this SDKs?
    Is there any tutorials or sample to help me use them?
    Edit 2:
    In TechPowerUp GPU-Z software, I've found this:
    Did TechPowerUp
    used
    this SDKs to get
    their needed
    information?
    In TechPowerUp GPU-Z software,
    I see only one executable file and there is no dlls or anything.
    I'd like to do this job like them. How can I do that?
    thanks

  • Howto get information about Java Stored Procedures programmaticly

    Hi all,
    using the DatabaseMetaData object it is easily possible to get information about database objects like tables, columns or even plsql stored procedures.
    But is there a way to get information about Java Stored Procedures which are published in packages ? Is it possible here to use a DatabaseMetaData object or is there any other solution ?
    TIA,
    Chris

    What sort of information do you want to know about the Java stored procedures?
    Would the views USER_SOURCE or USER_OBJECTS contain the information you need?

  • Where can I get information about Oracle Selective Audit?

    Hi all.
    I would like to know where can I get information about Oracle Selective Audit. Is included in some package? Resources it needs, manuals, etc. I don't find much information.
    We have Oracle 9i.
    Thanks

    I need information about the Oracle Selective Audit solution. It works on oracle 9i? Requirements, how to get and install it. Is this package useful for report generation, etc.
    Thanks for the link.

  • How do I get information about new legal requirements?

    Hi
    We are 4 people in a company that has 39 active company codes in about 25 countries. How can we subcribe to whenever SAP releases new reports that meets legal requirements in specific countries? Some of our companys have their bookkeeping taken care by a neighboring country, so the bookkeepers would not know if there is a new report released from SAP. So how can we get information about new reports without having to read throug all the release documentation?
    Hope you can help
    Jens Bald
    IC Companys
    Denmark

    Hello Jens,
    this is a real problem.
    What is my experience? The first priority is: try to use the SAP Standard as far as possible. No user-defined reports, no exits. Try to be always up to date with hotpackages.
    A further help for me are the userforums here. If you have five minutes left, just have a look at all the questions and answers.
    I know, there is a lot of stuff to read, but the releasenotes have to be checked. Unhappily I didn't find another way.
    Sometimes SAP reacts just in time regarding new legal requests - and I can understand this. At least I have to say: It is not possible to manage this without having any support from the accountancy side. This enables you to search for this requests - instead of reacting.
    If a country changes statutory requests regarding taxreporting or new taxtypes, changing of rates the guys from local accountancy ought give you a hint. Because they get this information at first.
    I made good experiences with internal accounting forums or user groups (i. e. northern countries, westeurope, USA, southeurope). 
    Maybe it gives you a little help and I am very interested in all the answers to this thread.
    Best regards
       Horst

  • Within redbox I can not click on a movie and get information about it, instead I get an error message that says that the situation may be temporary. yet i keep having the same problem. Do you have any idea how to fix the problem?

    Within redbox I can not click on a movie and get information about it, instead I get an error message that says that the situation may be temporary. yet i keep having the same problem. Do you have any idea how to fix the problem?

    Did you delete all receipts with iDVD in the file name  with either a .PKG or .BOM extension that reside in the HD/Library/Receipts folder and from the /var/db/receipts/  folder before installing the new copy?  If not then do so and delete the new application also.
    Click to view full size
    Then install iPhoto from the disk it came on originally and apply all necessary updaters: Apple - Support - Downloads
    OT

Maybe you are looking for

  • Wanting the new iphone 5 S in Gold

    Does anyone know when the iphone 5S in gold will be released in East Texas ... specifically Tyler, TX? I would like to purchase the item, yes do an early upgrade and trade in my iphone 5 but none of the Verizon, Sam's Club, Walmart, Target, Best Buy,

  • VAT Tax report S_ALR_87012357

    Hi SAP Guru's I am running Report S_ALR_87012357 for VAT Tax report, but the report is displaying the Tax base amount twice on the report. I have observed that, if there is more then one tax code used in the document level (exp: V0, V1) then its disp

  • Business Partner (0BPARTNER) Relationships missing in Hierachy !!

    Hi, I am working on 0BPARTNER infoobject. I loaded data into 0BP_REL ODS which gets relationship data from CRM. 0BPARTNER gets this relationship data thru 0BP_REL. But am nt seeing the relationship data when i load the hierarchy (0bpartner_hier). Und

  • Can I send DHCP host name to my ISP from RV220W?

    My ISP waits a definite host name from me to return my white IP address via DHCP. Can I set this parameter in RV220W router? I don't find such parameter in IPv4 WAN configuration page.

  • Regarding Search Results

    Hi All, The Search returns the result as --> Item and Description . Now I added extra column UnitsAvailable Qnty to above columns Now I need to Sort the UnitsAvailabel Qnty Column to above search functionality This is related iStore Product Search Pa