next up previous contents index
Next: Invoking Babel to generate Up: Java Bindings Previous: Exceptions   Contents   Index


Enumerations

Enumerations are implemented as final static ints in their own Java class, and as such, are accessed just like variables in that class. For example, if we had a sidl package named dealership that contained the following code segment:


  enum car { 
    porsche = 911, 
    ford = 150, 
    mercedes = 550
  };

we would be able to get the value assigned to a Porsche by typing dealership.car.porsche.





babel-0.99.0
users_guide Last Modified 2006-06-27

http://www.llnl.gov/CASC/components
components@llnl.gov