Question about documentation & interface inheritance

If I have interface Foo that extends interface Bar, I'm wondering if there's a way for Foo to add more documentation to one of Bar's methods.
For example, if I have:
public interface Foo {
  * The "stuff" that gets done by this method should be more properly defined in the implementing class.
  void doStuff();
public interface Bar extends Foo {
}Is there any way for me to specify for Bar to override the doc on the doStuff() method inherited from Foo (such that it might read something like "The doStuff() method of all implementers of Bar should [behave in x manner]")?
I realize I'm probably not articulating myself totally clearly, so let me know if I need to shed light on anything.
Thanks!
Edited by: Caryy on Nov 30, 2010 4:06 PM

jverd wrote:
I think you're allowed to declare an identical doStuff() method in Bar and give it its own documentation. It won't just get concatenated on to the supertype's doc, but the javadoc tool might generate a link to the parent method like it does when a class overrides or implement a method.Wow... >_< I thought I tried that and failed before asking this question, but it appears that you are correct (I must have typo'd or something)! Thanks for the fast reply and sorry for the n00b question....

Similar Messages

  • Question about IDashedAttributeValues interface

    Hi to everyone,<br />I have a question about IDashedAttributeValues interface.<br />If I would like to apply custom dashes kDashedAttributeValuesBoss to a page item. I would expect that my code will look like this:<br /><br />InterfacePtr<IDashedAttributeValues> pAttribute(::CreateObject(kDashedAttributeValuesBoss));<br /><br />pAttribute->SetPhase( nPhase );<br />pAttribute->SetCornerAdjustment((IDashedAttributeValues::CornerAdjustment)nCornerAdjust ment);<br />pAttribute->SetValue( 0, nDash0 );<br /><br />But InDesign crashes at SetValue code. I could understand InDesign. It is out of range. But, how to specify the length of value array or to add value into array?<br /><br />Thanks in advance,<br />Alexander Staroverov<br />Developer Engineer<br />Comosoft GmbH

    Thank you to all, I have found the answer in SDK samples:<br /><br />void SnpGraphicHelper::AddDashedValues(const K2Vector<PMReal>& dashAndGapValues)<br />{<br />IDataBase* db = fItemList.GetDataBase();<br />InterfacePtr<IDocument> theDocument(db, db->GetRootUID(), UseDefaultIID());<br />     InterfacePtr<IUIDData> uidData(::CreateObject2<IUIDData>(kDashedAttributeValuesBoss));<br />     ASSERT(uidData != nil);<br />     uidData->Set(::GetUIDRef(theDocument));<br />     InterfacePtr<IDashedAttributeValues> dashedAttributeValues(uidData, UseDefaultIID());<br />     if (dashedAttributeValues != nil && dashAndGapValues.size() > 0) {<br />          for (int32 i = 0; i < dashAndGapValues.size(); i++) {<br />               dashedAttributeValues->SetValue(i, dashAndGapValues[i]);<br />          }<br />          this->AddAnAttribute(dashedAttributeValues);<br />     }<br />}

  • A question about using INTERFACE?

    I was writing a xml dom application..
    I tried to use some sample code,
    it works fine..
    I import some class for xml parsing..
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    and I open the Node.java and NodeList.java in the dom directory, and see the Node is an public interface
    public interface Node {
    my question is..
    if Node is an interface, why I can use directly the function of Node object in my DOM application code..
    like:
    Node node;
    String val=node.getNodeValue()
    I don't understand that.
    why we can declare an object of Node(which is interface), and use it's function??

    If Node is an interface, why I can use directly
    the function of Node object in my DOM
    application code..
    like:
    Node node;
    String val=node.getNodeValue()
    I don't understand that. why we can declare an
    object of Node(which is interface), and use it's
    function??
    Just like u can use the Connection interface in JDBC to
    create a Statement interface object.
    U can have objects whose reference belongs to an interface type. That way the ppl here at SUN have
    restricted you from running any other methods other
    than those listed in the interface object reference. This
    creates a very strict inheritance heirarchy which is
    impossible to break.
    For example, you cannot possiblly run or create any
    other methods than those listed in the Connection
    interface in JDBC API. This is bcoz although the object
    at runtime might denote an implementation of the
    interface BUT the reference through which u have
    access to it is only a predefined interface.

  • Question about message interface

    I developed a jdbc to file scenario, it works, but I'm confused.
    I designed a message interface for jdbc outbound,
    CustomerRow
    |--row
         |--CUST_NO
         |--......
    I set Document Name = 'resultset' in jdbc sender adapter.
    I can see payload in SXMB_MONI.
    <?xml version="1.0" encoding="utf-8" ?>
    - <resultset>
    - <row>
      <CUST_NO>pp3433</CUST_NO>
      <SALES_ORG>org1</SALES_ORG>
      <DISTRIBUTION_CHANNEL>dis1</DISTRIBUTION_CHANNEL>
      <DIVISION>div1</DIVISION>
      <FLAG>N</FLAG>
      <LAST_UPDATE>2008/11/05 15:24:53:843</LAST_UPDATE>
      </row>
    - <row>
      <CUST_NO>ppy3233</CUST_NO>
      <SALES_ORG>org2</SALES_ORG>
      <DISTRIBUTION_CHANNEL>dis2</DISTRIBUTION_CHANNEL>
      <DIVISION>div2</DIVISION>
      <FLAG>N</FLAG>
      <LAST_UPDATE>2008/11/05 15:24:53:843</LAST_UPDATE>
      </row>
      </resultset>
    You noticed that resultset is not 'CustomerRow' in message interface which I defined.
    I don't know how it can work.

    The parameter Document Name should ideallly contain ur Message Type root name. As u have changed it to 'resultset', it is replaced at the sender adapter and then flow continues.
    There are very few occasions when success raises a question
    Regards,
    Prateek

  • Question about Serizable interface

    Which one of the following are true:
    - Serizable interface defines no memebers.
    - Serializable inteface extends the externalizable interface.
    - only an object that implements the serializable interface can be saved and restored by serialization facilities.

    Next time don't wait till Sunday midnight to do homework that has to be submitted Monday morning.
    db
    Hint: You can find the answers to all 3 questions in the API for Serializable
    {color:0000ff}http://java.sun.com/javase/6/docs/api/java/io/Serializable.html{color}

  • Question about inbound interface

    Hi!
    Here, there is an inbound interface using idocs.
    My question is: if there are five idocs ready to be processed, is the function module executed five times? I mean, one time for each idoc or is there a single function module execution that processes the five idocs?
    Thanks!
    Regards,
    Cristian

    hi,  Cristian
    Actually it depend on IDOC inbound setting for your message type.
    in WE20, go to Partner Profiles:Inbound parameters setting.
    you will be request to set Process Code for Inbound.
    if you choose some Process Code, which support Packet Inbound, you IDOC will be executed Packetize.  E.G. once 5 IDOCs.
    And you inbound function also needed to support Packet.

  • A question about share interface in java card

    I meet a big problem in java card recently.
    I try to develop a loyalty and a purse in the JCOP 20 . I use the share interface to share data between two applets.At first I write two small applets to test the share interface.Then I manully dowon the two applets into the card but it doesn't work. The error always happen to the "getAppletShareableInterfaceObject" method.
    Following is part of the code.
    buffer[0]=(byte)0x06; buffer[1]=(byte)0x05; buffer[2]=(byte)0x04; buffer[3]=(byte)0x03; buffer[4]=(byte)0x02; buffer[5]=(byte)0x01; buffer[6]=(byte)0x01;
    //server applet ID
    AID loyaltyAID2 = JCSystem.lookupAID(buffer, (short) 0,(byte)7);
    if(loyaltyAID2==null) ISOException.throwIt((short)0x0902);
    loyaltySIO = (JavaLoyaltyInterface) JCSystem.getAppletShareableInterfaceObject(loyaltyAID2,(byte)0);
    //...........................................error happen in this line
    I try to find the error I find the error, so I trace to the server applet,I add a "ISOException.throwIt " method in the getShareableInterfaceObject in the server applet.
    I find if I add it,the "getAppletShareableInterfaceObject" will return but get the null object.
    It's correct.But when I remark the "ISOException.throwIt" and just return "this" ,the card will get "6F00".
    Following is my code.
    public Shareable getShareableInterfaceObject(AID clientAID,byte parameter)
    //ISOException.throwIt((short)0x9999);
    return this; } error happen in this line
    TKS...

    Yes I did do it,I modify the sample code of the SUN micro's loality and purse .Following is my source code.
    Client code(purseeasy).......
    //=========================
    package purseeasy;
    import com.sun.javacard.samples.JavaLoyalty.JavaLoyaltyInterface;
    import javacard.framework.*;
    public class purseeasy extends javacard.framework.Applet
    private byte[] echoBytes;
    private static final short LENGTH_ECHO_BYTES = 256;
         public purseeasy()
         echoBytes = new byte[LENGTH_ECHO_BYTES];
    register();
    public static void install(byte[] bArray, short bOffset, byte bLength)
    new purseeasy();
    public void process(APDU apdu)
    byte buffer[] = apdu.getBuffer();
    short bytesRead = apdu.setIncomingAndReceive();
    short echoOffset = (short)0;
    switch(buffer[2])
    case 0x31:
    AID loyaltyAID1 =JCSystem.getAID();
    short i=loyaltyAID1.getBytes(buffer,(short)0);
    if(loyaltyAID1==null)
              ISOException.throwIt((short)0x0901);
    buffer[0]=(byte)0xd1;buffer[1]=(byte)0x58;
         buffer[2]=(byte)0x00;buffer[3]=(byte)0x00;
         buffer[4]=(byte)0x01;buffer[5]=(byte)0x00;
         buffer[6]=(byte)0x00;buffer[7]=(byte)0x00;
         buffer[8]=(byte)0x00;buffer[9]=(byte)0x00;
         buffer[10]=(byte)0x00;buffer[11]=(byte)0x00;
         buffer[12]=(byte)0x00;buffer[13]=(byte)0x00;
         buffer[14]=(byte)0x31;buffer[15]=(byte)0x00;
         AID loyaltyAID2 = JCSystem.lookupAID(buffer,
    (short)0,(byte)16);
    if(loyaltyAID2==null)
         ISOException.throwIt((short)0x0902);
         JavaLoyaltyInterface loyaltySIO =
    (JavaLoyaltyInterface)
         JCSystem.getAppletShareableInterfaceObject(loyaltyAID2,(byte)1);
    if(loyaltySIO ==null)
         ISOException.throwIt((short)0x0903);
    loyaltySIO.grantPoints (buffer);
    break;
    apdu.setOutgoingAndSend((short)0, (short)18);
    //=====================================
    //Server program....share interface
    package com.sun.javacard.samples.JavaLoyalty;
    import javacard.framework.Shareable;
    public interface JavaLoyaltyInterface extends Shareable
    public abstract void grantPoints (byte[] buffer);
    //=============================================
    //Server program....loyalty
    package com.sun.javacard.samples.JavaLoyalty;
    import javacard.framework.*;
    public class JavaLoyalty extends javacard.framework.Applet     implements JavaLoyaltyInterface
    public static void install(byte[] bArray, short bOffset,
    byte bLength)
    {new JavaLoyalty(bArray, bOffset, bLength);
    public JavaLoyalty(byte[] bArray, short bOffset, byte
    bLength)
    register();
    public Shareable getShareableInterfaceObject(AID
    clientAID,byte parameter)
    return (this);
    public void process(APDU apdu)
    byte buffer[] = apdu.getBuffer();
    short bytesRead = apdu.setIncomingAndReceive();
    apdu.setOutgoingAndSend((short)0, (short)18);
    public void grantPoints (byte[] buffer)
         buffer[0]=0x08;
         buffer[1]=0x08;
         buffer[2]=0x08;
         buffer[3]=0x08;
         buffer[4]=0x08;
         buffer[5]=0x08;
         buffer[6]=0x08;
         buffer[7]=0x08;
    Could you tell me what wrong with my code???
    Thanks....

  • Question about photo interface...please help

    hi. i'll explain what i want to do, and hopefully you can help. when exporting a photo album from iphoto to iweb, it creates thumbnails...and then when you double click on one of those thumnails, it brings up a much nicer looking interface with that photo nice and big, and all the others lined up above. Is there anyway i can skip the first set of thumbnails, and only display the second method of display. so when someone clicks on my photo page, they are presented with a nice big photo, and all the others lined up above. thanks...much appreciated, ben

    Add your photos to your website as a flash slideshow using, for example, the FAExporter plugin......
    http://roddymckay.com/VisualMedia/FlashAlbumExporter.html

  • Hi,all i think it seems to be silly question about markable interface

    i know that markable interface doesnt consists any methods.But when we implements those interfaces how they behave to service the class.
    ex.
    public class MyClass implements java.io.Serializable
    MyClass is serializable but the java.io.Serializable doesnt consist any methods how it service to MyClass

    you implement the Serializable interface just to let the API/JVM to know that the instances of the class can be serialized.
    These kind of interfaces are called marker interfaces.
    By the way some time ago there was a good discussion on marker interfaces on this forums. Try searching you might find it.

  • My question about second INTERFACE DESIGN

    i create one interface( main interface created by JFRAME)
    in main interface i want to click button
    then create second interface.
    i should use which class to build second interface?
    i tried JFrame but it doesnot work
    JFrame is top cotainer .and it need main() also
    thanks in advance
    please give some hints

    i tried JFrame but it doesnot work - JFrame is top cotainer .and it need main() alsoThat's not true - you can create a JFrame instance without it having its own main() method.
    When the user clicks the button, do this:JFrame secondFrame = new JFrame("Second Frame");
    secondFrame.add(....whatever you need to add to it - JPanels etc...);
    secondFrame.setBounds(100,100,400,300);
    secondFrame.show();

  • Question about casting and inheritances

    Hi everyone!
    I have a class dog which extends the class animal. Apart from that, there is a method called dogsFarm which returns a collection of animals (this method corresponds to another class, let's say farm). I can't touch the inside of that method since I just have the interface but I need a collection of dogs instead of a collection of animals. I tried to cast:
    Collection<dog> dogs = (collection<dog>) dogsFarm();But it says that it cannot cast that. Is it any way to solve this without having to change the method?
    Thanks

    Strictly speaking if the method returns a Collection<Animal>, then no amount of casting will turn it into a Collection<Dog> while still being type safe.
    The problem is that a Collection<Animal> could contain a Cat and if you cast it to a Collection<Dog>, it would contain an invalid value.
    You could use raw types (i.e. simply "Collection") to "forget" the generic type information and provide new one after that, but that's just an ugly hack that provides no real check.
    You could also use Collections.checkedCollection() to provide explicit checks.
    You can combine those two techniques to get code that's still ugly, but does at least some error checking:
    Collection rawFarm = dogFarm();
    Collection<Dog> = Collections.checkedCollection(rawFarm, Dog.class);

  • Question about constructors and inheritance

    Hello:
    I have these classes:
    public class TIntP4
        protected int val=0;
        public TIntP4(){val=0;}
        public TIntP4(int var)throws Exception
            if(var<0){throw new Exception("TIntP4: value must be positive: "+var);}
            val=var;
        public TIntP4(String var)throws Exception
            this(Integer.parseInt(var));
        public String toString()
            return val+"";
    public class TVF extends TIntP4
    }Using those clases, if I try to compile this:
    TVF  inst=new TVF("12");I get a compiler error: TVF(String) constructor can not be found. I wonder why constructor is not inherited, or if there is a way to avoid this problem without having to add the constructor to the subclass:
    public class TVF extends TIntP4
         public TVF (String var)throws Exception
              super(var);
    }Thanks!!

    I guess that it would not help adding the default constructor:
    public class TVF extends TIntP4
         public TVF ()
               super();
         public TVF (String var)throws Exception
              super(var);
    }The point is that if I had in my super class 4 constructors, should I implement them all in the subclass although I just call the super class constructors?
    Thanks again!

  • [SOLVED] Question about Bridge Interface in VirtualBox

    Hi,
    So I use bridge interface option in VirtualBox opposed to the default NAT one.
    From what I see, the two interfaces(original one and bridged one) are isolated, such that the guest OS cannot intercept traffic of host OS and vice versa, is that correct?
    Cause I cannot see the interface bridged by VirtualBox in host OS and cannot see the actual interface in guest OS.
    Thank you.
    Last edited by darrenldl (2013-09-12 02:30:39)

    I'm not sure what you mean by isolated, do you mean that the guest machine won't be able to communicate with the host system? I don't think that the case. I'm not an expert on this myself and it's a bit of a blind man describing an elephant, but from what I understand a bridged interface acts as an independent host on your network. As far as any other machine is concerned, the guest and host are 2 machines. Are you able to ping the host os' ip from the guest machine? If you are able to ping across, then they are sharing the same network segment. This means if you want the bridge to not be able to see what's going on on your network, you'll have to use some firewall or subnet tricks to get that to happen.

  • Java Persistance: Question about query within inheritance class

    In father class here is the annotation:
    @Entity
    @Table(name = "CONTENT_MEDIA")
    @Inheritance(strategy=javax.persistence.InheritanceType.JOINED)
    @DiscriminatorColumn(name="CONTENT_TYPE", discriminatorType=javax.persistence.DiscriminatorType.INTEGER)
    @DiscriminatorValue("4")
    In son class here is the annotation and query:
    @Entity
    @Table(name = "ISBN_BOOK")
    @DiscriminatorValue("1000001")
    @NamedQueries( {
    @NamedQuery(name = "ISBN_BOOK.findViaISBN", query = "SELECT g FROM ISBNBook g WHERE g.ISBNnumber = :isbn")
    When I do the query, the result is:
    Internal Exception: org.apache.derby.client.am.SqlException: Comparisons between 'INTEGER' and 'CHAR' are not supported.Error Code: -1
    Call:SELECT t0.CONTENT_ID, t0.CONTENT_TYPE, t0.OBTAIN_DATE, t0.SEARCH_TIMES, t0.LAST_SEARCH_DATE, t1.CONTENT_ID, t1.BOOK_NAME, t1.AUTHOR, t1.ISBN_NUMBER, t1.CURRENT_LOCATION FROM CONTENT_MEDIA t0, ISBN_BOOK t1 WHERE ((t1.ISBN_NUMBER = CAST (? AS VARCHAR(32672) )) AND ((t1.CONTENT_ID = t0.CONTENT_ID) AND (t0.CONTENT_TYPE = '1000001')))
    bind => [AAA]
    The problem is: t0.CONTENT_TYPE = '1000001'. I have set the column to Integer, why the JPA use the char?
    Can anyone solve the problem for me?

    In father class here is the annotation:
    @Entity
    @Table(name = "CONTENT_MEDIA")
    @Inheritance(strategy=javax.persistence.InheritanceType.JOINED)
    @DiscriminatorColumn(name="CONTENT_TYPE", discriminatorType=javax.persistence.DiscriminatorType.INTEGER)
    @DiscriminatorValue("4")In son class here is the annotation and query:
    @Entity
    @Table(name = "ISBN_BOOK")
    @DiscriminatorValue("1000001")
    @NamedQueries( {
    @NamedQuery(name = "ISBN_BOOK.findViaISBN", query = "SELECT g FROM ISBNBook g WHERE g.ISBNnumber = :isbn")
    })When I do the query, the result is:
    Internal Exception: org.apache.derby.client.am.SqlException: Comparisons between 'INTEGER' and 'CHAR' are not supported.Error Code: -1
    Call:SELECT t0.CONTENT_ID, t0.CONTENT_TYPE, t0.OBTAIN_DATE, t0.SEARCH_TIMES, t0.LAST_SEARCH_DATE, t1.CONTENT_ID, t1.BOOK_NAME, t1.AUTHOR, t1.ISBN_NUMBER, t1.CURRENT_LOCATION FROM CONTENT_MEDIA t0, ISBN_BOOK t1 WHERE ((t1.ISBN_NUMBER = CAST (? AS VARCHAR(32672) )) AND ((t1.CONTENT_ID = t0.CONTENT_ID) AND (t0.CONTENT_TYPE = '1000001')))
    bind => [AAA]he problem is: t0.CONTENT_TYPE = '1000001'. I have set the column to Integer, why the JPA use the char?
    Can anyone solve the problem for me?
    I think now it is more readable.
    (use code tags pls)

  • Question about documenting process maps and form object properties

    Does the new version of Workbench have a tool that allows us to print a report showing the properties of the object used in a form template or process map? For example... showing all of the properties like fonts, size, patterns, defaults, whether or not a field is required, etc...? I am also checking to see if this capability has been added to Workbench for Process Maps?

    No it does not but there is a blog entry by John Briinkman that will analyze your form template and give you some of that information. Here is a link to the blog entry:
    http://blogs.adobe.com/formfeed/2011/05/updated-form-report-tool.html
    Paul

Maybe you are looking for

  • A Global Catalog Server could not be located - All GC's are down SBS 2011

    I have been searching through these forums and manage to find similar errors but am struggling to find an answer that applies to this me. I seem to be having a number of issues with our SBS. I believe this was originally domain was previously on a SB

  • Remote connection from home PC to work iMac

    Our organization recently purchased an iMac 27-inch for an employee. That user would like to be able to remote into the computer from home. Unfortunately, that user has a PC at home. We were able to establish a VPN connection on the home PC and recre

  • How to fix sticky mute switch on iphone

    My friend spilled some soda into my iPhone 4's mute switch and now, the day after, it is all sticky and refuses to make a clicking sound when it switches from vibrate to ringer or vice-versa. What can I do that would be safe? It still functions, but

  • Table to view the CO settlement document (not tcode)

    What is the table to view the CO settlement document.I donot need transaction code..only table pls.

  • Xfce4 keyboard layout switcher

    I am having a strange issue with setting up xfce4 on my fathers' laptop. Every time I switch the keyboard layout, the x terminal emulator start acting weird: [jarda-wien@primator ~]$ whoami jarda-wien [jarda-wien@primator ~]$ echo hello bash: echo he