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.util.Enumeration;
- import java.util.Vector;
-
- class InfoPaneClassItem implements InfoPaneItem {
- private String name;
- private String midName;
- private String longName;
-
- InfoPaneClassItem(String var1, String var2) {
- this.longName = var2;
- this.midName = After(this.longName, ' ');
- this.name = After(this.midName, '.');
- }
-
- static String After(String var0, char var1) {
- return var0.substring(var0.lastIndexOf(var1) + 1);
- }
-
- public boolean HasSubCategory() {
- return !this.midName.equals("java.io.Serializable") && !this.midName.equals("java.lang.Cloneable") && !this.midName.equals("java.rmi.Remote") && !this.midName.equals("java.util.EventListener") || this.GetEnumeration().hasMoreElements();
- }
-
- public String GetName() {
- return this.name;
- }
-
- public String GetLongName() {
- return this.longName;
- }
-
- public Enumeration GetEnumeration() {
- InfoPaneVector var1 = new InfoPaneVector();
-
- try {
- Class var2 = Class.forName(this.midName);
- if (var2 != null) {
- this.AddModifier(var2, var1);
- this.AddConstructors(var2, var1);
- this.AddFields(var2, var1);
- this.AddInterfaces(var2, var1);
- this.AddMethods(var2, var1);
- this.AddSuperclass(var2, var1);
- }
- } catch (ClassNotFoundException var3) {
- System.out.println("InfoPaneClassItem.GetEnumeration: " + var3 + " -- could not load " + this.longName);
- ((Throwable)var3).printStackTrace();
- } catch (LinkageError var4) {
- System.out.println("InfoClassItem.GetEnumeration: " + var4 + " -- could not load " + this.longName);
- ((Throwable)var4).printStackTrace();
- } catch (InfoPaneException var5) {
- System.out.println("InfoPaneClassItem.GetEnumeration: " + var5 + " -- could not load " + this.longName);
- ((Throwable)var5).printStackTrace();
- }
-
- return ((Vector)var1).elements();
- }
-
- void AddModifier(Class var1, InfoPaneVector var2) throws InfoPaneException {
- if (!var1.isInterface()) {
- InfoPaneClassSubItem var3 = new InfoPaneClassSubItem(var1.getModifiers());
- if (var3.HasSubCategory()) {
- var2.Insert(var3);
- }
- }
-
- }
-
- void AddFields(Class var1, InfoPaneVector var2) throws InfoPaneException {
- Field[] var3 = var1.getFields();
- if (var3 != null) {
- InfoPaneClassSubItem var4 = new InfoPaneClassSubItem("InfoPane_Constants");
- InfoPaneClassSubItem var5 = new InfoPaneClassSubItem("InfoPane_Fields");
- InfoPaneClassSubItem.AddFields(var4, var5, var3);
- if (var4.HasSubCategory()) {
- var2.Insert(var4);
- }
-
- if (var5.HasSubCategory()) {
- var2.Insert(var5);
- }
- }
-
- }
-
- void AddInterfaces(Class var1, InfoPaneVector var2) throws InfoPaneException {
- Class[] var3 = var1.getInterfaces();
- if (var3 != null) {
- InfoPaneClassSubItem var4 = new InfoPaneClassSubItem(var3, var1.isInterface());
- if (var4.HasSubCategory()) {
- var2.Insert(var4);
- }
- }
-
- }
-
- void AddConstructors(Class var1, InfoPaneVector var2) throws InfoPaneException {
- Constructor[] var3 = var1.getConstructors();
- if (var3 != null) {
- InfoPaneClassSubItem var4 = new InfoPaneClassSubItem(var3);
- if (var4.HasSubCategory()) {
- var2.Insert(var4);
- }
- }
-
- }
-
- void AddMethods(Class var1, InfoPaneVector var2) throws InfoPaneException {
- Method[] var3 = var1.getMethods();
- if (var3 != null) {
- InfoPaneClassSubItem var4 = new InfoPaneClassSubItem("InfoPane_Methods");
- InfoPaneClassSubItem var5 = new InfoPaneClassSubItem("InfoPane_Static_Methods");
- InfoPaneClassSubItem.AddMethods(var4, var5, var3, var1.isInterface());
- if (var4.HasSubCategory()) {
- var2.Insert(var4);
- }
-
- if (var5.HasSubCategory()) {
- var2.Insert(var5);
- }
- }
-
- }
-
- void AddSuperclass(Class var1, InfoPaneVector var2) throws InfoPaneException {
- Class var3 = var1.getSuperclass();
- if (var3 != null) {
- InfoPaneClassSubItem var4 = new InfoPaneClassSubItem(var3);
- if (var4.HasSubCategory()) {
- var2.Insert(var4);
- }
- }
-
- }
-
- public boolean HasLongName() {
- return true;
- }
-
- public boolean CanPaste() {
- return true;
- }
-
- 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);
- }
- }
-
- }
- }
-