Using parameter type to return the right instance

Hello,
This code do not work in the 'get' method of Converters. It do not return the instance of Converter<MyClass> when I use get(MyClass.class).
How can I return the T clas in the method 'getConverterClass' of Converter
public interface Converter<T> {
public Class<T> getConverterClass();
public final class Converters {
private Map<Class,Converter<?>> converters = new TreeMap<Class,Converter<?>>(new ClassComparator());
public Converter<?> get(Class<?> c) { return converters.get(c); }
thanks

I must be in error...
I try :
private Map<Class<?>,Converter<?>> converters = new TreeMap<Class<?>,Converter<?>>(new ClassComparator());
public T Converter<T> get(Class<T> c) { return converters.get(c); }
and all the 'Converter' is underlined.
I try :
private Map<Class<?>,Converter<?>> converters = new TreeMap<Class<?>,Converter<?>>(new ClassComparator());
public <T> Converter<T> get(Class<T> c) { return converters.get(c); }
and 'converters.get(c)' is underlined with warning 'cannot convert from Converter<?> to Converter<T>'
Thanks

Similar Messages

  • Use to have a + on the right of the tab that when clicked, opens a new tab. what happened to this?

    use to have a + on the right of the tab that when clicked, opens a new tab. what happened to this?

    greghcrash wrote:
    It Would be great to have keys on the onscreen keyboard.
    Such as a computer keyboard.
    With BACKSPACE, TAB WITH SETTINGS, DELETE, TYPE OF TYPE, BOLD TYPE, UNDERLINE ETC....
    I HAVE A KEYBOARD COVER AND IF I NEED TO USE CERTAIN KEYS I HAVE TO SWITCH TO MY KEYBOARD CASE AND THAT IS VERY INCONVENIENT.
    IT IS ALSO A TIME WASTER.
    When you installed iOS 8 did you read about the new features? Applications can create custom keyboards…
    http://www.imore.com/custom-keyboards-ios-8-explained
    You need to look for an app that has a custom keyboard with the features you require, I suggest you find one without CAPSLOCK
    greghcrash wrote:
    IT IS ALSO AGGRAVATING WHEN TYPING AND IT AUTOMATICALLY CHANGES THE WORDS THAT YOU WANT TO USE.
    THANK YOU FOR YOUR TIME
    Again you need to look at how to manage the device - these settings can be turned off already & you can edit the 'suggestions' too.
    Settings > General > Keyboards > turn Auto-Correction Off.
    Sadly you cannot disable autocorrect temporarily, so it's all or nothing.

  • In Mail, my message preview used to be shown to the right side of the messages.  Now it is showing below the messages.  How can I move it back to the right?

    In Mail, my message preview used to be shown to the right side of the messages.  Now it is showing below the messages.  How can I move it back to the right?

    Select the Viewing tab in the Mail preferences dialog and uncheck the box marked Use classic layout.

  • My screen has streched out real big and the touch screen is difficult to use and can't return the screen to normal size.Has anyone ever experienced this?

    My screen has streched out real big and the touch screen is difficult to use and can't return the screen to normal size.Has anyone ever experienced this?

    Double-tap the screen with three fingers, then go to Settings and disable the Zoom function so you don't accidentally trigger it again.
    The User Guide is available at http://support.apple.com/manuals/ or downloadable from iTunes as an iBook.

  • How to Use Parameter ID to default the Bank details in Vendor master

    HI,
    Client wants to default the Bank details for his vendor master records which will be created in future.Kindly advice me how to create parameter ID for defaulting the Bank details in vendor master.
    Kindly advice me
    Thanks
    Sunitha

    Hello,
    You have misunderstood the concept of Parameter ID.
    A field can be filled with proposed values from SAP memory using a parameter ID for that particular user. Normally in Finance, you can keep Company Code, Controlling Area etc. can ke kept as default. You find the Parameter tab in User Master Record in SU01.
    I am afraid that you want to populate the bank details in vendor master record. These fields are very critical for all types of payment. You should double make sure that you are entering the correct bank details in the vendor master record. If you do not fill any of these details, your BACS and CHAPS (DME) payments would get failed.
    If your client do not have details of bank information, the same can be filled later by writing a LSMW.
    Thanks,
    Ravi

  • Linking two DCs using interface views and return the value

