Interface-like specification for construtors

Consider this scenario: I want to instantiate one of the implementations of the interface Foo, the exact subclass being chosen at runtime based on user input. The constructor to be used (via Constructor.newInstance()) in such an instantiation has a non-zero argument list - say, SubFoo(double[] a, double[] b). The question is: is there a way (however sinuous it might be) to enforce that all implementations of Foo provide a (double[], double[]) constructor, as it would be if the constructor was a regular method of the interface, or from the moment I begin to use reflection all client programmers who wish to implement Foo are (other then for my documentation) on their own?

ejp wrote:
Why do you care? As long as you only provide a (double[], double[]) constructor in your abstract base class, so that subclasses must provide these values, why do you care what the constructors of the implementation classes look like?Because my design does not have, or otherwise need, an abstract base class, only the interface. For the regular methods of the interface there is no interest in providing a base implementation, as the implementing classes should be free to handle the messages however they wish. Same goes for my imaginary (double[], double[]) constructor - how the constructor arguments should be handled should be entirely up to the subclasses, since only they should know about their instance fields they need to initialize on construction. That means that (according to this design) the abstract base class constructor wouldn't use the arguments for anything useful to the subclasses. And then, as it is not possible to override constructors or make them abstract, it would be pretty much useless...
Hopefully I managed to get across what I'm trying to do design-wise. While I understand that constructors can't be abstract like a regular method due to their special role and - for reasons I read about but didn't really understand - that having static interface methods is not possible as well, I believe what I am trying to achieve makes sense - after all, as far as semantics are concerned a public constructor/static factory method is part of the class' interface (not interface in the Java language construct sense, but in the design concept sense)...

