Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
Hi,
I am in the process of upgrading from 9.1 M070 to 10.2 M020.
My company use a lot of custom classes. All of these have compiled successfully - thankfully. However one reported a warning because the following method is now deprecated (and this doesnt appear in the latest Javadoc, no reference of the method does and certainly no reference of what to use instead):
wt.change2.VersionableChangeItem.getCreator();
Now when I look at "wt.change2._VersionableChangeItem" there is another "getCreator()" method that the above seems to override. I think I can use this method. However, this begs the question, what is the point of the underscore classes? Are we supposed / "allowed" to use them - in some programming languages (e.g. Python) prefixing "_" is another way of saying "please leave well alone"?
Regards,
Toby
Hey Toby,
Unlike Python there is no convension this way for Java.
The reason for the underscore is standard in Windchill though.
When the class name has the "_" it auto generated piece of the classname and the class is auto generated by using some java annotations.
Hope this clarified everything for you.
Thanks,
Jarrett
Hi Jarrett,
First thanks for your reply.
I didn't think it was a java convention, its not something I have ever seen in it.
By "standard" you mean for 10.x (I assume, I have not looked at 10.1, only 10.2). I was just curious as to why it was introduced. They do not appear to be auto-generated in any way, they seem to be very deliberate classes in their own right - with the non-underscored equivalent class as a subsclass in every case I have seen. Their content is also distinct from said underscore-less classes.
However, if theres nothing special about them, I'll continue to use them if need be.
Regards,
Toby