home *** CD-ROM | disk | FTP | other *** search
- package symantec.descfileconverter;
-
- class CConnection {
- String form;
- String type;
- String init;
- String expr;
- String description;
- String method;
- String arg;
-
- void setMethodName(String var1) {
- int var3 = this.expr.indexOf("%name%.");
- String var2;
- if (var3 == -1) {
- var3 = this.expr.indexOf("%class%.");
- if (var3 == -1) {
- this.method = "none";
- return;
- }
-
- var2 = this.expr.substring(var3 + 8);
- } else {
- var2 = this.expr.substring(var3 + 7);
- }
-
- var3 = var2.indexOf("(");
- if (var3 == -1) {
- this.method = "none";
- } else {
- this.method = var2.substring(0, var3);
- this.setArgName(var1, var2.substring(var3));
- }
- }
-
- void setArgName(String var1, String var2) {
- if (this.form.equalsIgnoreCase("output")) {
- if (var1.equalsIgnoreCase("symantec.itools.awt.ImageListBox") && this.method.equalsIgnoreCase("isEdited")) {
- this.arg = "int";
- } else {
- if (var1.equalsIgnoreCase("symantec.itools.awt.MultiList")) {
- if (this.method.equalsIgnoreCase("getHeadings")) {
- this.arg = "int";
- return;
- }
-
- if (this.method.equalsIgnoreCase("getCellText")) {
- this.arg = "int";
- return;
- }
-
- if (this.method.equalsIgnoreCase("getColumnSize")) {
- this.arg = "int";
- return;
- }
- }
-
- this.arg = "void";
- }
- } else if (var2.startsWith("(%arg%") && !var2.startsWith("(%arg%,")) {
- this.arg = this.type;
- } else if (this.type.equalsIgnoreCase("RelativeURL")) {
- this.arg = "URL";
- } else if (!var2.startsWith("()") && !var2.startsWith("( )")) {
- if (!var2.startsWith("(!") && !var2.startsWith("( !")) {
- if (!var2.startsWith("(true") && !var2.startsWith("( true")) {
- if (!var2.startsWith("(false") && !var2.startsWith("( false")) {
- if (!var2.startsWith("(%arg%, true") && !var2.startsWith("(%arg%, false")) {
- if (!var2.startsWith("(%arg%,true") && !var2.startsWith("(%arg%,false")) {
- if (var2.startsWith("(%name%.") && var2.substring(var2.indexOf("."), var2.indexOf(")")).indexOf("(") == -1) {
- this.arg = "int";
- } else if ((var2.startsWith("(%arg%, %name%.") || var2.startsWith("(%arg%,%name%.")) && var2.substring(var2.indexOf("."), var2.indexOf(")")).indexOf("(") == -1) {
- this.arg = this.type + ",int";
- } else if ((var1.equalsIgnoreCase("symantec.itools.awt.util.ProgressBar") || var1.equalsIgnoreCase("symantec.itools.awt.Slider")) && this.method.equalsIgnoreCase("setValue")) {
- this.arg = "int";
- } else if (var1.equalsIgnoreCase("symantec.itools.awt.util.StatusScroller") && this.method.equalsIgnoreCase("setRightToLeft")) {
- this.arg = "boolean";
- } else {
- this.arg = "void";
- System.out.println("Argument type set to void for method " + this.method + " in");
- System.out.println("component " + var1 + ". This is a best guess,");
- System.out.println("please verify the generated BeanInfo code for accuracy.");
- }
- } else {
- this.arg = this.type + ",boolean";
- }
- } else {
- this.arg = this.type + ",boolean";
- }
- } else {
- this.arg = "boolean";
- }
- } else {
- this.arg = "boolean";
- }
- } else {
- this.arg = "boolean";
- }
- } else {
- this.arg = "void";
- }
- }
- }
-