Perspective for Java technologies : implementing interface on late.

In Java, to implements the adapter pattern's; we have to create a new class that have a link with the adaptee class and implements the adapter interface.
class MyAdapter implements IAdapter
      public MyAdapter( Adaptee a );
}or, if we need protected methods :
class MyAdapter extends implements IAdapter
     public MyAdapter( Adaptee a );
}then, to call the method void foo( IAdapter i ); ;
we have to do xxx.foo( new MyAdapter( adaptee ) );it could be simpler if java allowed to implement interfaces after defining the java class.
public class Adaptee
}and then, in another file, something like,
implementation of  IAdapter for class Adaptee
}would be equivalent to
public class Adaptee implements IAdapter
}The advantage of the first method is that you can adapt very easy external classes from external jar file.
thank's for coments.

An interface is a contract which tells the compiler
that a class that implements it implements a set of
method signature which perform certain actions.That's right, but my idea is not to change the interface, but to change the external class, making it implements the existing interface.
If you overlay an interface on someone else's class,
the signature match (if there is one) could happen by
coincidence. There's no guarantee that a method with
a signature that matches one in your interface
actually has the same function.I didn't say that an external class should be viewed as an interface without a specific implementation of this interface for the external class. But, instead of making a new class extending the first and implementing the interface, just define a specific implementation of the interface for this class, as if it was make at class declaration.

