How to test and cast an object to a generic

Hi all,
my problem is the following:
I have a list of notifications from a transaction listener of the Eclipse Modeling Framework.
Each element of that list is of type Notification, but I have to cast it to something else to work with it since it is pretty useless by itself.
I need to test if it is a certain generic type (+NotifyingListImpl<?>+) but of course I can't use the instanceof test. Is there a way to solve the problem?
Bear in mind that I googled a lot and tried a lot of solutions without success before asking this question (which I hope it is a piece of cake for an
java expert :-) )
As a side problem I don't know the actual type of the generic since I gathered all the information using the Eclipse debug, and the debug
says my notification is of type NotifyingListImpl$1, I figured out the parameter of that type is ResourceImpl since the inspection of the
notification's list of fields contains a this$0 of that type. Is my intuition about the Eclipse debug correct?

I need to test if it is a certain generic type (+NotifyingListImpl<?>+) but of course I can't use the instanceof test.Yes you can:
if (object instanceof NotifyingListImpl) { ... }
As a side problem I don't know the actual type of the genericYou can't. It is erased to the lower bound at compile time.
since I gathered all the information using the Eclipse debug, and the debug
Is my intuition about the Eclipse debug correct?It has nothing to do with Eclipse debug. The information isn't available. It was erased by the compiler.

