1 package net.agentis.jmi.apml; 2 3 public final class ParamModeEnum implements ParamMode { 4 public static final ParamModeEnum IN = new ParamModeEnum("in"); 5 public static final ParamModeEnum OUT = new ParamModeEnum("out"); 6 public static final ParamModeEnum INOUT = new ParamModeEnum("inout"); 7 8 private static final java.util.List typeName; 9 private final java.lang.String literalName; 10 11 static { 12 java.util.ArrayList temp = new java.util.ArrayList (); 13 temp.add("APML"); 14 temp.add("ParamMode"); 15 typeName = java.util.Collections.unmodifiableList(temp); 16 } 17 18 private ParamModeEnum(java.lang.String literalName) { 19 this.literalName = literalName; 20 } 21 22 public java.util.List refTypeName() { 23 return typeName; 24 } 25 26 public java.lang.String toString() { 27 return literalName; 28 } 29 30 public int hashCode() { 31 return literalName.hashCode(); 32 } 33 34 public boolean equals(java.lang.Object o) { 35 if (o instanceof ParamModeEnum) return (o == this); 36 else if (o instanceof ParamMode) return (o.toString().equals(literalName)); 37 else return ((o instanceof javax.jmi.reflect.RefEnum) && ((javax.jmi.reflect.RefEnum) o).refTypeName().equals(typeName) && o.toString().equals(literalName)); 38 } 39 40 public static ParamMode forName(java.lang.String name) { 41 if (name.equals("in")) return IN; 42 if (name.equals("out")) return OUT; 43 if (name.equals("inout")) return INOUT; 44 throw new java.lang.IllegalArgumentException ("Unknown literal name '" + name + "' for enumeration 'APML.ParamMode'"); 45 } 46 protected java.lang.Object readResolve() throws java.io.ObjectStreamException { 47 try { 48 return forName(literalName); 49 } catch (java.lang.IllegalArgumentException e) { 50 throw new java.io.InvalidObjectException (e.getMessage()); 51 } 52 } 53 } 54 | Popular Tags |