Similar Messages

  • Distribution of Perspective for Java

    Can I include JavaBean "Perspective for Java" from JDeveloper 3.1.1.2 in my application and distribute it or I must pay some licence fee?
    Thank you
    Matic

    Hi,
    If you develop your application using an Oracle product, then you can redistribute the Perspectives bean with your application without an additional license fee.
    See the Release Notes for information on those libraries that do require a runtime license.
    null

  • Open survey on new eLearning method for Java technologies

    JavaBlackBelt is considering offering “coach-assisted eLearning” courses on Java technologies such as Spring/Hibernate/more. It’s a new type of learning and they are interested in your feedback.
    Please consider taking a 5 minute survey and you will receive 10 contribution points towards JavaBlackBelt certification exams. Goto [www.surveymonkey.com/s.aspx?sm=SaH59Fy0TxcZykQKMN_2ftZA_3d_3d|http://www.surveymonkey.com/s.aspx?sm=SaH59Fy0TxcZykQKMN_2ftZA_3d_3d].
    Thanks for your time and we look forward to sharing results with you.

    Relevant portions of the [_Sun Forums Code of Conduct_|http://wikis.sun.com/display/SunForums/Sun+Forums+Code+of+Conduct]
    1.5 Definitions
    "Restrictions" means Sun's restrictions against Content that:
    b) includes third party advertising or ...
    Your OP qualifies as third party advertising.
    If you feel your post has been erroneously blocked, please feel free to use the "Report Abuse" link at the top of the thread.
    db

  • Better software domain for java technology.

    hi all,
    i am a college passout fresher , 6 months before i joined a MNC software company as a software developer . i can rate myself 7/10 for
    core java concepts.
    i have option for choosing my Domain beased on JAVA technology . can anyone of you please let me know which domain will best for my career ?
    only few domain i know and these are :---
    1. Finance
    2.Telecom
    3. Hi-Tech and internet

    Don't cross-post:
    http://forum.java.sun.com/thread.jspa?threadID=5133239

  • Essentials for Java Card implementation

    i am new at java CArd.
    I would like to find out what is a good starting point for me if i want to begin using this technology. I know that I need the SDK. what else would I need? what book(s) would you reccommend? where can I find some examples and tutorials?

    Have you google ? searched this forum ? Did you bother clicking the vertical menu on the left where it says "Java Card" ?
    Do some homework before asking a question like that and you'll find that it's been answered over and over.

  • KM Scheduler Task vs SAP Netweaver Scheduler for java

    Hi Experts,
    I need to know the key differences between KM Scheduler task implementation and SAP Netweaver Scheduler for java task implementation. Which one is better and why?
    Thanks for looking into this and for you patience in answering the question.
    Regards,
    Kiran K Grandhi.

    Hi,
    Please look at this help
    [SAP NetWeaver Scheduler for Java|http://help.sap.com/saphelp_nwce10/helpdata/en/44/03d66015ee10b3e10000000a11466f/content.htm] and [KM Scheduler task|http://help.sap.com/saphelp_nw04s/helpdata/en/3a/bc37b5789dee4eaa8005bff84f14cf/content.htm]
    Best Regards
    Vijay K

  • What's your strategy for learning Java technologies?

    Or, in other words, how do YOU acquire knowledge that is necessary for implementing Java technologies?
    After having spent one-and-a-half years developing an enterprise app, I've gained lots of knowledge about Java and some surface knowledge about its related technologies (JBoss, Hibernate, Ant, XDoclet, NetBeans and probably some others I can't think of at the moment).
    I'm now realizing that -- although the standalone prototype version of my program is growing mature -- I've still got lots to learn for refactoring it to a web platform. For example, I 've done small test projects using Servlets, but haven't done any work with JSP (or HTML for that matter) yet.
    Now, I'm sure I can learn JSP etc., but the questions I ask myself are: how long will it take?
    It's a rhetorical question of course (I don't expect an answer from you, the reader) However, it's an important issue because the months or years I spend fumbling around learning these new technologies, are time I could otherwise spend on the business logic and functionality of my program.
    So, how do you guys acquire knowledge of technologies? Official training perhaps? Or do you simply experiment until it works? Or do you rely on your company's knowledge base (e.g. someone in your company knows how it works)? Or do you get prototypes built from someone who already knows how it works?
    I�m really curious about this and would appreciate your thoughts.
    Thanks in advance,
    P

    Well, it seems like most of you simply read the
    various texts and try the vendors' examples. I'm
    surprised that no one mentioned ever having bought a
    prototype application from the onset. "bought"? What's that mean? You don't buy prototypes. You download evaluation versions, maybe.
    I try to find sample code and tweak it to see the effects. Otherwise, I start writing small sample code an build on that.
    I consider myself a reasonably competent core Java
    programmer, but I had serious difficulty configuring
    and merging its related technologies. There were so
    many disjointed pieces of instructional information
    that the additional research time really hurt our
    budget severely. Not an uncommon thing, I'm sure. There's a lot of stuff. But don't bother learning all of it. Not in detail, at least. It's a good idea to familiarize yourself with the names of packages/libraries and what they do. But only really learn what you need to learn for what you need to do. The next project you will probably need other things, so you learn them then.
    bsampieri,
    I've setup Tomcat and tried the examples--in fact, I
    normally follow tutorials for all products I hope to
    use. Problem is, the examples and tutorials never
    address my specific needs. So, I usually inch toward
    my goal by spending weeks or months in forums to
    continue where the tutorials leave off. Anything complex is going to not be there.... the trick is to identify pieces that you can pull out to build more complex apps. And the fact that JSP/servlets have the issue of being compounded by all the HTML/CSS/JS and HTTP protocol ... I don't want to say limitiations, exactly... Well, it just makes things more complex and harder to know what you need.
    Perhaps you guys are much faster and smarter than
    I...or you have a much bigger budget :)Probably not... on either account.

  • Is it Possible in JSF? Can anyone recommend any java Technology for this?

    I am doing Post Graduate Degree in Computer Science. This is my final semester and doing project work.
    Any body having idea about my requirment, help and guide to me
    My description and questions are as follows:
    Current Approach:
    PHP has been used to achieve the flexibility of creating custom images on-the-fly. Using this approach we were able to create a web-interface similar to the application client, where we could display links and get the exact look and feel of the application client.
    Drawback:
    This approach forces us to use two different technologies Java and PHP, since our system uses 'Java' accessing all the API's from PHP becomes a problem. while PHP provides a way to invoke any java method. It comes with a draw back, the method calls are little slow. This delay's are loading of web-page.
    Requirment:
    1. Creating custom images on various locations of the screen
    2. The Exact look and feel of the application map should be achieved
    3. Place elements and links correctly as in application-client reflect any changes
    4. Generation events on the Links and Elements
    5. Setting Backgroud images for different maps
    Questions:
    1. is it possible in JavaServer Faces (BETA)?
    2. If it is possible is JavaServer Faces(BETA) How to create custom images and create interfaces among them?
    3.Can anyone recommend any java Technology for doing this?
    Anybody having idea, help and guide me for doing my project

    hi,
    I think you can use JSF
    cheers
    Trajano

  • Look for general blog on Java technologies

    Hello,
    I am greatly interesting in Java and look for active blog on Java technologies. I found 1000 of blogs posted in this forum but many are very specific or not active anymore. Could you please advise me good java blog with regular posting and interesting articles on different part of Java?
    thanks
    sebastien

    To write JNI code for integrating of an activeX is not a simple task. You will face with a number of problems related to COM:
    - when and where to call CoInitialize and CoUninitialize,
    - how to clean up COM references on Java Application exit,
    - when to do Thread Marshal and when it is not needed for COM interfaces;
    - how to Marshal and Unmarshal COM parameters in Java methods calls to COM Interface methods, etc.
    The best decision is to use some Java-COM Bridge.
    My company has developed tools like
    - Java-COM Bridge
    - Object-Oriented JNI SDKs for C++ and .NET (v1.1,v.2.0) languages (do not mix with JNI wrapper generators). These are an object-oriented maps of the regular JNI SDK,
    - Add-Ins for MS Visual Studio v.6.0 and v.7.1 that generate Java wrappers in C++, C#, J#, MCpp, VB for Object-Oriented JNI SDK.
    So we know problems you have.
    See our site
    http://www.javain.com

  • Perspective for Netweaver/Java Programmers

    Hi everybody,
    i want to change from ABAP programming to a new department which is implementing in Java on Netweaver.
    In fact Java and similar languages were what i have done before i started with ABAP 1 year ago.
    Right now i have 2 opportunities:
    ABAB 
    or
    Netweaver/JAVA
    Does anybody now what the market situation is for that skills?
    How are the perspectives for that type of work (can i easyly find jobs)?
    I need help urgently i this question!
    Regards

    My Dear friend i have already put a decent title but
    none of them replied. See below
    As far as challenge goes for a
    programmer everything is challenge and people who
    cannot solve them reply in the manner u did.No..people who won't help people who won't help themselves reply in the manner I did.
    Anyways i apologise for giving that title u can also
    refer to my earlier posting named Communication API.not descriptive enough
    Anyways thanx for the suggestion. I cannot post my
    code i am sorry. See below
    I have clearly mentioned the problemas clear as mud. It is clear to you..don't assume it is clear to all else.
    if u still want further explaination of my problem ur
    welcome.........No..I really don't give a shit, as you've proven yourself not deserving of my effort past this post..maybe you'll learn something from it.
    Umm... your problem is probably simple... your code is not valuable to us, except to help you.
    Those who do not post code are people who lie about having already tried...or about having achieved successes...or who realize that their code is sh** and are embarassed by it...rephrased:people who refuse to post their code when asked...
    I've been on these forums long enough... If you continue to use vague descriptions, codeless, without error messages or anything specific, you will not get answers...
    Communication API isn't really a decent title either...perhaps
    "Problem writing/reading simultatenously to/from COM port"

  • Need help for equipments for java card with RFID technology .

    I 'm doin a project using java card with RFID technology.Can ne one give me exact equipments for java card reader & writer for RFID technology?
    I need to buy these things from UK.Can ne one provide me some product list & as well as the exact pricelist?
    plz reply me asap.

    I 'm doin a project using java card with RFID
    technology.Can ne one give me exact equipments for
    r java card reader & writer for RFID technology?I guess with "RFID" you are referring to "contact-less javacards"?
    If yes, one keyword for you is "Mifare", a industry standard for smartcards with dual interface (contact-based and contactless).
    Jan

  • Java technology/framework suggestions required for solution.

    Hi,
    I'm a C/PRO*C developer (for the past 12 years) and have been asked to do some Java ( which I haven't touched for 13 years).
    I would like you input on the 'correct' solution (kind of like an architectural overview) of the technologies I should be looking at.
    There are two parts to this.
    I need to write a web browser/Application that picks up a file locally on windows PC and reads the contents of the file to populate some url parameters which go to a specific web sevice via HTTPS.
    I then need a web service or some kind of servlet (I guess) that on receipt of the request by the client then stores (to a database) the request for auditing and then creates a soap message (using the data receieved) to an external third party( WSDL provided by thirdpparty). Once the thirdparty responds the web server then generates a web page for the client which includes a number of options and details retrieved from the thirdparty are displayed and on the client selecting them the result is sent to the server and the selected option is stored.
    Part of this must be that the server must be capable of running as a number of instances. It must be highly secure.
    What java technologies/frameworks should be looked out? Is my very rough design fundamentally floored?
    Thanks in advance.
    OFN

    OldFashionedNewbie wrote:
    So should I use servlets as opposed to JSP? or JCF?Servlets are not opposed to JSP. (JCF? Do you mean JSF?) You can and would use both Servlets and JSP, however, I have grown to believe that JSPs are awful and you should use Velocity instead. From what I've heard of JSF, I'd avoid that too.
    Essentially then create a servlet that accepts HTTP request and manipulates a call to the thirdparty, audits data to database, and returns a page back to client which then accepts the option.The server accepts the HTTP request and deals with that lower-level stuff for you, then it invokes your servlet.
    The servlet shouldn't call the third party, etc.; it should invoke other code (that you'd write) to do all that. You need a layer of abstraction between your business logic and the web tier. Among other things this will make it much easier to test.
    If I were wanting to run this as a in multiple instances then I create a connection pool to the database. But could multiple app instances be able to use one network connection to the ThirdParty?I suppose they could but it seems like more trouble than it's worth and a whole layer of infrastructure that I wouldn't bother with unless (a) you've demonstrated that it's a problem during profiling, and (b) you find that there's some preferably open-source library that handles this for you.

  • Implementing Note 616762 - Front End Printer in Web Dynpro For Java Applica

    Hi All,
    We need to implement Note 616762 in out web dynpro for java application for front end printing...
    I am confused as to what is mapped where and what about the other inputs to the function modules mentioned in the note.
    Please help me to achieve implementing this note.
    Thansk and Regards,
    Aditya Deshpande

    I had a discussion with basis about printer configuration.
    My problem starts from step 3... do not how the maping of values from webdynpro to function
    also here the function mentioned are not remote enabled... do we need to make it remote enabled..????
    Regards,
    Aditya Deshpande
    Edited by: Aditya Deshpande on Jan 9, 2009 3:36 PM

  • Java technologies for developing Desktop Applications

    Hi,
    I am new to desktop applications development. Can someone tell me the java technologies, API etc. that I have to learn for desktop application development.
    Jagatguru

    Thanks for your speedy reply.
    Actually, I am not interested in web-based applications. I am programming in swings and JDBC. Now I want to enhance my work area to include new technologies. Can you please tell me the other technologies that I have to learn for desktop applications

  • Java technology for Forms !

    Hi
    Suggest me which type of Java Technology can be easily used in 11g Forms ?
    With Regards.
    Dev.

    Your question is very unclear.
    All Oracle Forms versions starting with 6.0.8+ offered the ability to integrate with Java on the client or server side. On the client side, you can create Java Beans or Plugable Java Components (PJC) that offer you the ability to do things like extend the standard GUI behavior or execute almost any Java code on the client machine. On the server side, Forms offers the Java Importer which wraps your server side Java with pl/sql. This allows you to call server side Java directly from your form using pl/sql calls. The server side Java could be something simple like a small Java application that performs a local server task (e.g. copy, delete, move files). More powerful is the ability to use server side Java to call Web Services. These could be Services that you created or third party and/or remote services. For example, you might want to call a Web Service from a delivery company which returns package tracking information to your form. Or possibly a credit verification service, and so on. You can also use server side Java to replace old ORA_FFI calls or even database tasks.
    This is only a small sample of what Java can be used for in a Forms application. There are loads of documents and examples throughout the web, the Forms Builder Online Help, and in the Oracle Support Knowledge Base. Here are just a few examples:
    This web site is dedicated to sharing client side Java examples. It is not affiliated with Oracle, but has been a trusted source of some really great example for us. ( Thank you Francios )
    <blockquote>http://forms.pjc.bean.over-blog.com</blockquote>
    Here is an Oracle example of how to call a Web Service from Forms:
    <blockquote>http://www.oracle.com/webfolder/technetwork/tutorials/obe/forms/11g/sms_webservice/webservices_forms_11g.htm</blockquote>

Maybe you are looking for

  • Install Adobe Photoshop Elements on Terminal Server

    Hi, if i want to install Adobe Photoshop Elements on a Terminal Server so 5 people can use it at the same time, what kind of licence do i need? Thanks

  • How do I change the title of an album imported into iTunes?

    I have a new MacBook and I am now importing CD's into my iTunes. When I inserted this album I got a message about something being similar, I had no idea what it was referring to so I just selected the top name. I now have imported this album in with

  • ITunes design and music artists

    I was wondering why someone like Ke$ha or Lady Gaga, who have both only released one real album, have fancy and personalized music sections in iTunes, and someone like David Bowie, who has a 40 year career with 25 albums which 16 of them have gone pl

  • Software upgrade and now calendar missing information

    I upgraded the software for my iPhone 3G last week and now most of my calendar information has disappeared. Has anyone else had this problem? I have a feeling that even if I went back to the previous version of the software, my calendar entries would

  • JS, CS5, GREP Can anyone help me escape?

    Hello all, The following GREP expressions do just what I want them to in the UI Find/Change dialog, but I'd like to use them in a Javascript, and I'm not sure how to properly "escape" the characters that need to be escaped. The expressions are as fol