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