api-design
Why is JavaMail Transport.send() a static method?
I\'m revising code I did not write that uses JavaMail, and having a little trouble understanding why the JavaMail API is designed the way it is.I have the feeling that if I understood, I could be doin[详细]
2022-12-20 03:09 分类:问答static vs non-static method for immutable class
Given the class definition below. How would one go about deciding whether the stub methods should be static or non-static?[详细]
2022-12-19 07:00 分类:问答Does anyone design api or library code in this way?
I was reading up some things about how to design a library or API well, and stumbled across Joshua Bloch\'s great talk at Google Tech Talks. Now although I am nowhere near a professional API developer[详细]
2022-12-17 16:33 分类:问答API design - allocate output?
Is it a good idea for C API functions to allocate their output, or to have the user specify the output buffer? For example:[详细]
2022-12-16 16:10 分类:问答Minimal API v. Convenience
I am trying to design the interface that will be used internally for my application. Following Google\'s example, I strive to reduce public API clutter. However, there are some convenience methods tha[详细]
2022-12-15 18:15 分类:问答API development, one gateway page?
Im currently developing an API, and one thing that I decided was to have one gateway.cfm page that the client sends the request to with a sig for verification and etc, and the gateway processes the re[详细]
2022-12-15 02:39 分类:问答API Design: modify to return additional error information
I have an API defined as follows bool IsValid() Now, I want to modify the API so that if the return value is false, then I need additional[详细]
2022-12-15 01:55 分类:问答Overloaded package-private method causes compilation failure - Is this a JLS oddity or javac bug?
I\'ve come across an oddity of the JLS, or a JavaC bug 开发者_运维百科(not sure which).Please read the following and provide an explanation, citing JLS passage or Sun Bug ID, as appropriate.[详细]
2022-12-13 03:37 分类:问答Best API for modeling networked devices with arbitrary attributes to learn from?
I need to design a new API which models networked devices which have a large amount of attributes which vary quite a lot based on the device\'s type. The attribute set is not totally arbitrary though,[详细]
2022-12-12 11:38 分类:问答