JDeveloper 12.c: POJO DataControl List String

Hi
This might be a silly question but I am struggling to make this simple example work. Basically, I have exposed a POJO as Data Control, and it has on public method to retrieve a list of Strings.
The issue is that the dataControl shows the myList collection and inside just one attribute "element".
I can't manage to iterate over the strings. Even if I drag and drop the collection as a table, when I run the page I get errors like:
Name element not found in the given object: "My Stringssss" - for each string.
I know this is silly but can you help??
Regards

Hi, a String is a data type but not an updateable object. Try public class StringObject(   private String name;   public void setName(String name){this.name = name;}   public String getName(){return this.name;} ) public class MyPojoDC( ArrayList al = new ArrayList(); setter... getter... ) Frank

Similar Messages

  • Save point with POJO DataControl not saving model state

    Hi Guys,
    JDEV 11.1.1.6 64bit
    I was able to get save points working with ADF BC (AppMod, View & Entity objects)
    but when I tried to do the exact same with Pojo DataControls, I won't save
    the current state of the model - meaning things are not "selected" to the
    proper record when the SP is restored. I don't get any errors, it just
    shows the wrong data.
    Example:
    The BTF is marked as must have transaction(tried either way), but this is Pojo, and doesn't support Trx.
    edit-emp-dept.jspx (with BTF Region)
    BTF START
        STEP 1: RichTable with bindings to Pojo DataControl (value="#{bindings.allDepts.collectionModel}")
                     (user selects the 3 record => sales department)
        STEP 2: Edit Sales Dept & on click to next step create SP
        STEP 3: View Emps (Rich Table of ALL emps in that DEPT)
        STEP 4: Edit Emp
        FINAL: COMMIT (save to pojo list) or CANCEL (don't save to pojo list)
    /BTF END
    At STEP 1 -> STEP 2, the SP is created, and when I close the browser at STEP2, 3  or 4, and
    restart, and choose SP to restore, it takes me to proper page (STEP 2)  but the wrong Department is
    selected to edit (it shows "Finance" instead of "Sales") & if I hit my ADF back button, it shows
    the table with "finance" selected.  In the ADF BC world it works perfectly.
    I know the docs say: the ADF Model is saved, so the question is why bindings.allDepts.collectionModel
    not "saved" here for Pojo DC and the ADF BC af:table value="#{bindings.DepartmentsView1.collectionModel}"
    it is "saved".
    Thanks for any insight or work-around.
    Sincerely,
    Joel
    edit-emp-dept.jspx:
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document id="d1">
          <af:form id="f1">
            <af:region value="#{bindings.btfpojodc1.regionModel}" id="r1"/>
          </af:form>
        </af:document>
      </f:view>
    </jsp:root>

    Hi,
    the problem with POJO DC and other non-ADF BC models is that they don't passivate their state. In JDeveloper 12c we allow developers to extend their POJO classes with ADF lifecycle methods that allows them to save the model state themselves. Its a known issue that the transaction state cannot be saved for non-ADF BC models. I checked the bug database for bugs filed against this behavior but could not find one- I can imagine that with 12c we would have a chance to allow developers to handle passivation / activation for non-ADF BC model states. So if this is a feature you need then filing an enhancement request would make sense
    Frank

  • Collect data and post change-events using POJO datacontrol

    How can I get users of my POJO datacontrol to get changed data from the datacontrol. The datacontrol will receive new data from some source ? I'm able to create a datacontrol from a POJO java class easy enough. However, is there an example showing how to create a datacontrol that receives data from some source and updates users of the datacontrol?
    Thanks
    Travis

    Yes, I want to push new data to the client without the client specifically requesting the data. I suspect the datacontrol will have to fire an some event and the client has a listener for that event.
    The datacontrol will receive data from a device, such as a barcode scanner, in the form of a string of text. The datacontrol will provide the data via one or more attributes (i.e. fields) such as "Product ID", "Expiration Date", etc.

  • How can i get also the files in the root directory and how can i for testing add items of IEnumerable FTPListDetail to List string ?

    What i get is only the directories and files that in other nodes. But i have also files on the root directory and i never
    get them. This is a screenshot of my program after i got the content of my ftp. I'm using treeView to display my ftp content:
    You can see two directories from the root but no files on the root it self. And in my ftp server host i have files in the root direcory.
    This is the method i'm using to get the directory listing:
    public IEnumerable<FTPListDetail> GetDirectoryListing(string rootUri)
    var CurrentRemoteDirectory = rootUri;
    var result = new StringBuilder();
    var request = GetWebRequest(WebRequestMethods.Ftp.ListDirectoryDetails, CurrentRemoteDirectory);
    using (var response = request.GetResponse())
    using (var reader = new StreamReader(response.GetResponseStream()))
    string line = reader.ReadLine();
    while (line != null)
    result.Append(line);
    result.Append("\n");
    line = reader.ReadLine();
    if (string.IsNullOrEmpty(result.ToString()))
    return new List<FTPListDetail>();
    result.Remove(result.ToString().LastIndexOf("\n"), 1);
    var results = result.ToString().Split('\n');
    string regex =
    @"^" + //# Start of line
    @"(?<dir>[\-ld])" + //# File size
    @"(?<permission>[\-rwx]{9})" + //# Whitespace \n
    @"\s+" + //# Whitespace \n
    @"(?<filecode>\d+)" +
    @"\s+" + //# Whitespace \n
    @"(?<owner>\w+)" +
    @"\s+" + //# Whitespace \n
    @"(?<group>\w+)" +
    @"\s+" + //# Whitespace \n
    @"(?<size>\d+)" +
    @"\s+" + //# Whitespace \n
    @"(?<month>\w{3})" + //# Month (3 letters) \n
    @"\s+" + //# Whitespace \n
    @"(?<day>\d{1,2})" + //# Day (1 or 2 digits) \n
    @"\s+" + //# Whitespace \n
    @"(?<timeyear>[\d:]{4,5})" + //# Time or year \n
    @"\s+" + //# Whitespace \n
    @"(?<filename>(.*))" + //# Filename \n
    @"$"; //# End of line
    var myresult = new List<FTPListDetail>();
    foreach (var parsed in results)
    var split = new Regex(regex)
    .Match(parsed);
    var dir = split.Groups["dir"].ToString();
    var permission = split.Groups["permission"].ToString();
    var filecode = split.Groups["filecode"].ToString();
    var owner = split.Groups["owner"].ToString();
    var group = split.Groups["group"].ToString();
    var filename = split.Groups["filename"].ToString();
    var size = split.Groups["size"].Length;
    myresult.Add(new FTPListDetail()
    Dir = dir,
    Filecode = filecode,
    Group = group,
    FullPath = CurrentRemoteDirectory + "/" + filename,
    Name = filename,
    Owner = owner,
    Permission = permission,
    return myresult;
    And then this method to loop over and listing :
    private int total_dirs;
    private int searched_until_now_dirs;
    private int max_percentage;
    private TreeNode directories_real_time;
    private string SummaryText;
    private TreeNode CreateDirectoryNode(string path, string name , int recursive_levl )
    var directoryNode = new TreeNode(name);
    var directoryListing = GetDirectoryListing(path);
    var directories = directoryListing.Where(d => d.IsDirectory);
    var files = directoryListing.Where(d => !d.IsDirectory);
    total_dirs += directories.Count<FTPListDetail>();
    searched_until_now_dirs++;
    int percentage = 0;
    foreach (var dir in directories)
    directoryNode.Nodes.Add(CreateDirectoryNode(dir.FullPath, dir.Name, recursive_levl+1));
    if (recursive_levl == 1)
    TreeNode temp_tn = (TreeNode)directoryNode.Clone();
    this.BeginInvoke(new MethodInvoker( delegate
    UpdateList(temp_tn);
    percentage = (searched_until_now_dirs * 100) / total_dirs;
    if (percentage > max_percentage)
    SummaryText = String.Format("Searched dirs {0} / Total dirs {1}", searched_until_now_dirs, total_dirs);
    max_percentage = percentage;
    backgroundWorker1.ReportProgress(percentage, SummaryText);
    percentage = (searched_until_now_dirs * 100) / total_dirs;
    if (percentage > max_percentage)
    SummaryText = String.Format("Searched dirs {0} / Total dirs {1}", searched_until_now_dirs, total_dirs);
    max_percentage = percentage;
    backgroundWorker1.ReportProgress(percentage, SummaryText);
    foreach (var file in files)
    TreeNode file_tree_node = new TreeNode(file.Name);
    file_tree_node.Tag = "file" ;
    directoryNode.Nodes.Add(file_tree_node);
    numberOfFiles.Add(file.FullPath);
    return directoryNode;
    Then updating the treeView:
    DateTime last_update;
    private void UpdateList(TreeNode tn_rt)
    TimeSpan ts = DateTime.Now - last_update;
    if (ts.TotalMilliseconds > 200)
    last_update = DateTime.Now;
    treeViewMS1.BeginUpdate();
    treeViewMS1.Nodes.Clear();
    treeViewMS1.Nodes.Add(tn_rt);
    ExpandToLevel(treeViewMS1.Nodes, 1);
    treeViewMS1.EndUpdate();
    And inside a backgroundworker do work how i'm using it:
    var root = Convert.ToString(e.Argument);
    var dirNode = CreateDirectoryNode(root, "root", 1);
    e.Result = dirNode;
    And last the FTPListDetail class:
    public class FTPListDetail
    public bool IsDirectory
    get
    return !string.IsNullOrWhiteSpace(Dir) && Dir.ToLower().Equals("d");
    internal string Dir { get; set; }
    public string Permission { get; set; }
    public string Filecode { get; set; }
    public string Owner { get; set; }
    public string Group { get; set; }
    public string Name { get; set; }
    public string FullPath { get; set; }
    Now the main problem is that when i list the files and directories and display them in the treeView it dosen't get/display
    the files in the root directory. Only in the sub nodes.
    I will see the files inside hello and stats but i need also to see the files in the root directory.
    1. How can i get and list/display the files of the root directory ?
    2. For the test i tried to add to a List<string> the items in var files to see if i get the root files at all.
       This is what i tried in the CreateDirectoryNode before it i added:
    private List<string> testfiles = new List<string>();
    Then after var files i did:
    testfiles.Add(files.ToList()
    But this is wrong. I just wanted to see in testfiles what items i'm getting in var files in the end of the process.
    Both var files and directoryListing are IEnumerable<FTPListDetail> type.
    The most important is to make the number 1 i mentioned and then to do number 2.

    Risa no.
    What i mean is this. This is a screenshot of my ftp server at my host(ipage.com).
    Now this is a screenshot of my program and you can see that in my program i have only the directories hello stats test but i don't have the files in the root: htaccess.config swp txt 1.txt 2.png....all this files i don't have it on my treeView.
    What i want it to be is that on my program on the treeView i will also display the files like in my ftp server.
    I see in my program only the directories and the files in the directories but i don't see the files on the root directory/node.
    I need it to be like in my ftp server i need to see in my program the htaccess 1.txt 2.png and so on.
    So what i wrote in my main question is that in the var files i see this files of the root directory i just don't know to add and display them in my treeView(my treeView is treeViewMS1).
    I know i checked in my program in the method CreateDirectoryNode i see in the first iteration of the recursive that var files contain this root files i just dont know how to add and display them in my treeView.
    On the next iterations when it does the recursive it's adding the directories hello stats test and the files in this directories but i need it to first add the root files.

  • How to use List String in JSP page?

    Hello All,
    I am having problem using List<String> in my JSP page. Below is my JSP code.
    <%@ page import="java.util.*, java.io.*"%>
    <html>
    <body>
    <h1 align="center">Beer Recommendations JSP</h1>
    <p>
    <%
    List<String> beerBrands = (List<String>)request.getAttribute("styles");
    Iterator<String> it = beerBrands.iterator();
    while(it.hasNext()){
         out.print("<br>try: " + it.next());
    %>
    </body>
    </html>
    When I compile the above JSP code in Eclipse 3.4 (using JBoss 4.2 as my Application Server), I get the following Warning.
    Type safety: Unchecked cast from Enumeration to Enumeration<String>
    If I add the "@SuppressWarnings("unchecked")" to the code, Eclipse does not give any Error during compilation. But, at runtime, I get the following Error.
    org.apache.jasper.JasperException: Unable to compile class for JSP:
    An error occurred at line: 10 in the jsp file: /BeerAdvice.jsp
    Syntax error, annotations are only available if source level is 5.0
    7: <p>
    8:
    9: <%
    10: @SuppressWarnings("unchecked")
    11: List<String> beerBrands = (List<String>)request.getAttribute("styles");
    12: Iterator<String> it = beerBrands.iterator();
    13: while(it.hasNext()){
    An error occurred at line: 11 in the jsp file: /BeerAdvice.jsp
    The type List is not generic; it cannot be parameterized with arguments <String>
    8:
    9: <%
    10: @SuppressWarnings("unchecked")
    11: List<String> beerBrands = (List<String>)request.getAttribute("styles");
    12: Iterator<String> it = beerBrands.iterator();
    13: while(it.hasNext()){
    14:      out.print("<br>try: " + it.next());
    An error occurred at line: 11 in the jsp file: /BeerAdvice.jsp
    Syntax error, parameterized types are only available if source level is 5.0
    8:
    9: <%
    10: @SuppressWarnings("unchecked")
    11: List<String> beerBrands = (List<String>)request.getAttribute("styles");
    12: Iterator<String> it = beerBrands.iterator();
    13: while(it.hasNext()){
    14:      out.print("<br>try: " + it.next());
    Any help is very much appreciated.
    Thank you for your help.
    Thanks,
    Chubha

    Hi anotherAikman,
    Thank you for your help. I currently have the following version of the Java.
    {color:#800000}java version "1.6.0_17"
    Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
    Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing)
    {color:#000000}{color:#000000}Does it mean I have Java SE Version 6 Update 17 and you are suggesting me to download the Java EE Version 6?{color} If this is correct, can you please let me know what difference does it make?
    I am now going to install the Java EE 6 and try this out.
    Thank you for your help.{color}
    {color:#000000}Thanks,
    Chubha{color}
    {color}

  • What does and mean in "List String "?

    Anyone familiair with this line:
    List<String> list = new ArrayList<String>(c)what does the "<String>" part precisely mean? I've been through the documentation, but I've not been able to find out what those "<" and ">" represent. Now I know that brackets ("[ ]") are used for arrays, but I doubt wether it's an principal equallity.
    So if someone knows its true meaning and/or has a nice URL for me to glance through some nice documentation...
    Thanks in advance!
    Tensos

    too late, it already did... seeing the code below (encountered in the general
    documentation), I'm afraid you're right...
    Object[] toArray();
    <T> T[] toArray(T[] a);An extra functionality is fine with me, but it is a
    pity that it doesn't make the code more easy readible
    (yet).It's easy to read once you get used to it, and I don't know how they would have been able to add generics with a syntax which is easier to understand, and yet is compact.
    Kaj

  • Returning List String or String[][] in JNI

    Hi,
    I am calling a native function in C++ from Java which has to return List<String> or String[][]. Is this possible?
    The java declaration is - private native List<String> GetListNative();
    In C++ the declaration is:
    JNIEXPORT jobject JNICALL Java_com_GetListNative
    (JNIEnv *env, jobject obj);
    Please help!
    Thanks in advance...
    Message was edited by:
    arjundg

    try treating String[][] as array of arrays of strings
    I mean consider your 2D array as a 1D array and each of its elements is an array of Strings
    I think this will work

  • SharePoint Btach Process with List string items into list

    Hi 
    I have a List<string> with 8000 elements.
    I need to take 1000 everytime and run the batch process to insert data into list.
    I cant apply all 8000 items in one shot.
    Can you please suggest me that how  i can query List<string> and execute.
    Thanks
    Siddartha

    You need to use Skip and Take methods of your object collection.
    Example:
    list.Skip(1000).Take(1000)
    This would skip the first 1000 and take the next 1000.
    You'd just need to increase the amount skipped with each call
    List<string> list = new List<string>();
    //Code to get 8000 elements
    for (int index = 0; index < 8; index++)
    List<string> batchList = GetBatch(index, list);
    //Code to insert data into list
    And here is the GetBatch method...
    public List<string> GetBatch(int pageNumber, List<string> list)
    return list.Skip(pageNumber * 1000).Take(1000);
    I found the answer
    here.

  • Statements like 'List String .class' cause error.

    Consider the following simple code:
        Class<List<String>> cl;
        cl=List<String>.class;The first line is valid but the second one causes the "illegal start of expression" error.
    That's rather strange: the type
    Class<List<String>>is valid itself, but variables of that type cannot be assigned via the ".class" expression.
    Is this a bug or I am missing something?
    Thanks.

    Java generics aren't C++ templates; they don't cause new classes to be created based on parameter type.
    What this means is that for types...
    List<String> stringList = new ArrayList<String>();
    List<Number> numberList = new ArrayList<Number>();...the class of those lists is, in both cases, java.util.ArrayList...
    string.getClass().equals(ArrayList.class);
    numberList.getClass().equals(ArrayList.class);Neither class ArrayList<String> nor class ArrayList<Number> exist, because such generics information is wiped out at runtime. That's why an expression like...
    ArrayList<Number>.class...is illegal.

  • IntialContext.list(String args) not implemented in iAS 6.5 Any other workarounds?

    Hi,
    I tried using initialContext.list(string) method and I got OperationNotSupported exception. Looks like its not implemented in iAS 6.5. Is there any other way I can obtain a list of the JNDI tree ? How about any proprietary APIs ?
    thanks,
    sreenivas

    When you drop something onto a spark List you need to provide a non null dragSource in the "itemsByIndex" format, if you change your code to something like this it should work:
                protected function draggableLabel_mouseDownHandler(event:MouseEvent):void {
                    // make some data to pass to the List
                    var someData:Vector.<Object> = new Vector.<Object>();
                    someData.push("hello world");
                    // List expects drag data with "itemsByIndex" format
                    var dragData:DragSource= new DragSource();
                    dragData.addData(someData, "itemsByIndex");
                    DragManager.doDrag(event.currentTarget as IUIComponent,dragData,event);

  • Another Tutorial Error? List String [] lsa = new List ? [10];

    Quote from Gilad Bracha's tutorial:List<String>[] lsa = new List<?>[10]; // unchecked warning - this is unsafeAt least with jdk 1.5.0_01 it does not compile at all, but gives compile error "incompatioble types. found java.,util.List<?>[]. reuired java.util.List<java.lang.String>".
    This one however gives an unchecked warning:List<String>[] lsb = (List<String>[]) new List<?>[10];

    An error in the tutorial. Thanks for noticing. I've told Gilad.

  • JPA2 Question: Is it possible to map a Map(enum, List String ) in JPA2?

    Is it possible to map a Map(enum, List<String>) in JPA2? Or do I have to create a separate Entity class that maps each List<String> collections for each possible value in the enum?
    Edited by: user7976113 on Jan 22, 2010 7:51 PM
    Edited by: user7976113 on Jan 22, 2010 7:51 PM

    No, JPA does not support this or any nested collection type of mappings directly.
    The best solution is to create an Entity or Embeddable to contain the collection data.
    See,
    http://en.wikibooks.org/wiki/Java_Persistence/Relationships#Nested_Collections.2C_Maps_and_Matrices
    James : http://www.eclipselink.org

  • Traversing var of type List List String

    hello all,
    i hope someone can help me with this little problem.
    im still a newbie on java devt.
    the problem is, i have retrieved some records from a database
    and i am trying to display it on a table. but i am having some issues
    with traversing the info returned to me, which is of type List<List<String>>.
    im using SWT by the way.
    here is the code snippet of my function:
    ================================
    * Displays the search result on the table
    * @param searchResult - search result returned after db query
    public void populateTable (List<List<String>> searchResult) {
    logger_.debug("===SearchView::populateTable()=== - START");
    logger_.debug("searchResult received: " + searchResult.toString());
    //traverse rows
    List <String> row = new ArrayList<String>();
    for (int i = 0; i < searchResult.size(); ++i) {
    row = searchResult.get(i);
    logger_.debug("row value: " + row);
    if ( (row != null) && (!row.isEmpty()) ) {
    //get row attribs
    String custId = row.get(0);
    String custName = row.get(1);
    String custAdd = row.get(2);
    String custContact = row.get(10);
    String custPhone = row.get(11);
    TableItem tableItem = new TableItem(searchTable_, SWT.NONE);
    tableItem.setText( new String[] { custId, custName, custAdd, custContact, custPhone } );
    logger_.debug("===SearchView::populateTable()=== - END");
    ================================
    thanks,
    doods

         * Displays the search result on the table
         * @param searchResult
        public void populateTable (List<List<String>> searchResult) {
            logger_.debug("===SearchView::populateTable()=== - START");
            logger_.debug("searchResult received " + searchResult.toString());
            logger_.debug("searchResult.size() = " + searchResult.size());
            //traverse rows
            List <String> row = new ArrayList<String>();
            for (int i = 0; i < searchResult.size(); ++i) {
                row = searchResult.get(i);
                logger_.debug("row value: " + row);
                if ( (row != null) && (!row.isEmpty()) ) {
                    //get row attribs
                    String custId = row.get(0);
                    String custName = row.get(1);
                    String custAdd = row.get(2);
                    String custContact = row.get(10);
                    String custPhone = row.get(11);
                    TableItem tableItem = new TableItem(searchTable_, SWT.NONE);
                    tableItem.setText( new String[] { custId, custName, custAdd, custContact, custPhone } );
    //        Iterator <List<String>> iter = searchResult.iterator();
    //        List <String> row = new ArrayList<String>();
    //        while (iter.hasNext()) {
    //            row = iter.next();
    //            String custId = row.get(0);
    //            String custName = row.get(1);
    //            String custAdd = row.get(2);
    //            String custContact = row.get(10);
    //            String custPhone = row.get(11);
    //            logger_.debug(row.toString());
    //            logger_.debug(row.size());
    //            TableItem tableItem = new TableItem(searchTable_, SWT.NONE);
    //            tableItem.setText( new String[] { custId, custName, custAdd, custContact, custPhone } );
            logger_.debug("===SearchView::populateTable()=== - END");
        }sorry bout the code formatting.
    i have already tried using the iterator but it doesn't work.
    is this the right way to use the iterator?
    i commented it out already.
    basically, the searchResult returns 3 rows,
    when i try to print the records on the table, it displays 3 rows
    but the info on those 3 rows are all from the first row.
    ex: row1 = doods, 123, aaa
    row2 = doodies, 333, bbb
    row3 = doodles, 444, ccc
    whats printed on the table:
    doods, 123, aaa
    doods, 123, aaa
    doods, 123, aaa

  • C# SSIS Script component - Save List String to Object package-scope variable and read it in Script Task

    before posting this i was searching this on internet but was not able to find info regarding my specific case:
    i have a DataFlow Task with "Error output" pointing from FlatFile to
    Script Component that does below (variable "ErrorMessageList" is listed under ReadWriteVariables property):
    List<string> lsErrors = new List<string>();
    public override void Input0_ProcessInputRow(Input0Buffer Row)
    lsErrors.Add("test1");
    lsErrors.Add("test2");
        void PostExecute()
            base.PostExecute();
            Variables.ErrorMessageList = lsErrors;
    Then the DataFlow points to a ScriptComponent where this object variable is listed under ReadOnlyVariables property and does the below:
    public void Main()
    List<string> lsErrors = (List<string>)Dts.Variables["ErrorMessageList"].Value;
    and that is where i get exception-has-been-thrown-by-the-target-of-an-invocation
    What is wrong here?
    (i have mistakenly edited this first post before, so i tried to manually put it back to original version)

    i have missed the "override" keyword...
    public class ScriptMain : UserComponent
    public class UserComponent: ScriptComponent
    namespace Microsoft.SqlServer.Dts.Pipeline
    public class ScriptComponent
    // i should have seen this before
    public virtual void PostExecute();
    i believe i must have deleted the PostExecute method definition right after the ScriptComponent generated the script for me... and then when i've realized that i can't change ReadWriteVariables as a part of:
    public override void Input0_ProcessInputRow(Input0Buffer Row)
    // --- can't change ReadWriteVariables here
    then i had to add the method back but forgot that the base method is virtual
    thanks for this hint, Russ!

  • Any way to assign value for  variable of type Class List String ?

    I'm puzzled why I can declare a variable:
    Class<List<String>> clazz;but I cannot assign a value to it as
    clazz = List<String>.class;The compiler also complains about
    Class<List<?>> clazz0 = List<?>.class;yet it has the nerve to warn about raw types when I give up and use
    Class<List> clazz0 = List.class;Even using a dummy instance does not work.
            List<String> dummy = new ArrayList<String>();
            Class<List<String>> clazz1 = dummy.getClass();I only care because I've declared a method like
    public String useless( Class<List<String>> unSetable){
      return  unSetable.getName();
    }And now there seems to be no way to call it.

    Hello chymes,
    there is no way to get an instance of Class<List<String>> without at least one unchecked warning. Otherwise you could get away with the following:
    List<Integer> ints = new ArrayList<Integer>();
    Class<List<String>> clazz = List<String>.class;
    List<String> strings = clazz.cast(ints);
    strings.add("No Good");
    int i = ints.get(0); // CCETherefore the only way to get it is via unchecked cast:
    Class<List<String>> clazz = (Class<List<String>>) (Object) List.class;With kind regards
    Ben

Maybe you are looking for

  • HT1414 If I Restore my iPod Touch, will I be able to restore to a backup afterwards (in the process of updating to iOS 5 in the event of error code -43)

    I have just got ready to sync to a new computer (my old one got restored and all backups were lost ) and update to iOS 5. I finally manage to recreate my old iTunes library on my new computer and transfer my purchases, sync my iPod an dback it up. Wi

  • CD/DVD drive is dead (+ some more)

    My CD/DVD combo drive is dead, and I'm looking for a do-it-yourself fix. Some important notes (maybe): -It started with a CD getting stuck in the tray during one of my many logic board freezes. When I restarted the computer, the CD wouldn't come out,

  • Messages in TBD status in RWB  IE message monitoring

    Hi I have messages in TBD status in RWB message monoitoring and log version of messages displayed in SXMB_MONI. I understand that restarting XI_AF_MESSAGING from NWA will flush out the queue , However would like to understand 1. Once flushed out,  wi

  • Problems with Unicode in extending JCo with JNI/librfc

    Hello, Problem: We are using JCo for communication with a SAP-System. We have an extension written in C using JNI for handling callbacks. Let's call it cb.dll. This extension is not unicode enabled. Now we have to connect to an unicode SAP-System. We

  • ALV In back ground

    Hi Friends,               I am running ALV list in background. Output is coming , but some of the columns are getting truncated in output. which mean it was not showing all the out put. i am having 16 columns, but it is showing only 12 fields in full