Title: Reverse Engineering Enumerations in Java?

Hi, has anyone had any luck reverse engineering enumerations correctly, and then being able to forward engineer them?

Look at the following code:

>>>>>>>>>>>>>>>>>>>>>>
public class SampleEnum
{
        public static final SampleEnum VALUE_1 = new SampleEnum("VALUE ONE");
        public static final SampleEnum VALUE_2 = new SampleEnum("VALUE TWO");

        private String val;

        public SampleEnum(String val)
        {
                this.val = val;
        }

        public String getVal() { return val; }
        public static SampleEnum getEnum(String val)
        {
                if (val.equals(VALUE_1.getVal())) return VALUE_1;
                if (val.equals(VALUE_2.getVal())) return VALUE_2;
                return null;
        }

}
<<<<<<<<<<<<<<<<<

This gets reversed as a class with two associations to itself for the public static finals, that then forward engineer into oblivion. Is this even doable in Rose?


P

Thx

P

________________________
Peter Hazlehurst
Chief Technology Officer
Mercari Technologies

http:  www.mercaritech.com
w:  202.244.0900 x367
c:   703.597.1750
f:    202.244.1951
efax: 801.457.9458  (PrivateLine)

Reply via email to