Similar Messages

  • Is the "Device Class Definition for Physical Interface Devices" specification implemented in Windows?

    Can I assume that Windows will be able to handle my physical interface device if I follow the "Device Class Definition for Physical Interface Devices" specification while writing the firmware?
    I'm trying to develop a device which handles rumble output from applications such as games. Applications would include e.g. racing games or simulators. I'm hesitant to just clone Xbox 360 Gamepad or Sidewinder USB reports. I'd like to correctly declare my
    device as something on its own while still making use of already implemented OS-specific drivers. The purpose of the mentioned specification is exactly that as far as I can tell. I wasn't able to find concrete information about its level of support though.
    The "USB device class drivers included in Windows" page (sorry I'm not allowed to post links yet..) seems to link to WinUSB which I'm not sure what to do with.

    Thanks for your response. Well if everything was implemented at that time and it's still available it should be fine since the specification document's last version is dated 1999. I was just hoping there would be any form of documentation whether it's
    supported and by which degree so I don't go through the trouble of figuring out how the firmware should be written according to the specification just to find out there is no OS driver implementation for it which would render my work more or less useless.
    So I suppose I'm forced to go the trial and error path?

  • Second-screen interface & Wii like gamepad for Flash based web apps

    Hi guys,
    We have been building a framework to enable second-screen workflows in Flash apps. One key feature of UniWand is that you can use it as a customizable, motion-sensing gamepad for Flash games. The beta version of UniWand is hosted here. You can try out the app and the samples hosted on this site.
    Here is a one minute demo showing some of the workflows:
    The other useful features that it can enable are:
    - Enabling intuitive 3D model viewer (as seen in the demo)
    - Second screen for online videos (similar to that of YouTube)
    - Tablet companion apps for e-learning content.
    We're curious to know your opinions and queries. Hope you'd like it!
    Thanks!

    Hi all,
    Here are some of the demos of the samples available in UniWand SDK:
    1. Wii like gamepad for Starling games:
    2. Intuitive Model Viewer using Away3D:
    3. Flight controller for Google Earth:
    Likewise, UniWand can be used as a Steering Gear for online racing games, and guns for shooting games.
    Let us know your opinions and queries. Hope you’d like it.
    Thanks!

  • Specifications for development

    hi gurus      
    how to give thje specifications for development?

    To speak at macro level that is at projet manager or at senior levels.  The Functional Spec (Specification) which is a comprehensive document is created after the (SRS) Software Requirements Document. It provides more details on selected items originally described in the Software Requirements Template. Elsewhre organizations combine these two documents into a single document.
    The Functional Specification describes the features of the desired functinality.. It describes the product's features as seen by the stake holders,and contains the technical information and the  data needed for the design and developement. 
    The Functional Specification defines what the functionality will be of a particulat area that is to be precise a transaction in SAP terminology.
    The Functional Specification document to create a detailed design document that explains in detail how the software will be designed and developed. 
    The functional specification translates the Software Requirements template into a technical description which
    a) Ensures that the product feature requirements are correctly understood before moving into the next step, that is detchnical developement  process. 
    b) Clearly and unambiguously provides all the information necessary for the technical consultants to develop the objects.
    At the consultant level the functional spects are preapred by functinal consultants on any functionality for the purpose of getting the same functinality designed by the technical pepole as most of the times the functionalities according to the requirements of the clients are not available on ready made basis.
    Let me throw some light on documentation which is prepared before and in a project:
    1) Templates
    2) Heat Analysis -
    3) Fit Gap or Gap Analysis
    4) Business Process Design
    5) Business Process Model
    6) Business Change & Impact
    7) Configuration Design, which is just 5 % of Total SAP- have different names -
    8) Future Impact & Change Assessement
    9) Functional Design (Module Wise)
    10) Risk Assessement
    11) Process Metrics and Many More-- Which has impact on Business and its work flow
    In Details
    Functional specifications (functional specs), in the end, are the blueprint for how you want a particular report and transaction to look and work. It details what the report will do, how a user will interact with it, and what it will look like. By creating a blueprint of the report or transaction first, time and productivity are saved during the development stage because the programmers can program instead of also working out the logic of the user-experience. It will also enable you to manage the expectations of your clients or management, as they will know exactly what to expect.
    A key benefit of writing up a Functional Spec is in streamlining the development process. The developer working from the spec has, ideally, all of their questions answered about the report or transaction and can start building it. And since this is a spec that was approved by the client, they are building nothing less than what the client is expecting. There should be nothing left to guess or interpret when the spec is completed.
    Functional Specification
    A functional specification (or sometimes functional specifications) is a formal document used to describe in detail for software developers a product's intended capabilities, appearance, and interactions with users. The functional specification is a kind of guideline and continuing reference point as the developers write the programming code. (At least one major product development group used a "Write the manual first" approach. Before the product existed, they wrote the user's guide for a word processing system, then declared that the user's guide was the functional specification. The developers were challenged to create a product that matched what the user's guide described.) Typically, the functional specification for an application program with a series of interactive windows and dialogs with a user would show the visual appearance of the user interface and describe each of the possible user input actions and the program response actions. A functional specification may also contain formal descriptions of user tasks, dependencies on other products, and usability criteria. Many companies have a guide for developers that describes what topics any product's functional specification should contain.
    For a sense of where the functional specification fits into the development process, here are a typical series of steps in developing a software product:
    Requirements:
    This is a formal statement of what the product planners informed by their knowledge of the marketplace and specific input from existing or potential customers believe is needed for a new product or a new version of an existing product. Requirements are usually expressed in terms of narrative statements and in a relatively general way.
    Objectives: Objectives are written by product designers in response to the Requirements. They describe in a more specific way what the product will look like. Objectives may describe architectures, protocols, and standards to which the product will conform. Measurable objectives are those that set some criteria by which the end product can be judged. Measurability can be in terms of some index of customer satisfaction or in terms of capabilities and task times. Objectives must recognize time and resource constraints. The development schedule is often part or a corollary of the Objectives.
    Functional specification.: The functional specification (usually functional spec or just spec for short) is the formal response to the objectives. It describes all external user and programming interfaces that the product must support.
    Design change requests: Throughout the development process, as the need for change to the functional specification is recognized, a formal change is described in a design change request.
    Logic Specification:
    The structure of the programming (for example, major groups of code modules that support a similar function), individual code modules and their relationships, and the data parameters that they pass to each other may be described in a formal document called a logic specification. The logic specification describes internal interfaces and is for use only by the developers, testers, and, later, to some extent, the programmers that service the product and provide code fixes to the field.
    User documentation:
    In general, all of the preceding documents (except the logic specification) are used as source material for the technical manuals and online information (such as help pages) that are prepared for the product's users.
    Test plan: Most development groups have a formal test plan that describes test cases that will exercise the programming that is written. Testing is done at the module (or unit) level, at the component level, and at the system level in context with other products. This can be thought of as alpha testing. The plan may also allow for beta test. Some companies provide an early version of the product to a selected group of customers for testing in a "real world" situation.
    The Final Product:
    Ideally, the final product is a complete implementation of the functional specification and design change requests, some of which may result from formal testing and beta testing. The cycle is then repeated for the next version of the product, beginning with a new Requirements statement, which ideally uses feedback from customers about the current product to determine what customers need or want next.
    Most software makers adhere to a formal development process similar to the one described above. The hardware development process is similar but includes some additional considerations for the outsourcing of parts and verification of the manufacturing process itself.

  • Please update the functional specifications for Vendor Balance Report

    Dear All,
    Please update the functional specifications for Vendor Balance Report with
    proper descriptions.
    Please include
    1. How your selection screen should look like..
    2. Output format ( in an excel sheet)
    3. Logic for every field in the output format (viz. .. how do link the
    vendors from the selection screen to the BKPf and BSEG tables, how do you
    find open and closed items in BSEG , etc.)
    Please avoid statements like 'The total value of all the break-up should
    tally with the balance as shown in FBL1N for a given vendor for the given
    day.'
    You need to give the logic for the FBL1N, in that case.
    Regards
    Rama Mohan

    Hello again,
    Regarding having them update the specs, one can dream. Dreams are free. LOL. Hopefully the memory makers will update their specs as more makers start supporting a large memory configuration.
    The 4GB sticks I am using are http://shop.kingston.com/partsinfo.asp?ktcpartno=KTL-TP667/4G
    I did not do an extended test of the sticks in my MBP. Their home is in the ThinkPad I have because it is running Windows Server 2008 with Hyper-V.
    As you can see from the link above, these little suckers are pricey. But consider the price of 2GB SoDIMMs were $950 when they entered the market a couple of years ago. The price will drop.
    I asked the Kingston rep that sent these to me if online sites like newegg.com would have them soon. She indicated no, but the corporate buying sites like CDW and Zone would. So check around. They just started shipped a couple of weeks ago so be patient.
    If you have any other questions, please stop by http://blogs.technet.com/keithcombs/archive/2008/07/05/testing-my-apple-macbook- pro-with-8gb-of-ram.aspx and ask there. I'll see them much more quickly.
    Cheers,
    Keith Combs
    Microsoft

  • How can I uniquely identify computers on the same network/account specifically for airdrop use?  When I change name on one computer under contacts if changes on all computers.

    How can I uniquely identify computers on the same network/account specifically for airdrop use?  When I change name on one computer under contacts it changes on all computers.  I would like to change icon and name for each computer.

    you would need to setup a VPN and tunnel into your office.
    FYI..the default ports are 3283 and 5900.

  • I can't download the apps with big size like need for spees, but in apps with normal size(less than 100KB)there is no problem,is there any body who can help me?

    I can't download the apps with big size like need for spees

    Have a little patience. 4 minutes is only a short time for someone to find your post and reply to it. Also clicking on "This Solved My Problem" marks your problem as solved so many folks that may otherwise help will pass the question by since it is "solved."
    I suggest you start a new question that gives a good title to a specific problem. Then in the body of the thread describe the problem in detail, tell us what steps you have tried so far to correct the problem, what happened, and what error messages you received.

  • Where can I buy a 3.0 usb hub (2008 version 1 USB 3.0 specification) for my new Mac Mini?

    Where can I buy a 3.0 usb hub (2008 version 1 USB 3.0 specification) for my new Mac Mini?

    I'd go for the > USB 3.0 4-Port Hub Belkin, mostly because Belkin has never let me down.
    Also the > D-Link | DUB-1340 4-Port Superspeed USB 3 Hub, looks like a good choice.
    For more, see > USB 3.0 Hubs - Google Search

  • Pin Specifications for Creative Sound Blaster Audigy SB1394

    ;Pin Specifications for Creative Sound Blaster Audigy SB394 I have a Sound Blaster Audigy SB934 CA000-IAF Creative Tech '0 AA299J basically a Sound Blaster Audigy Platinum (wiouth the front bay for conectivity.)? And since I dont' have the front bay for heaphone and mic conectivity I was wondering if there is a spec sheet for the 40-Pin conectivity that is used for the front bay. I was wondering if anyone could provide me with such spec sheet so that I can try to conect my frontal Intel board plugs for headphone and microphone (would like to use my headset.)
    There are a lot of pins on the card and well only about 8 in the conector for the front plugs. So if any dev from the forum is reading this I would greatly apreciate it if I could use my front Intel sound plugs on this old model card.
    Thank you for all your help.

    http://www.driverheaven.net/audio-general-technical-discussion/5279-creative-audigy-2-ad_ext-pin-assignment.html
    That will help you with the pin assignments.......
    And you can also try one of these to connect a lot more easily to your front panel audio jacks.......
    www.x-tap.com
    I used the above with four Audigy LS and SE's and it works a treat!

  • Functional report specifications for AUC reporting

    Hi All,
    Does anyone have a sample document about functional report specifications for
    AUC reporting?
    Can anyone e-mail a sample report to [email protected]
    Thank you,
    Best Regards,
    John Mc

    Hi,
    Looking at the requirement  it seems like you have 2 level of authorization check i.e. Check first user is authorized for cost center. And if yes then look for teh combination of Func area related to that cost center, for that user.
    I think keeping the second check for func. area within loop of cost center (for each cost center) should work.
    Thank-You.
    Regards,
    Vinod

  • Technical specifications for adding a field in screengroup

    Hi ,
    I have a view profile say FL .  In the activity and layout view I have added a Tab say "85" -Additional data 3- . Now I have made tab active and used 150 ans screen group "150-USER data"
    I want developer to add a new cusom filed in screen group 150-user data .
    Specification for field is ready .
    Question is
    1) How to know which table this screen group 150-user data belongs to so that developer can add it there ? Or is there any other method of specification .
    2)I wil be using this field in equipment also . However in equipment I would like to control data orgin from FL or  individual maintenance . How to enable this feature in custom fields of equipment master data .
    NPB

    NPB,
    Normally the user defined fields are filled through the user exit and the user exit documentaion would help you in identifying which core table needs to be extended to include the custom fields.Have a look at the same for help.
    1) In your case the custom fields needs to included to EQUI or IFLOT or EQUZ or ILOA depending upon your business needs.Have a look at the user exit (ITOB0001 )help for detailed documentation.
    2). It would probably require additional coding to accomplish this requirement(Visibility of transfer or individual maintenance for these custom fields), but it should be possible through the same user exit and or save user exit (IEQM0003 Additional checks before updating equipment).
    Regards
    Narasimhan

  • Can you set up a search specifically for Bookings in BC?

    I have a dive client who wants to have the next 3 months of events setup on the website so this
    could mean 30 - 50 events in advance. So I am going to build the events in the Bookings Module
    and link the payments form to each event BUT I would also like to have a search box specifically
    for dates or name of events.
    Possible??
    Thanks
    Gary

    Hi Gary,
    Yes, absolutely you can. See screenshot:

  • Maintaining two values for upper & lower specification for a MIC

    Hi gurus,
    My client requirement is that they want to maintain two values for upper specification and lower specification for a quantitative characteristic.
    For eg. Master inspection characteristic is carbon %
    & for this characteristic they want to maintain values as follows
    lower specification:0.00   upper specification:0.32
    lower specification:0.37   upper specification:0.60
    The requirement is that both these limits should be maintained for the same MIC and system should not allow values between 0.32-0.37
    Is this possible in standard scenario.If possible pls. provide me the solution.
    Thanks in advance.

    No, not possible in standard SAP.  A test can only have one set of limts.
    What you describe sounds more like specs anyway rather then test limits. 
    Your client isn't maintaining specs for materials in MIC's are they?  This would be the least desirable method and not really the way SAP designed it to be.
    Craig

  • Development of Technical Specification for WDA

    Hi,
    I've not seen any new information on a Technical Specification template specifically for WDA.
    Has there been any new developments on this since last year?
    Where can I download the T.S. if it is available?
    Thanks.

    Index:
    DOCUMENT INFORMATION
    ACCEPTANCE     
    STAKEHOLDERS     
    BUSINESS KEY STAKEHOLDERS     
    OTHER KEY ROLES AND RESPONSIBILITIES     
    1.    CONFIGURATION FOR PROJECT     
    2.     DATA STRUCTURES     
    2.1     APPLICATION DATA STRUCTURE MODEL     
    2.2     DATA ACCESS OBJECTS     
    3.     SYSTEM INTERFACE PROCESSES     
    3.1     SYSTEM CONNECTIVITY MODEL     
    3.2     SYSTEM INTERFACE DEFINITIONS     
    3.2.1     Interface Definition:     
    <Name of the interface e.g.  BAPI/RFC, Webservice, Bean etc >     
    <Name of the interface e.g.  BAPI/RFC, Webservice, Bean etc >     
    3.2.2     <BAPI/RFC, Webservice, Bean >Definition:     
    <Name of the interface e.g.  BAPI/RFC, Webservice, Bean etc >     
    4.     OBJECT DESIGN     
    4.1     WEB DYNPRO COMPONENT MODEL     
    4.1.1     Views used in the WD Component     
    4.1.2     External Components used in the WD Component     
    4.1.3     Interface Controller used in the WD Component     
    4.1.4     Custom Controllers used in WD component     
    4.1.5     Events, Actions and Methods     
    4.1.6     Context Elements Defined in WD Components     
    4.1.7     Context Binding/Mapping in WD Components     
    4.2     ABAP RFCS     
    4.2.1     RFC Summary:     
    5.     USER INTERFACE SCREEN DESIGNS     
    5.1     VIEW ARRANGEMENT (WINDOWS DIAGRAM)     
    5.2     NAVIGATION MODELING     
    5.3     WEBDYNPRO VIEW DETAILS     
    5.3.1     <View Name>: <This view shows information related to view including screen shots.>     
    INPUT DATA:     
    OUTPUT DATA:     
    6.     APPENDIX A u2013 OUTSTANDING ISSUES

  • Any RunningApplications-like function for non-windowed processes?

    Am I missing any RunningApplications-like function for non-windowed processes like Unix executables? To start with I'd settle for processes in user-space but would ultimately like to list processes like Activity Monitor does. Even comparing RunningApplications results to user space Activity Monitor results will show the difference.
    As far as I can tell you need to go all the way down to kauth and kernel space to watch for non-windowed processes being launched. Is there somethig in-between I'm missing? A notification device about launching apps would be perfect if it cover all processes.
    Thanks,
    =Tod

    I think kqueue may be able to do what you want. Look at the EVFILT_PROC filter. You may have to watch a number of processes - perhaps all of them. But that would tell you any time you get a fork and whenever a process is reaped.
    I looked at kqueue at it does what I want but you need to register it on a by process/file basis which is great for a very specific set of things but not for overall system watching. (I also looked at fsevents but it is designed as a post-event notification system.) While NSWorkspace has the usual Cocoa model notifcation willlaunchApp, didlaunchApp, etc it seems that you need to get the kernel to watch the launch lifecycle of non-windowed functions.
    I actually did manage to get a comprehensive list of running apps out of parsing sysctl output with much less trouble than I expected. So far I have managed to get the pid, uid and abbreviated processname and the list seems to match the Activity Monitor list - at least at this testing printf stage. Getting the username from uid should be trivial and the full file name is doable it just requires some struct length and offset math. I'd like the launch path information but I can live without it for monitoring purposes if I can't figure out how to get it.
    This means that the monitoring part of the running system seems relatively straight forward - wrapping the call in an NSTimer and watching for changes in the returned results. But the watching of the actual starting and stopping of all processes remains some deeper work.
    Thanks for all the suggestions,
    =Tod

