Java Doc for EngineUtils.java in  » Scripting » bsf-2.4.0 » org » apache » bsf » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Scripting » bsf 2.4.0 » org.apache.bsf.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.bsf.util.EngineUtils

EngineUtils
public class EngineUtils (Code)
This class contains utilities that language integrators can use when implementing the BSFEngine interface.
author:
   Sanjiva Weerawarana
author:
   Sam Ruby
author:
   Rony G. Flatscher (added addEventListenerReturningEventInfos)


Field Summary
static  booleanbMethodHasSetAccessible
    
static  BSFClassLoaderbsfCL
    


Method Summary
public static  voidaddEventListener(Object bean, String eventSetName, String filter, BSFEngine engine, BSFManager manager, String source, int lineNo, int columnNo, Object script)
     Add a script as a listener to some event coming out of an object.
public static  voidaddEventListenerReturningEventInfos(Object bean, String eventSetName, String filter, BSFEngine engine, BSFManager manager, String source, int lineNo, int columnNo, Object script, Object dataFromScriptingEngine)
     Add a script as a listener to some event coming out of an object.
public static  ObjectcallBeanMethod(Object bean, String methodName, Object[] args)
     Finds and invokes a method with the given signature on the given bean.
public static  ObjectcreateBean(String className, Object args)
     Creates a new bean.
public static  StringgetTypeSignatureString(Class cl)
     Given a class return the type signature string fragment for it. That is, return "I" for int, "J" for long, ...
public static  ClassloadClass(BSFManager mgr, String name)
     Load a class using the class loader of given manager.

Field Detail
bMethodHasSetAccessible
static boolean bMethodHasSetAccessible(Code)



bsfCL
static BSFClassLoader bsfCL(Code)





Method Detail
addEventListener
public static void addEventListener(Object bean, String eventSetName, String filter, BSFEngine engine, BSFManager manager, String source, int lineNo, int columnNo, Object script) throws BSFException(Code)
Add a script as a listener to some event coming out of an object. The first two args identify the src of the event and the event set and the rest identify the script which should be run when the event fires.
Parameters:
  bean - event source
Parameters:
  eventSetName - name of event set from event src to bind to
Parameters:
  filter - filter for events
Parameters:
  engine - BSFEngine which can run this script
Parameters:
  manager - BSFManager of the above engine
Parameters:
  source - (context info) the source of this expression(e.g., filename)
Parameters:
  lineNo - (context info) the line number in source for expr
Parameters:
  columnNo - (context info) the column number in source for expr
Parameters:
  script - the script to execute when the event occurs
exception:
  BSFException - if anything goes wrong while running the script



addEventListenerReturningEventInfos
public static void addEventListenerReturningEventInfos(Object bean, String eventSetName, String filter, BSFEngine engine, BSFManager manager, String source, int lineNo, int columnNo, Object script, Object dataFromScriptingEngine) throws BSFException(Code)
Add a script as a listener to some event coming out of an object. The first two args identify the src of the event and the event set and the rest identify the script which should be run when the event fires. The processing will use the engine's apply() method.
Parameters:
  bean - event source
Parameters:
  eventSetName - name of event set from event src to bind to
Parameters:
  filter - filter for events
Parameters:
  engine - BSFEngine which can run this script
Parameters:
  manager - BSFManager of the above engine
Parameters:
  source - (context info) the source of this expression (e.g., filename)
Parameters:
  lineNo - (context info) the line number in source for expr
Parameters:
  columnNo - (context info) the column number in source for expr
Parameters:
  script - the script to execute when the event occurs
Parameters:
  dataFromScriptingEngine - this contains any object supplied by the scripting engine and gets sentback with the supplied script, if the event occurs.This could be used e.g. for indicating to the scripting engine whichscripting engine object/routine/function/procedureshould be ultimately informed of the event occurrence.
exception:
  BSFException - if anything goes wrong while running the script



callBeanMethod
public static Object callBeanMethod(Object bean, String methodName, Object[] args) throws BSFException(Code)
Finds and invokes a method with the given signature on the given bean. The signature of the method that's invoked is first taken as the types of the args, but if that fails, this tries to convert any primitive wrapper type args to their primitive counterparts to see whether a method exists that way. If it does, done.
Parameters:
  bean - the object on which to invoke the method
Parameters:
  methodName - name of the method
Parameters:
  args - arguments to be given to the method the result of invoking the method, if any
exception:
  BSFException - if something goes wrong



createBean
public static Object createBean(String className, Object args) throws BSFException(Code)
Creates a new bean. The signature of the constructor that's invoked is first taken as the types of the args, but if that fails, this tries to convert any primitive wrapper type args to their primitive counterparts to see whether a method exists that way. If it does, done.
Parameters:
  className - fully qualified name of class to instantiate
Parameters:
  args - array of constructor args (or null if none) the created bean
exception:
  BSFException - if something goes wrong (@seeorg.apache.cs.util.MethodUtils for the realexceptions that can occur).



getTypeSignatureString
public static String getTypeSignatureString(Class cl)(Code)
Given a class return the type signature string fragment for it. That is, return "I" for int, "J" for long, ... etc..
Parameters:
  cl - class object for whom the signature fragment is needed. the string representing the type signature



loadClass
public static Class loadClass(BSFManager mgr, String name) throws BSFException(Code)
Load a class using the class loader of given manager. If that fails try using a class loader that loads from the tempdir of the manager.
Parameters:
  mgr - BSFManager who's classLoader and tempDir props areconsulted
Parameters:
  name - name of the class to load the loaded class
exception:
  BSFException - if something goes wrong.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.