Gentlepeople,

I have a version of Axis compiled with enum replaced by enums, using
constants would have been better.

I just copied the whole thing, tools and all, into a decent IDE and did
a global replace of org.apache.axis.enum with org.apache.axis.enums, I
then used ant to compile axis.

BTW I cannot see why the good folk at java decided to pinch enum from
us. It is what I have called just about every Enumeration I have used,
it is not a complete word, etc. I wouldn't put it passed them to have
done it just to annoy us.

JWD

>>> [EMAIL PROTECTED] 02/05/05 03:29 AM >>>
On Friday 04 February 2005 12:52, Davanum Srinivas wrote:

> On Fri, 4 Feb 2005 10:06:11 +0100, Michael Schuerig 
<[EMAIL PROTECTED]> wrote:
> > On Thursday 03 February 2005 04:27, Davanum Srinivas wrote:
> > > you can replace xxx.enum.yyy with xxx.constants.yyy
> >
> > This only works in cases where one simply uses the constants. It
> > does not work for variable, field, and parameter types.

> can u give me an example?

Try to compile this:

package test;

import org.apache.axis.constants.Style;

public class ConstantsVsEnum {
    public static final Style myStyle = Style.DOCUMENT;
    
    private static void styleTaker(Style style) {
    }
    
    public static void main( String[] args ) {
        styleTaker(myStyle);
        styleTake(Style.DOCUMENT);
    }
}

These are the errors you'll probably get:

test/ConstantsVsEnum.java:7: incompatible types
found   : org.apache.axis.enum.Style
required: org.apache.axis.constants.Style
    public static final Style myStyle = Style.DOCUMENT;
                                             ^
test/ConstantsVsEnum.java:14: cannot find symbol
symbol  : method styleTake(org.apache.axis.enum.Style)
location: class test.ConstantsVsEnum
        styleTake(Style.DOCUMENT);
        ^
2 errors


Michael

-- 
Michael Schuerig                            You can twist perceptions
mailto:[EMAIL PROTECTED]                        Reality won't budge
http://www.schuerig.de/michael/               --Rush, Show Don't Tell

Reply via email to