Package org.boris.xlloop.handler

Examples of org.boris.xlloop.handler.FunctionInformation.addArgument()


            if (name == null || name.trim().length() == 0)
                continue;
            String help = null;
            if (sa.length > i + 1)
                help = sa[i + 1];
            fi.addArgument(name, help);
        }
        return fi;
    }
}
View Full Code Here


        return name.equals("Eval");
    }

    public FunctionInformation getInformation() {
        FunctionInformation fi = new FunctionInformation("Eval");
        fi.addArgument("args", "The arguments...");
        fi.setFunctionHelp("Evaluates a list of arguments as a lisp expression");
        return fi;
    }

    /**
 
View Full Code Here

                String arg = args[i];
                String help = null;
                if (argHelp != null && argHelp.length > i)
                    help = argHelp[i];
                if (hasValue(arg))
                    fi.addArgument(arg, help);
            }
        }
        return fi;
    }
View Full Code Here

                try {
                    InstanceMethod im = (InstanceMethod) f;
                    ParameterNameExtractor pne = new ParameterNameExtractor(im.clazz);
                    String[] names = pne.getParameterNames(im.method);
                    for (int j = 0; j < names.length; j++) {
                        fi.addArgument(names[j], im.args[j].getSimpleName());
                    }
                } catch (Exception e) {
                }
            } else if (f instanceof OverloadedMethod) {
                try {
View Full Code Here

                    OverloadedMethod om = (OverloadedMethod) f;
                    InstanceMethod im = om.getFirstMethod();
                    ParameterNameExtractor pne = new ParameterNameExtractor(im.clazz);
                    String[] names = pne.getParameterNames(im.method);
                    for (int j = 0; j < names.length; j++) {
                        fi.addArgument(names[j], im.args[j].getSimpleName());
                    }
                } catch (Exception e) {
                }
            }
            functions.add(fi);
View Full Code Here

{
    public static void main(String[] args) {
        FunctionInformation fi = new FunctionInformation("Math.pow");
        fi.setFunctionHelp("Raises the first value to the power of the second");
        fi.setCategory("Maths");
        fi.addArgument("value", "The first value");
        fi.addArgument("power", "The power value");
        System.out.println(fi.encode());
    }
}
View Full Code Here

    public static void main(String[] args) {
        FunctionInformation fi = new FunctionInformation("Math.pow");
        fi.setFunctionHelp("Raises the first value to the power of the second");
        fi.setCategory("Maths");
        fi.addArgument("value", "The first value");
        fi.addArgument("power", "The power value");
        System.out.println(fi.encode());
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.