Attributes
When you define an attribute in IDL, you are really just defining two methods: a getter and a setter. Unlike the JavaBeans API, you don't use getXXX and setXXX as method names for CORBA attributes. Instead, the method names are the same as the attribute name. The getter is a method with the same name as the attribute that takes no parameters and returns a value. The setter is a void method that takes a parameter that is the new attribute value. For example, suppose you define an attribute like this:
attribute string description;
The IDL-to-Java compiler adds the following two methods to your interface:
public String description(); public void description(String newDescription);
As with the method declarations, you must implement ...
Get Special Edition Using Java™ 2 Enterprise Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.