Maybe you are looking for

  • Calculate Revenue's Percentage per Year, Month or any filter that is applied to the Dashboard in DAX using Excel PowerView.

    Hello folks, I am facing an odd issue here with a Dashboard Report in PowerView. The task is to display, in a table, a percentage of total (revenue) by any filter that the client wants. For instance, if the client selects the year (to be short) 2013,

  • Xml parsing to get only first node.

    Hello, I am trying to parse the following xml tag. I want only the first node of the ORDER_PAYMENT_DETAIL element, and then other node element. I would appreciate your help. <ORDER_PAYMENTS> <ORDER_PAYMENT> <ORDER_NO>20000404</ORDER_NO> <PAYMENT_METH

  • Calling a java class from an oracle stored procedure

    my oracle stored procedure is: create or replace PROCEDURE openpdffile AS LANGUAGE JAVA NAME 'pdfopenbook.mainbook()'; it is valid and so is this java class; import java.sql.*; import oracle.jdbc.*; public class pdfopenbook //class pdfopen public sta

  • Dump_area_size is unlimited but Enterprise manager showing 57% full in

    Hi, I am working on oracle 10g 10.2.0.1 on Linux 32 bit, In Enterprise manager it is showing Dump Area used (%) 60%, when i removed all of my trace file from bdump,cdump,dpdump,adump. My archive log files are also in this dump area, so i removed most

  • PS Displaying Colors Oddly...

    I can't seem to figure this out (ive done a couple hours of research on the subject via google). When I Save For Web the color shifts. It becomes more vibrant (which I would prefer...). I have reset the settings for photoshop followed by a uninstall/