Main Menu
Login
SSL SecureMode
Username:
Password:  
Lost Password?
Register now!
ChangeVision Members Map
Search
Categories
Main : 
 Syndicate harry's entries

Most recent entries
2007/12/25
Category: Developers Blog : 

Author: harry (5:44 pm)
We have got many user requests for Template Class and
importing Java5.0 source code in JUDE Community version.
Now we are happy to announce that we have already released
JUDE Professional5.2 beta and Community5.2 beta before Christmas,
which support Template Class, and importing Java5.0 source code
in JUDE Community version.

Here I would like to introduce Template Class in JUDE roughly.


Let’s have a glance at Template Class first:

This is the partial sketch diagram of ArrayList in package java.util by import Java5.0 source code.
From it, we know that AbstractList, List, and ArrayList are Template Class,
each of them has a template parameter named E,
while AbstractList and List are anonymous Bound Class.


So how to create Template Class and Bound Class?

Template Class is just a Class with template parameters,
so first create a normal Class,
and then add/delete template parameter by popup menu of Class,
or by Template Parameter Tab in property view of Class.


About Bound Class,
we can create template binding from normal Class to Template Class,
so the normal Class is a Bound Class now.

As to anonymous Bound Class, there are two ways to create.
One way is just delete name of Bound Class.
The other way is input content in type of attribute/operation.
For example, we have List, and attribute0 in Class0,
and then input “List” in type filed of attribute0,
it will create an anonymous Bound Class which binds to List,
and the actual parameter is String.


Compare two patterns:

Compare diagram and source code of these two patterns,
we can know the difference between them.
But a little confused, right?


Hope it's useful to you guys.
And if you have any questions and requests,
please feel free to send email or post articles here to ask us.

Thanks all, and Merry Christmas, and Happy New Year!