Package org.apache.bsf.util

Examples of org.apache.bsf.util.BSFFunctions


            runtime.getGlobalVariables().define(
                GlobalVariable.variableName(bean.name),
                new BeanGlobalVariable(runtime, bean));
        }

        runtime.getGlobalVariables().defineReadonly("$bsf", new FunctionsGlobalVariable(runtime, new BSFFunctions(manager, this)));
    }
View Full Code Here


        execScripts = new HashMap();
        evalScripts = new HashMap();
        context = shell.getContext();
        // create a shell
        // register the mgr with object name "bsf"
        context.setVariable("bsf", new BSFFunctions(mgr, this));
        int size = declaredBeans.size();
        for (int i = 0; i < size; i++) {
            declareBean((BSFDeclaredBean) declaredBeans.elementAt(i));
        }
    }
View Full Code Here

            for (int i = 0; i < someDeclaredBeans.size(); i++) {
                BSFDeclaredBean bean = (BSFDeclaredBean) someDeclaredBeans.get(i);
                setVariable(bean);
            }
        }
        runtime.getGlobalVariables().defineReadonly("$bsf", new FunctionsGlobalVariable(runtime, new BSFFunctions(manager, this)));
    }
View Full Code Here

            runtime.getGlobalVariables().define(
                GlobalVariable.variableName(bean.name),
                new BeanGlobalVariable(runtime, bean));
        }

        runtime.getGlobalVariables().defineReadonly("$bsf", new FunctionsGlobalVariable(runtime, new BSFFunctions(manager, this)));
    }
View Full Code Here

        // Initialize context and global scope object
        try {
            Context cx = Context.enter();
            global = new ImporterTopLevel(cx);
            Scriptable bsf = Context.toObject(new BSFFunctions(mgr, this), global);
            global.put("bsf", global, bsf);

            for(
                @SuppressWarnings("unchecked")
                Iterator<BSFDeclaredBean> it = declaredBeans.iterator();
View Full Code Here

        // Initialize context and global scope object
        try {
            Context cx = Context.enter();
            global = new ImporterTopLevel(cx);
            Scriptable bsf = Context.toObject(new BSFFunctions(mgr, this), global);
            global.put("bsf", global, bsf);

            for(Iterator it = declaredBeans.iterator(); it.hasNext();) {
                declareBean((BSFDeclaredBean) it.next());
            }
View Full Code Here

  }

  // declare a "bsf" parameter which is the BSF handle so that
  // the script can do BSF stuff if it wants to
  transformer.setParameter ("bsf",
                                  new XObject (new BSFFunctions (mgr, this)));

  // do it
  try {
            DOMResult result = new DOMResult();
            transformer.transform ((StreamSource) xis, result);
View Full Code Here

  }
  public void initialize(BSFManager mgr, String lang,Vector declaredBeans)
  throws BSFException
  {
    super.initialize(mgr, lang, declaredBeans);
    mgrfuncs = new BSFFunctions (mgr, this);
  }
View Full Code Here

    // ensure that output and error streams are re-directed correctly
    interp.setOut(System.out);
    interp.setErr(System.err);
   
  // register the mgr with object name "bsf"
  interp.set ("bsf", new BSFFunctions (mgr, this));

    // Declare all declared beans to the interpreter
  int size = declaredBeans.size ();
  for (int i = 0; i < size; i++) {
    declareBean ((BSFDeclaredBean) declaredBeans.elementAt (i));
View Full Code Here

        // Initialize context and global scope object
        try {
            Context cx = Context.enter();
            global = new ImporterTopLevel(cx);
            Scriptable bsf = Context.toObject(new BSFFunctions(mgr, this), global);
            global.put("bsf", global, bsf);

            for(Iterator it = declaredBeans.iterator(); it.hasNext();) {
              declareBean((BSFDeclaredBean) it.next());
            }
View Full Code Here

TOP

Related Classes of org.apache.bsf.util.BSFFunctions

Copyright © 2018 www.massapicom. 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.