Original article address:
Http://blog.csdn.net/igate/archive/2008/04/12/2286147.aspx
Coding environment: Eclipse SDK 3.2.2, Tomcat5.5.20, XFire-1.2.6.Body:There are multiple methods to generate a web service client using xfire. Eclipse Plugin provides Eclipse support for XFire's WSDL-> Code generator, which requires
Recently busy studying Glusterfs, was going to write a few blog weekend, but due to debug some of the new features of Glusterfs used a whole day, and a day to accompany the wife of adults to go shopping! This evening after browsing the microblogging discovery time has come to blog one, this blog content is mainly in the previous period of time to study the Thrift code generator of the source of detailed analysis, no specific analysis of parsing, because it is the tool field generated code, peopl
In the process of program development, we often write such classes: some or all of the properties of a class do not want to be accessed directly by the outside world, without the public field being decorated. In this way, the method invocation becomes the only way to access these properties. JavaBean is a good example of strict adherence to object-oriented design logic and all properties are private. For any attribute xxx, there is a public getxxx ()
, which notifies the corresponding reply to cascade Delete.generate Java code with the Rational Rose tool:Note: The tool itself does not reach the generated code correctly.Step: "1" Select tools (Tools) |java/j2ee| Project specification (item specification) command."2" The path added under Classpath, you can choose the target is to generate a Jar/zip file or in a directory"3" Select tools|java/j2ee| Generate
, in the field of concerned about automobiles, tires must be combined in the automobile industry because it makes no sense when it leaves the automobile. However, in the shops where tires are sold, even if the tires leave the car, it makes sense, and this can be aggregated. In Agile development, we also said that if a combines B, A needs to know the lifecycle of B, that is, a may be responsible for generating or releasing B, or a knows the generation and release of B in some way. Their code is
. For example, in the field of concerned about automobiles, tires must be combined in the automobile industry because it makes no sense when it leaves the automobile. However, in the shops where tires are sold, even if the tires leave the car, it makes sense, and this can be aggregated. In Agile development, we also said that if A combines B, A needs to know the lifecycle of B, that is, A may be responsible for generating or releasing B, or A knows the generation and release of B in some way.
Th
. Rose does not generate attributes for the dependency.
Note: Avoid bidirectional dependency. Generally, there should be no two-way dependency.
The code generated by Rose is as follows:// C5.h
# Include "c6.h"
Class C5
...{
};
// C6.h
# Include "c5.h"
Class C6
...{
};
Although Rose does not generate attributes, i
may only be distinguished by semantics.
3. Dependency
Dependency:Some methods of C6 may be used in C5. You can also say that the assistance of C6 must be provided to complete all functions in C5. C5 depends on the definition of C6. It generally contains the header file of C6 in the header file of C5 class. ROSE does not generate attributes for the dependency.
Note: Avoid bidirectional dependency. Generall
few notes:
1:name write Javah.
2:location is the directory where your Javah is located
3:working directory fill it in.
4:arguments Fill in
The last apply is the right,
Then put the mouse on the Hellowordactiviry.java, and notice that it's not on the project.
Then click on the button just now, point this green, not the right triangle, and then you will see the JNI directory under the header file,
The same is the correct code
[HTML]View Pla
directory where your Javah is located
3:working directory fill it in.
4:arguments Fill in
The last apply is the right,
Then put the mouse on the Hellowordactiviry.java, and notice that it's not on the project.
Then click on the button just now, point this green, not the right triangle, and then you will see the JNI directory under the header file,
The same is the correct code
[HTML]View Plaincopy
/* Don't EDIT this file-it are machine generated */
, after reading the above description, we should understand the relationship between the relationships and specific to the code is how, so-called repetition, is only the above extension, such as A and B has a "1-to-many" of the repetition, there is a list in a, which holds the B object's n references , that's it.Well, to here, already put the above diagram of the relationship is finished, I hope you can have some gains, I also spent a lot of time ah (
In Java classes, except constants declared as static and public, general object data scopes are declared as private. In this way, the attributes of the object will not be changed at will, and debugging will be much more convenient: In the public method of the class, you can see where the attribute value is changed by adding a call stack. Data declared as private is generally not allowed to write some set and get methods. Powerful
Key words: Getters and Setters, getter and setter methods, Constructor using fields, constructor methods (constructors), Eclipse-jee use method, auto-generated code, Eclipse3.5, Schematic usage Tutorials(1) The Pojo class automatically generates getter and setter methods:Persion.java The original code:Right-click in the blanks of the above code, or right-click on the person
In the previous article, we introduced a method for generating javadoc annotations that can be extracted by JDK. Next we will add a method to generate this annotation ,:
Step 1: move the cursor next to the statement to which you want to add comments. Shortcut: Shift + ALT + J
This method of adding annotations also applies to the data Scope of the class. Personally, the shortcut key takes effect in the foll
Eclipse has two very simple functions, but it is absolutely very practical!
1. Annotations are very important. In eclipse, you can quickly generate annotations. Right-click the method body to be annotated and choose-source-gernerate element comment (shortcut keys are also available: alt + Shift + J)
After you click it, the following comments are generated, inc
Alt+ Shift +J
Click a blank space and useAlt+ Shift +JThe shortcut key generates the author's name.
Click the method name and useAlt+ Shift +JComment on the method for generating the shortcut key. Make a slight modification to make it easy to write comments.
This annotation can be easily generated by ECLIPSE, which is very helpful for others to understand your project.
------------
How does eclipse
Many people do not know how to generate jar files in eclipse, or they will always receive
Exception in thread "Main" Java. Lang. noclassdeffounderror :******
This error message.
In fact, generating jar files in eclipse is very simple:
1. Right-click the project to generate the jar and select export from the menu)
the child class is generated, when constructed, the virtual pointer of the subclass object points to the virtual table of the subclass, and then the conversion from derived* to base* does not alter the virtual table pointer, so this time p-> Virtualfunction, in fact, is p->vfptr->virtualfunction, it is in the construction of the time has pointed to the subclass of Virtualfunction, so called the virtual function of the subclass, this is polymorphic.Ad
array when referencing tire.5. Synthetic relationship (composition) Note that the solid Diamond + solid Line (arrow) is used to connectThe synthesis relationship is stronger than the aggregation relationship, is a strong ownership relationship, embodies the strict relationship between the whole and the part, it requires that the general aggregation relationship represents the whole object is responsible for representing the life cycle of the part of the object, or their life cycle.class bird{
This short article is well written. it can be said that using PHP to explain UML (or conversely) is an innovation. through this article, I also found a good site: www.phppatterns.com. The translation of various UML terms comes from the book I am reading, TheUnifiedModelingLanguageUserGuide. UML (UnifiedModelingLanguage) is a good short article. using PHP to explain UML (or to put it back) can be said to be an innovation. through this article, I also found a good site: www.phppatterns.com. The tr
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.