1 16 package org.jmanage.core.management; 17 18 import java.util.Arrays ; 19 import java.util.Comparator ; 20 21 26 public class ObjectInfo implements java.io.Serializable { 27 28 private ObjectName objectName; 29 private String description; 30 private boolean isOpen; 31 private String className; 32 private ObjectAttributeInfo[] attributes; 33 private ObjectOperationInfo[] operations; 34 private ObjectConstructorInfo[] constructors; 35 private ObjectNotificationInfo[] notifications; 36 37 public ObjectInfo(ObjectName objectName, 38 String className, 39 String description, 40 ObjectAttributeInfo[] attributes, 41 ObjectConstructorInfo[] constructors, 42 ObjectOperationInfo[] operations, 43 ObjectNotificationInfo[] notifications) { 44 this.objectName = objectName; 45 this.className = className; 46 this.description = description; 47 this.attributes = attributes; 48 this.constructors = constructors; 49 this.operations = operations; 50 this.notifications = notifications; 51 52 Arrays.sort(this.attributes, new Comparator (){ 53 public int compare(Object o1, Object o2) { 54 ObjectAttributeInfo attrInfo1 = (ObjectAttributeInfo)o1; 55 ObjectAttributeInfo attrInfo2 = (ObjectAttributeInfo)o2; 56 return attrInfo1.getName().compareToIgnoreCase(attrInfo2.getName()); 57 } 58 }); 59 } 60 61 public ObjectAttributeInfo[] getAttributes() { 62 return attributes; 63 } 64 65 public String getClassName() { 66 return className; 67 } 68 69 public ObjectConstructorInfo[] getConstructors() { 70 return constructors; 71 } 72 73 public String getDescription() { 74 return description; 75 } 76 77 public ObjectNotificationInfo[] getNotifications() { 78 return notifications; 79 } 80 81 public ObjectOperationInfo[] getOperations() { 82 return operations; 83 } 84 85 public ObjectName getObjectName() { 86 return objectName; 87 } 88 } 89 | Popular Tags |