home *** CD-ROM | disk | FTP | other *** search
- package lotus.notes.internal;
-
- import java.lang.reflect.Constructor;
- import java.lang.reflect.Field;
- import java.lang.reflect.Method;
- import java.lang.reflect.Modifier;
- import java.util.Enumeration;
- import lotus.notes.JavaString;
-
- class InfoPaneClassSubItem implements InfoPaneItem {
- private InfoPaneVector vector;
- private String name;
-
- InfoPaneClassSubItem(String var1) {
- this.name = JavaString.resource.getString(var1);
- this.vector = new InfoPaneVector();
- }
-
- InfoPaneClassSubItem(int var1) throws InfoPaneException {
- this("InfoPane_Class_Modifier");
- if (Modifier.isAbstract(var1)) {
- this.AddMember("abstract");
- } else {
- if (Modifier.isFinal(var1)) {
- this.AddMember("final");
- }
-
- }
- }
-
- InfoPaneClassSubItem(Constructor[] var1) throws InfoPaneException {
- this("InfoPane_Constructors");
-
- try {
- for(int var2 = 0; var1[var2] != null; ++var2) {
- Constructor var3 = var1[var2];
- if (Modifier.isPublic(var3.getModifiers())) {
- this.AddConstructor(var3);
- }
- }
-
- } catch (ArrayIndexOutOfBoundsException var4) {
- }
- }
-
- InfoPaneClassSubItem(Class[] var1, boolean var2) throws InfoPaneException {
- this(var2 ? "InfoPane_Extends_Interfaces" : "InfoPane_Implements_Interfaces");
-
- try {
- for(int var3 = 0; var1[var3] != null; ++var3) {
- Class var4 = var1[var3];
- if (Modifier.isPublic(var4.getModifiers())) {
- this.AddMember(var4.getName(), var4.toString());
- }
- }
-
- } catch (ArrayIndexOutOfBoundsException var5) {
- }
- }
-
- InfoPaneClassSubItem(Class var1) throws InfoPaneException {
- this("InfoPane_Superclass");
- if (Modifier.isPublic(var1.getModifiers())) {
- this.AddMember(var1.getName(), var1.toString());
- }
-
- }
-
- static void AddFields(InfoPaneClassSubItem var0, InfoPaneClassSubItem var1, Field[] var2) throws InfoPaneException {
- try {
- for(int var3 = 0; var2[var3] != null; ++var3) {
- Field var4 = var2[var3];
- int var5 = var4.getModifiers();
- if (Modifier.isPublic(var5)) {
- if (Modifier.isStatic(var5) && Modifier.isFinal(var5)) {
- var0.AddField(var4);
- } else {
- var1.AddField(var4);
- }
- }
- }
-
- } catch (ArrayIndexOutOfBoundsException var6) {
- }
- }
-
- static void AddMethods(InfoPaneClassSubItem var0, InfoPaneClassSubItem var1, Method[] var2, boolean var3) throws InfoPaneException {
- try {
- for(int var4 = 0; var2[var4] != null; ++var4) {
- Method var5 = var2[var4];
- int var6 = var5.getModifiers();
- if (Modifier.isPublic(var6)) {
- if (Modifier.isStatic(var6)) {
- var1.AddMethod(var5, var3);
- } else {
- var0.AddMethod(var5, var3);
- }
- }
- }
-
- } catch (ArrayIndexOutOfBoundsException var7) {
- }
- }
-
- InfoPaneConstructorItem AddConstructor(Constructor var1) throws InfoPaneException {
- return (InfoPaneConstructorItem)this.vector.Insert(new InfoPaneConstructorItem(var1));
- }
-
- InfoPaneFieldItem AddField(Field var1) throws InfoPaneException {
- return (InfoPaneFieldItem)this.vector.Insert(new InfoPaneFieldItem(var1), true);
- }
-
- InfoPaneMethodItem AddMethod(Method var1, boolean var2) throws InfoPaneException {
- return (InfoPaneMethodItem)this.vector.Insert(new InfoPaneMethodItem(var1, var2), true);
- }
-
- InfoPaneMemberItem AddMember(String var1) throws InfoPaneException {
- return (InfoPaneMemberItem)this.vector.Insert(new InfoPaneMemberItem(var1));
- }
-
- InfoPaneMemberItem AddMember(String var1, String var2) throws InfoPaneException {
- return (InfoPaneMemberItem)this.vector.Insert(new InfoPaneMemberItem(var1, var2));
- }
-
- InfoPaneMemberItem FindMember(String var1) {
- return (InfoPaneMemberItem)this.vector.Find(var1);
- }
-
- public boolean HasSubCategory() {
- return this.vector != null && this.vector.size() > 0;
- }
-
- public Enumeration GetEnumeration() {
- return this.vector == null ? null : this.vector.elements();
- }
-
- public String GetName() {
- return this.name;
- }
-
- public String GetLongName() {
- return this.name;
- }
-
- public boolean HasLongName() {
- return false;
- }
-
- public boolean CanPaste() {
- return false;
- }
-
- public void Print(String var1, boolean var2) {
- if (var2 && this.HasLongName() && this.CanPaste()) {
- System.out.println(var1 + this.GetLongName());
- } else {
- System.out.println(var1 + this.GetName());
- }
-
- if (this.HasSubCategory()) {
- Enumeration var3 = this.GetEnumeration();
-
- while(var3.hasMoreElements()) {
- ((InfoPaneItem)var3.nextElement()).Print(var1 + " ", var2);
- }
- }
-
- }
- }
-