    Hi,
    I have two webdynpro DCs. DC1 & DC2, each contains one view.
    Point 1:  From the DC1-->DC1View1 ,when I click a button , It should call  DC2(This is happening).
    Point2: When the DC2 is executed it should return to DC1-->DC1View1, value from DC2 need to be passed to DC1 also.
    How to acheive  point2. How anyone help on this .
    Regards,
    Muhammed Nishad J.

    Hi,
    You would have created a inbound and outbound plug between DC1-->DC1View1 and DC2 ->View.
    Now you will have to create the same for DC2 ->View and DC1-->DC1View1
    1) create an inbound plug on DC1-->DC1View1 and outbound plug on DC2->view.
    2) Now create a link as you would have in the first case.
    3) create a parameter in DC2->view for outbound plug, and also the same in inbound plug of the DC1->view
    4) Now in the method that was created for the outbound(public void onPlug<name of plug> )pass the value into the parameter created
    5) in the inbound method(public void onPlug<name of inbound> get the value of the parameter in a variable.
    I hope this solves your problem.
    Thanks and Regards,
    Narayani

  • How to find out whether I am working on the right instance?

    Hi All
    I want to find out from Oracle Apps i.e., Front end the following:
    Whether the instance I am working on currently is the same one or restored from a backup. I will not be able to find out the difference immediately as the changes between the current instance and backup instance are very few and dispersed but at the same time critical to the system.
    How can I find out from the front end whether the instance is same as I was working yesterday assuming I am the only user?
    Thanks in Advance for any help.
    Regards
    Rahman

    Hi,
    as the changes between the current instance and backup instance are very few and dispersed but at the same time critical to the system.I believe there is no way to find out unless you check and see those changes (before/after the restore).
    Regards,
    Hussein

  • RAC: Service started not in the right instance

    Hello,
    I added today two instances (ACCMEAS3, ACCMEAS4) to a RAC databases (10gR2). The system has now 4 nodes. The new configuration of my service is:
    $>-RAC>-ACCMEAS3:$ srvctl config service -d ACCMEAS
    ACCMEAS_S PREF: ACCMEAS3 AVAIL: ACCMEAS4
    $>-RAC>-ACCMEAS3:$srvctl status service -d ACCMEAS
    Service ACCMEAS_S is running on instance(s) ACCMEAS3
    This is the actual configuration in the CRS.
    Nevertheless the ACCMEAS2 still has the service, despite I have bounced the instance:
    (info from a listener):
    Service "ACCMEAS_S" has 2 instance(s).
    Instance "ACCMEAS2", status READY, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:0 refused:0 state:ready
    REMOTE SERVER
    (ADDRESS=(PROTOCOL=TCP)(HOST=nodea)(PORT=1574))
    Instance "ACCMEAS3", status READY, has 2 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:0 refused:0 state:ready
    REMOTE SERVER
    (ADDRESS=(PROTOCOL=TCP)(HOST=nodeb)(PORT=1574))
    "DEDICATED" established:1639 refused:0 state:ready
    LOCAL SERVER
    The only way to avoid this is to put ACCMEAS2 down.
    The service is configured TAF: Basic-Select, CLB_GOAL: LONG,GOAL:NONE
    The connection string for info purpose:
    datab=(
         DESCRIPTION=
         (ADDRESS= (PROTOCOL=TCP) (HOST=nodea-v) (PORT=1574) )
         (ADDRESS= (PROTOCOL=TCP) (HOST=nodeb-v) (PORT=1574) )
         (ADDRESS= (PROTOCOL=TCP) (HOST=nodec-v) (PORT=1574) )
         (ADDRESS= (PROTOCOL=TCP) (HOST=noded-v) (PORT=1574) )
         (LOAD_BALANCE=off)
         (ENABLE=BROKEN)
         (CONNECT_DATA=
              (SERVER=DEDICATED)
              (SERVICE_NAME=accmeas_s)
              (FAILOVER_MODE=
                   (TYPE=SELECT)
                   (METHOD=BASIC)
    In the future we would like to have all instances as possible spares, that's why this definition in the tnsnames.ora.
    What makes the service to get started on a instance not defined for?
    Thanks for your help!

    The workaround I have found is to use dbms_service.stop_service. This stops the service on the instance 2 and makes everything coherent with the CRS.
    Ruben

  • Using jsessionid to get to the right session

              We've got an odd situation that we've run into using Weblogic Server 8.1 SP2 to
              serve up dynamic VoiceXML pages. Our VoiceXML platform has a VoiceXML browser
              and another component called a compilation server, whose job is to retrieve grammars,
              compile them and make them available for recognition. Although the browser itself
              supports cookies, the compilation server does not.
              Here's the scenario:
              Server A (the browser) makes a request to Weblogic for its initial page, and a
              new session is created. The page that is returned contains a link that includes
              the session ID appended to the end of the URL, so that it looks like this. http://someserver/voice/grammars/grammar.jsp;jsessionid=A0vIhV1RkYzwYI0vcS1b0ykU21YPy2Ww3r9WBzoDAOq04liAWnQf!507937038!1089777544278.
              Server A sends that URL (including the jsessionid) to server B (the compilation
              server), and B uses the URL to fetch a grammar.
              In the HTTP access logs for Weblogic, we see the second request (from B) come
              in, and it contains the correct jsessionid. However, our application logs show
              that a entirely new session is actually created, with a brand new session ID.
              To further test it out, some attributes that were put into the session during
              the initial request are definitely not there on the second request.
              Anyone know how we can make Weblogic use the jsessionid to find the correct session
              rather than create a new one? Our assumption is that since the request is coming
              from a different client, Weblogic is automatically creating a new session.
              

    Our assumption is that          > since the request is coming
              > from a different client, Weblogic is automatically
              > creating a new session.
              Server will create a new session only if the jsessionid is not present in the original request. Making a request from a different client should not make a difference.
              Are you making the request to the same application in both the cases ?
              You may try the following code and access it from diff. client to see the expected result.
              <html>
                   <head>
                        <title>some Application</title>
                   </head>
                   <body>
                   Session is new ==> <%=session.isNew()%> <BR>
                   Session Id is ==> <%=session.getId()%>     <BR>
                   <% if(session.isNew()){
                        session.setAttribute("one","sesion-one");
                             else{
                             out.println("Attribute is " + session.getAttribute("one"));
                   %>     
                   </body>
              </html>

  • ResultSet.getString(String) doesn't return the right text from database

    Hi everybody,
    I'm trying to read some text in Portuguese from a MS-Access database, but the special characters for Portuguese aren't correctly translated by ResultSet.getString(String).
    Here's my piece of code:
    private static void fetchEquipamentoEstabelecimento()
    try
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery(
    " SELECT Eqp.NumSerie, Eqp.Estabelecimento, Estab.Nome, Estab.Cidade, Eqp.Data, Eqp.LPN " +
    " FROM Equipamento Eqp, Estabelecimento Estab " +
    " WHERE TabPreco = 23 " +
              " AND Eqp.Estabelecimento = Estab.Estabelecimento " +
    "ORDER BY NumSerie DESC");
    while(rs.next())
    String nome = rs.getString("Nome");
    System.out.println(rs.getLong("NumSerie")      + " " +
                             rs.getDate("Data")           + " " +
                             rs.getString("LPN")           + " " +
                             nome                              + " " +
                             rs.getString("Cidade"));
    stmt.close();
    catch(SQLException ex)
    printSQLException("fetchEquipamentoEstabelecimento()", ex);
    The output of this piece of code is 1 record joined from tables Equipamento and Estabelecimento:
    111222333 2001-12-15 JHK Pal<X>cio Cristal Guarda
    where the <X> is the greek letter beta. I was expecting a
    portuguese character which is an a with an accent: � (I hope the character was correctly displayed for you)
    I tried replacing
    String nome = rs.getString("Nome");
    with
    String nome = new String(rs.getString("Nome").getBytes(),codepage);
    with codepage="Cp860" (MS-DOS Portuguese)
    and codepage="Cp037" (USA, Canada (Bilingual, French), Netherlands, Portugal, Brazil, Australia)
    but other strange characters were displayed instead of the a with an accent.
    In the MS-Access table Estabelecimento, the column Nome has a Data Type of Text.
    I'm using:
    - JDK 1.2.2
    - MS Access 2000 (in Windows 2000)
    MS Access 97 (in Windows NT 4.0).
    Any help is deeply apreciated.

    Hi!
    When you establish connection to database, try explicitly give instructions about what encoding use your DB, e.g.:
    // connection properties
    Properties connInfo = new Properties();
    connInfo.put("user", username);
    connInfo.put("password", password);
    connInfo.put("charSet", "Cp1251"); // enter your codepage!!!
    // getconnection
    Connection db = DriverManager.getConnection(dataurl, connInfo);

  • Using analytic function to get the right output.

    Dear all;
    I have the following sample date below
    create table temp_one
           id number(30),  
          placeid varchar2(400),
          issuedate  date,
          person varchar2(400),
          failures number(30),
          primary key(id)
    insert into temp_one values (1, 'NY', to_date('03/04/2011', 'MM/DD/YYYY'), 'John', 3);
    insert into temp_one values (2, 'NY', to_date('03/03/2011', 'MM/DD/YYYY'), 'Adam', 7);
    insert into temp_one values (3, 'Mexico', to_date('03/04/2011', 'MM/DD/YYYY'), 'Wendy', 3);
    insert into temp_one values (4, 'Mexico', to_date('03/14/2011', 'MM/DD/YYYY'), 'Gerry', 3);
    insert into temp_one values (5, 'Mexico', to_date('03/15/2011', 'MM/DD/YYYY'), 'Zick', 9);
    insert into temp_one values (6, 'London', to_date('03/16/2011', 'MM/DD/YYYY'), 'Mike', 8);this is output I desire
    placeid       issueperiod                               failures
    NY              02/28/2011 - 03/06/2011          10
    Mexico       02/28/2011 - 03/06/2011           3
    Mexico        03/14/2011 - 03/20/2011          12
    London        03/14/2011 - 03/20/2011          8All help is appreciated. I will post my query as soon as I am able to think of a good logic for this...

    hI,
    user13328581 wrote:
    ... Kindly note, I am still learning how to use analytic functions.That doesn't matter; analytic functions won't help in this problem. The aggregate SUM function is all you need.
    But what do you need to GROUP BY? What is each row of the result set going to represent? A placeid? Yes, each row will represent only one placedid, but it's going to be divided further. You want a separate row of output for every placeid and week, so you'll want to GROUP BY placeid and week. You don't want to GROUP BY the raw issuedate; that would put March 3 and March 4 into separate groups. And you don't want to GROUP BY failures; that would mean a row with 3 failures could never be in the same group as a row with 9 failures.
    This gets the output you posted from the sample data you posted:
    SELECT       placeid
    ,             TO_CHAR ( TRUNC (issuedate, 'IW')
                  , 'MM/DD/YYYY'
                ) || ' - '|| TO_CHAR ( TRUNC (issuedate, 'IW') + 6
                                             , 'MM/DD/YYY'
                               )     AS issueperiod
    ,       SUM (failures)                  AS sumfailures
    FROM        temp_one
    GROUP BY  placeid
    ,            TRUNC (issuedate, 'IW')
    ;You could use a sub-query to compute TRUNC (issuedate, 'IW') once. The code would be about as complicated, efficiency probably won't improve noticeably, and the the results would be the same.

  • Unable to use my numbers pad on the right.

    How can I correct the problem.
    Thankks

    I have a similar problem with some of my customers.  After upgrading to Adobe XI, they can no longer use the number pad to enter information.  The numbers above the keyboard work fine.  They are on Windows 7 and IE.  They are trying to enter information into a fillable forms or .fdf file.  I have read that the Touch Mode can be causing this but I have had them go in and disable touch mode in Reader.  Any thoughts?
    Thanks

  • What are the entities that can be re-used in different servers, SI App, SI instance? And how?

    Greetings,
    What are the entities that can be re-used in different servers, SI App, SI instance? And how?
    e.g. can I use a deployed IQStreamable@app1  into app2?
    can I use a deployed observable/app1/siInstance1/Server1 into another query/app3/siInstance3/server2?
    On the presentation titled "04 – Installing, Deploying and Maintaining the SQL Server 2008 R2 StreamInsight Runtime Engine" with file name SQL10R2UPD05-DECK-04.pptx on ecn.channel9.msdn.com/o9/learn/SQL2008R2TrainingKit/Presentations/SQL10R2UPD05-DECK-04/SQL10R2UPD05-DECK-04.pptx
    It is mentioned one of the deployment option is "Deployment: Standalone Server"
    and it mention the following:
    "Use this option for the following scenarios:
    - Metadata objects need to be shared between applications
      - Event Types
      - Adapter Types
      - Query Templates
    - A data source registered with the server provides an event stream for another existing application"
    Could you please provide good example that explain the above statement?
    Cheers, Muhammad

    First, that statement - and those materials - refer to the "legacy" StreamInsight query/adapter model. They do not refer to how things work with the Reactive model introduced in version 2.1. Specifically, it talks about Dynamic Query Composition (DQC).
    You cannot use a deployed Observable in another instance of StreamInsight. You may be able to use them across applications in the same instance - off the top of my head, I'm not sure. I'm getting ready to get on a plane but will take a look at it later.
    Typically, however, applications act as containers (comparable to .NET AppDomains) so I don't think that you'd be able to do this easily. That said, the code and assemblies
    can be reused across multiple instances/applications. You would have separate instances of the classes involved but you would be able to reuse the query logic. That's a common use case.
    Can you be more specific about your use case and what you are trying to accomplish here? It's possible that there are alternative ways to do what you are trying to do.
    DevBiker (aka J Sawyer)
    Microsoft MVP - Sql Server (StreamInsight)
    If I answered your question, please mark as answer.
    If my post was helpful, please mark as helpful.

  • How to use INVOKE function with INT parameter types

    Can you tell me how to use invoke function with int parameter type ?

    Pass the int as an Integer.

  • [JS] [CS3] Finding the longest instance of a paragraph style

    I'm pretty new to JS but I'm trying to write a script that will return the longest instance of each paragraph style in a manuscript (which has been imported into InDesign). Currently, my script lists all the paragraph styles found in the document and puts them in a new document. My next thought was to loop through the style names array and find the longest instance.
    Could anyone point me in the right direction on how to do this?
    Any help is much appreciated. I'm learning a lot reading this forum.

    Your question is slightly ambiguous. Do you mean you are looking for the longest instance of a paragraph in that paragraph style? That's the most likely meaning. Or are you looking for the longest run of text in that style? Because that's what you'll find if you're not careful in your script.
    The essence of the script would be:
    1. Setup a FindText for the paragraph style in question (or each style if you're looping through them all).
    setupFindText(); // use function to setup the find -- search this forum on setupFindText to find it
    app.findTextPreferences.appliedParagraphStyle = myStyle; // where myStyle is the style in question
    2. Issue the find getting all the references into a variable.
    var myFinds = app.documents[0].findText();
    3. Loop through all the finds to locate the longest paragraph.
    var longestLength = 0;
    var longestPara = null;
    for (var j = myFinds.length - 1; j >= 0; j--) {
         myParas = myFinds[j].paragraphs;
         for (var k = myParas.length - 1; k >= 0; k--) {
              myPara = myParas[k];
              if (myPara.length > longestLength) {
                   longestLength = myPara.length;
                   longestPara = myPara;
    4. Make sure that longestPara is not null (no instances found); If not, then longestPara is a reference to the longest instance
    Dave

Maybe you are looking for

  • Upgrade 4.2.1 to 4.3.5

    How I culd upgrade my actual version (4.2.1) to the new one (4.3.5)? I have an iPhone 3G third generation and when a try to upgrade the version in iTunes I recived a message that said that I have the last version.

  • Not rejecting unknown users on Submit channel

    I am running Java Communications Suite 6.3(2) on a single system. Currently, when one of my customers sends an email (from a thick client) through the Submit port, and one of the addresses is to an invalid address in a domain on this server, the cust

  • After installing Mavericks, I have intermittent problems working with Wacom Intuos 4 and bluetooth keyboard.

    I use Photoshop extensively with a Wacom Intuos 4 and Apple bluetooth keyboard, and have had no problems (as below) before. Each time I use the tablet, the keyboard gets intermittently unresponsive, and it will only respond again after I tap the tabl

  • Unable to view PDFs (no permission)

    After installing the latest security patch to OSX Mavericks (10.9.5) I cannot open any of the PDF files I had previously saved because I "don't have permission to view it" but when I Get Info on them I supposedly can read and write each file.  There

  • Mac OSX Lion 10.7.3 finder issue

    When I used file>place, the files are greyed out in my finder, until I select "enable all readable files" in the bottom of finder window. In PS5, this does not occur. How to I make enable the default setting in PS6?