Similar Messages

  • ICal Server email invitations - how to test and get this feature working

    iCal Server email invitations - how to test and get this feature working
    Thanks Apple for introducing this nice little feature into iCal but then completely neglecting to write any sort of useful manual that can explain what to do when it doesn't work after you set it up for the first time.
    At long, long last we have finally got there after about 6 months of fiddling on and off, so I thought I had better post up the process since many have similar issues and it is hard to ascertain what is going on.
    Using an external email server was just a waste of time and it still wouldn't handle the replies properly even though it was supposed to handle '+addressing'. In the end I set up a special gmail account for the iCal server and finally got it working. I list here the process of configuring and testing the system to check that each little stage is working.
    Set up a Gmail account in Apple Mail to access and test in the usual way for any email account (e.g. [email protected].);
    Set the iCal server email to access the same email using the following settings:
    IMAP
    SMTP
    [email protected]
    smtp.gmail.com
    Port: 993 [x] Use SSL
    Port: 587 [x] Use SSL
    User & Pwd
    Login
    User & Pwd
    To test the settings:
    send out a test email from Apple Mail to a non-server email address that you can access to check it has been received;
    send out a test email from your non-server email account to [email protected] and check that it is received;
    this tells you that the GMail account is setup correctly and working
    Testing iCal:
    I noted that iCal was deleting any emails that arrive in the inBox in Apple Mail as soon as they arrived (this is to be expected);
    test that the invites are being sent from iCal by setting an event in iCal and inviting your non-server address (you may not see any sign of this in Apple Mail but you should catch it in the iCal server log and possibly in the Gmail sent mail box);
    check that the invite is received at your non-server account and Accept it in iCal on another machine - the reply is automatically sent back;
    the replies appear in Apple Mail but are quickly deleted by iCal. But their record for you to see is left in Gmail under 'All Mail';
    Accepted invites appear as a notification button on the top left hand bar on iCal where you click to acknowledge them and then the attendee is shown as a green circled tick instead of a grey circled ?.
    this shows that iCal invitations are working correctly. Whenever an event is updated, all invitees should be updated by email automatically.
    I hope this helps anyone - I could certainly have done with something similar when I started with looking at this.
    Anatole
    The Error and Access logfile in the Server app under iCal server are very useful in determining any errors. I got lots of imip errors when I didn't quite have the settings right. The port is critical and it won't tell you this is the problem if it fails.

    iCal Server email invitations - how to test and get this feature working
    Thanks Apple for introducing this nice little feature into iCal but then completely neglecting to write any sort of useful manual that can explain what to do when it doesn't work after you set it up for the first time.
    At long, long last we have finally got there after about 6 months of fiddling on and off, so I thought I had better post up the process since many have similar issues and it is hard to ascertain what is going on.
    Using an external email server was just a waste of time and it still wouldn't handle the replies properly even though it was supposed to handle '+addressing'. In the end I set up a special gmail account for the iCal server and finally got it working. I list here the process of configuring and testing the system to check that each little stage is working.
    Set up a Gmail account in Apple Mail to access and test in the usual way for any email account (e.g. [email protected].);
    Set the iCal server email to access the same email using the following settings:
    IMAP
    SMTP
    [email protected]
    smtp.gmail.com
    Port: 993 [x] Use SSL
    Port: 587 [x] Use SSL
    User & Pwd
    Login
    User & Pwd
    To test the settings:
    send out a test email from Apple Mail to a non-server email address that you can access to check it has been received;
    send out a test email from your non-server email account to [email protected] and check that it is received;
    this tells you that the GMail account is setup correctly and working
    Testing iCal:
    I noted that iCal was deleting any emails that arrive in the inBox in Apple Mail as soon as they arrived (this is to be expected);
    test that the invites are being sent from iCal by setting an event in iCal and inviting your non-server address (you may not see any sign of this in Apple Mail but you should catch it in the iCal server log and possibly in the Gmail sent mail box);
    check that the invite is received at your non-server account and Accept it in iCal on another machine - the reply is automatically sent back;
    the replies appear in Apple Mail but are quickly deleted by iCal. But their record for you to see is left in Gmail under 'All Mail';
    Accepted invites appear as a notification button on the top left hand bar on iCal where you click to acknowledge them and then the attendee is shown as a green circled tick instead of a grey circled ?.
    this shows that iCal invitations are working correctly. Whenever an event is updated, all invitees should be updated by email automatically.
    I hope this helps anyone - I could certainly have done with something similar when I started with looking at this.
    Anatole
    The Error and Access logfile in the Server app under iCal server are very useful in determining any errors. I got lots of imip errors when I didn't quite have the settings right. The port is critical and it won't tell you this is the problem if it fails.

  • How to test and develop the HTML/Backbone custom content viewer on IPad?

    Hi
    I have been tasked with developing and amending the HTML/Backbone custom content viewer as nicely detailed and explained by Derek Lu here:
    https://www.adobe.com/devnet/digitalpublishingsuite/articles/html-default-library.html#
    I can see that by removing the reference to libs/AdobeLibraryAPI.js in Index.html i am able to "test" on the desktop.
    <!--
        The DPS library/store API.
        The include below should be commented out when testing on the desktop.
    <script src="libs/AdobeLibraryAPI.js"></script>-->
    and that data is bought in via the fulfilment XML feed and the parse method is called on Librarycollection.
    I have made the changes to hook up the viewer to bring in some folios that we are developing.
    However, although this provides the ability to test and develop on the desktop in one form since we are using JS and Backbone, there are various checks within the provided code to see if ADOBE.isAPIAvailable.
    If it is, then the behaviour is different than on the desktop, so once the viewer is packaged up and put on the IPad there is disparity between what you were able to check and test on the desktop version against what is shown on the IPad.
    The question therefore is... is there a quick way to develop and test on the Ipad ... it doesnt seem like a viable option to develop blindly on the desktop and then package up the content viewer within Adobe DPS to check how those changes behave on the IPad?
    To re-iterate the viewer is to make use of backbone / js example to provide greater functionality and options for customisation.
    Thanks in anticipation.
    Dave

    Thankyou for taking the time to respond and for providing such detailed articles on adobe dps development, it is much appreciated.
    I had completely missed that article and was struggling to find anything useful from googling!
    Dave

  • How to test and configure custom extensions in Flash Pro CC?

    Hi,
    How do you install custom CS extensions in Flash Pro CC for testing and debugging before they have been signed and packaged?
    We have a custom extension for Flash Pro developed in-house using the CS SDK that we've been using with flash pro CS5 and CS6 but we're having trouble getting it to work in CC and I'd like to run it locally in test/debug mode.
    With flash pro CS6 and CS5 it was possible to test extensions by copying the output folder from flash builder into the CS Service Manager root folder (e.g. /Users/<username>/Library/Application Support/Adobe/CS6ServiceManager) and setting PlayerDebugMode to 1 in the CSXS preferences.
    I've added the PlayerDebugMode=1 flag to com.adobe.CSXS.4.plist however, I can't find the equivalent service manager folder for Flash Pro CC to copy the extension into.
    Is there a different folder to use for CC or is the process for testing extensions completely different? (are extensions written in the CS SDK even compatible with CC?)
    I'm running Mac OS Lion.
    Thanks,
    Stephen

    Thanks, that explains a lot.
    I'm afraid I'm a bit confused about what the preferred way of developing extensions is going ahead. There seems to be a lot of conflicting documentation on the adobe site, e.g. http://www.adobe.com/devnet/creativesuite.html  seems like the top page for extension documentation but it only talks about CS SDK 2.0 which uses CSXS and doesn't seem to be compatible with creative cloud apps.
    Then there's CS Extension Builder 2.1 which looks like it supports Flash Pro CC but isn't mentioned in the pages you linked too and it doesn't mention JSFL, but talks about the CSAW library.
    Do you know if:
    * The CS SDK has been dropped completely? 
    * CS Extenstion Builder is deprecated? (I can't see it as an option in the list of Creative Cloud apps)
    * Is then any documentation/utilities to help migrate existing CSXS extensions to work with creative cloud apps?
    Thanks,
    Stephen

  • How to test and startup form/report 6i developer

    Hi all:
    I'm a newer in form/report 6i developer. I've installed form/report 6i developer but I don't know how to test if it is sucessful or not. Can you guy tell me how to test it please?
    thanks in advance.
    NOTE: My OS is rhel 3

    Thankyou for taking the time to respond and for providing such detailed articles on adobe dps development, it is much appreciated.
    I had completely missed that article and was struggling to find anything useful from googling!
    Dave

  • How deep test and low level format a hard drive ?

    I am looking for an program to deep test and low level format my hard disc.
    Comparable to the manufacturer programs in the windows or dos world, like IBM Drive Fitness TEST.
    1. I need an printed state conditioning diagnosis.
    2. I want to relocate the blocks and masking the bad blocks.
    3. data recovery nonrelevant
    How are bad blocks treated in Apple Disc Utility.
    Released FWB an hard disc toolkit version for mac os x?
    How can i see all S.M.A.R.T. status informations in the terminal.(beyond the resume in Apple Disc Utility)

    Your best bet is to copy anything that you want to save to another drive and then erase and format it MS-DOS FAT-32 for cross platform sharing or Guid / Mac OS Extended for Mac only use.

  • How to created and assign one object to a transaction code

    Hello All,
    Please give some Idea about, how to assign an newly created object to a transaction code.
    I want to give authorization on co11n transaction code. by default there is no control on storage location level. I created a new object 'Z_AFRU_AWK' that incudes 4 fields. Activity, Order type, Storage Location & Plant'. How I can assign this object in the place of C_AFRU_AWK.
    I done this throught su24 but its not working. I am missing something. please help me.
    regards
    Lal

    Hi Kariyath  ,
    what object have you created is it a abap program or a script or a module pool what you are referein here.Please be clear.
    You can maintan the authorizations in the transaction PFCG.
    Select the role and then change the authorization data there.
    Reward points if helpfull.
    Regards,
    Vamshi.

  • How to test and deploy a BPEL application in JDeveloper?

    Hi guys!
    I'm trying to use the cue card overview (step 4) to test and deploy a BPEL application.
    I'm using the new version o JDeveloper Preview (10.1.3.1.0) and when a click in "Launch the Create Integration Server Connection wizard" it asks me about Application Server, host name and port number. What I should fill in? Should I start BPEL process manager outside JDeveloper to start testing?
    In the wizard of "Create Application Server Connection" (step 2 of 4: Authentication) it asks me about username (which is filled with oc4jadmin) and Password. What password I shout use here?
    Finally, in the step 3 of 4 (Connection) the wizard asks me about host name and RMI port, what I should fill in?
    Any help will be appreciate

    You need an istance of a BPEL server to test this.
    So download the SOA Suite Developer Preview and install on your machine - this will provide you with a server you can test BPEL on.
    http://www.oracle.com/technology/software/products/ias/soapreview.html

  • How to drag and drop a object in an indicator at run time?

    How to drag and drop a picture at run time in a indicator displaying pictures on the front panel. The main thing is that the window is displaying frames continuously?

    Hi Vivman,
    You have duplicated this post here. Please do not post the same question to separate forum post.
    Cheers.
    | Michael K | Project Manager | LabVIEW R&D | National Instruments |

  • How to check and maintain authorization objects

    Hi  Alll            
    Let me knowhow to check and maintain authorization objects  in SU24 ECC 6.0.
    Thanks
    sathies

    Hi Sathies,
    the old check flags
    U
    Unmaintained
    No indicator set. The check for corresponding authorization object is always executed. Field values are not displayed in the Profile Generator.
    N
    No check
    Check disabled. Field values are not displayed in the Profile Generator. This indicator cannot be set for HR and Basis authorization objects.
    C
    Check
    Check always executed. Field values are not displayed in the Profile Generator. For example: Printer authorizations.
    CM
    Check/maintain
    Check always executed. Field values are displayed for changing in the Profile Generator (yellow light).
    Have been divided now in
    Checkindicator : Check/NoCheck
    and
    Proposal: Yes/No.
    If defaults=yes, then you can modify them after clicking on the apropriate button.
    Please refer to the online help for SU24 too.
    Although the look of su24 has been changed significantly, the technique behind it is still the same.
    Once you have pressed the 'edit'-button on the top left corner, additional editing options will appear in the right-top-frame.
    b.rgds,
    Bernhard

  • How to export and import customized Object

    Hi All,
    I would like to communicate with system clipboard by importing and exporting the Objects.
    Assume that i have a RectangleBean object containing x,y,width and height properties and respective setters and getters.
    i am drawing the rectangle object by using the RectangleBean object values.
    now i want to export and import the RectangleBean object to system clipbord to draw a rectangle on other window when the user performed paste functionality. In other words communicating the RectangleBean objects between the two windows.
    Thanks in Advance
    Dorairaj M

    DoraiRaj wrote:
    Hi All,
    I would like to communicate with system clipboard by importing and exporting the Objects.
    Assume that i have a RectangleBean object containing x,y,width and height properties and respective setters and getters.
    i am drawing the rectangle object by using the RectangleBean object values.
    now i want to export and import the RectangleBean object to system clipbord to draw a rectangle on other window when the user performed paste functionality. That's not going to work: if you are talking past the bean object into the clipboard and have something like MS-Word use it as a way of recreating your graphic using your bean... no, that's just not going to happen.
    If you are saying you want to create another of your graphics on another Java window in the same JVM session, then just pass a reference of the window's graphic context to a setter and have at it.
    If you're talking about some JEE functionality, then you're going to have to use RMI or some other standard method to get your object over to the other box or it's effects.
    In other words communicating the RectangleBean objects between the two windows.Not by cutting and pasting to the clipboard.

  • How to install and configure Business objects on a local Maschine

    Hi Experts,
    i am a newbi in BO and would like to work with BO.
    The first thing i learned was to install and configure BO on my notebook.
    I downloaded the followings Tools:
    - CR Report 2008
    - Integration Kit
    - Live office 3.1 Upgrade
    - Web Intelligence
    - XCelsius
    By trying to download - Query as a Webservice i saw there were with sequences 1-3. Which one should i donwload?
    1. I would like to know which logic to follow toinstall it.Which one should be the firt and which one the last.
    2. Before installing Query as a webservice i should first install:
        - BusinessObjects XI Release 2 SP2 Enterprise Edition
        - Web Services--> What is that and where could i download it?
        - Tomcat or another supported Web Application and JDK--> where can i download it?
    3. .What is NET 1.1? Where to download it and how to install it?
    Any information or expereince will be very appreciated.
    Thank you in advance for your Input.
    Pat
    Edited by: Gilo on Feb 1, 2009 12:25 AM

    Hi Pat,
                You can get the guides and Installtion guides from this
    http://help.sap.com/businessobject/product_guides/
    You can download the from
    .subscribenet.com
    you can enter the user name and password then you can download the Business Objects software that can be download.
    "By trying to download - Query as a Webservice i saw there were with sequences 1-3. Which one should i donwload? "
    Sequence 1-3 you will have to download all the 3 as it can be part 1 part 2 and part 3.
    Tomcat .If you are installing for the first time it will automatically install tomcat and JDK if you are connected to the net while installing Business Objects.
    Regards
    Prashant

  • How to access and set the object attributes in a task flow?

    I have created a web service data control which has an operation having input as payload object. This payload object has two attributes min and max. I am calling a task flow in a dynamic region in which I want to display result of this operation for which i have to set the values for min and max. I want to set these values when I click the taskflow link. How to achieve this? I am new to adf.

    Hi Arun,
    Thanks for your reply.
    I have tried passing parameter to a task flow, but i cannot set the action to a task flow call because it already has action for a method in a dynamic region which renders the task flow at runtime. How do i set action to task flow call link? Also once i get the parameters into the page flow scope variables, i want to pass those to one of my data control operation which displays the result in that taskflow.(i dont want to create parameter form for this operation).

  • How to rotate and translate an object at the same time??

    Hi, I have a problem with rotation and translation of an object at the same time. I wrote a behovior class for my object (a cylinder). When some conditions are true the cylinder is added to a robot arm. Then it is translated so that the cylinder would be very close to the arm (looks like the robot is holding it). And now the behavior should also rotate the cylinder because the angle is 0 and it should be 90. I can translate the object or I can rotate the object but when I'm trying to do it at the same time (I want to combine rotation and translation) it doesn't work.
    Could anyone help me, please :)

    You can used to Matrix3f
    This object is a rotation and translate matrix
    for example:
    private void componerTransformada(){
    Quat4f rot = new Quat4f((float) this.getRotacionSobreX(),(float) this.getRotacionSobreY(),
    (float) this.getRotacionSobreZ(),1.0f);
    Vector3f tras = new Vector3f(-4.0f,-4.0f,(-1)*this.getDistanciaDeLaCamara());
    this.setTransformacion(new Transform3D(new Matrix4f(rot, tras, 1.0f)));
    Quat4f is a matrix of ratation
    vector3f is a direction vector
    Transform3d is building with Quat4f and Vector3f.
    That is work i use this to situe the view of point.
    good locky

  • How realize drag and drop of object

    Hi everybody,
    I have a matter, I want to realise a
    VI who makes drag and drop of indicator like a gauge for example.
    For this I used an event structure to
    manage the drag and drop. But the probleme is that with this solution
    i must put the indicator in my program to set the properties node
    (visible or position).
    So the number of indicator that i can
    drop and drag depend of the number of indicator that i declare in my
    soft.
    I want to know if there is an other
    methode to do that.
    Please find attached a VI to show you
    my objectif.
    Attachments:
    gliss dep.vi ‏36 KB

    duplicate post

Maybe you are looking for

  • How do i Secure & recover file from shared folder

    Hi All, I have Windows server 2008 R2 environment and one shared folder created on this with restricted permission by file sharing & security, now 1. I want to add one more restriction that owner of the folder should not able to delete that file? If

  • G/L Account Asignment to Valuation calss

    Hi all , Where do we assign G/L A/c assignment to valuation class and ex : during goods reciept for 101 , how are posting keys determined ? what is the relevance of feild status group in Account determination 89 for Inventory 86 for GR/IR... etc than

  • Error after trying to upgrade an iphone 4 to iOS 6

    Tried to upgrade an iphone 4 to iOS 6, but was asked to connect to itunes. This attempted a restore (several times) but now phone is totally unusable. Can't switch it off and PC does not recognise it as a device. Can anyone help?

  • Find and Read the Target Spreadsheet File from Target Folder

    I'm trying to find and read the target spreadsheet file from the target folder. Please help. Thanks. Solved! Go to Solution.

  • Anyone else getting this bug under their contacts?

    look at the notes field... http://c3.ac-images.myspacecdn.com/images02/94/l_c0fb069432ca410187c1bd7d2b4cdfc a.jpg Message was edited by: bfelczer1