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