Java Doc for Functor.java in  » Testing » jakarta-jmeter » org » apache » jorphan » reflect » 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 » Testing » jakarta jmeter » org.apache.jorphan.reflect 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.jorphan.reflect.Functor

Functor
public class Functor (Code)
Implements function call-backs. Functors may be defined for instance objects or classes. The method is created on first use, which allows the invokee (class or instance) to be omitted from the constructor. The class name takes precedence over the instance. If a functor is created with a particular instance, then that is used for all future calls; if an object is provided, it is ignored. This allows easy override of the table model behaviour. If an argument list is provided in the constructor, then that is ignored in subsequent invoke() calls. Usage: f = new Functor("methodName") o = f.invoke(object) - OR - o = f.invoke(object,params) f2 = new Functor(object,"methodName"); o = f2.invoke() - OR - o = f2.invoke(params) f3 = new Functor(class,"methodName"); o = f3.invoke(object) - will be ignored o = f3.invoke() - OR - o = f3.invoke(params) o = f3.invoke(object,params) - object will be ignored



Constructor Summary
 Functor()
    
public  Functor(Object _invokee, String _methodName)
     Create a functor with the invokee and a method name.
public  Functor(Class _clazz, String _methodName)
     Create a functor from class and method name.
public  Functor(Object _invokee, String _methodName, Class[] _types)
     Create a functor with the invokee, method name, and argument class types.
public  Functor(Class _clazz, String _methodName, Class[] _types)
     Create a functor with the class, method name, and argument class types.
public  Functor(String _methodName)
     Create a functor with just the method name.
public  Functor(String _methodName, Class[] _types)
     Create a functor with the method name and argument class types.
public  Functor(Object _invokee, String _methodName, Object[] _args)
     Create a functor with an invokee, method name, and argument values.
public  Functor(String _methodName, Object[] _args)
     Create a functor from method name and arguments.

Method Summary
public  booleancheckMethod(Object _invokee)
     Check if a read Functor method is valid.
public  booleancheckMethod(Object _invokee, Class c)
     Check if a write Functor method is valid.
public  Objectinvoke()
     Invoke a Functor, which must have been created with either a class name or object.
public  Objectinvoke(Object p_invokee)
     Invoke the method on a given object.
public  Objectinvoke(Object[] p_args)
     Invoke the method with the provided parameters.
public  Objectinvoke(Object p_invokee, Object[] p_args)
     Invoke the method on the invokee with the provided parameters.
public  StringtoString()
    


Constructor Detail
Functor
Functor()(Code)



Functor
public Functor(Object _invokee, String _methodName)(Code)
Create a functor with the invokee and a method name. The invokee will be used in all future invoke calls.
Parameters:
  _invokee - object on which to invoke the method
Parameters:
  _methodName - method name



Functor
public Functor(Class _clazz, String _methodName)(Code)
Create a functor from class and method name. This is useful for methods defined in interfaces. The actual invokee must be provided in all invoke() calls, and must be an instance of the class.
Parameters:
  _clazz - class to be used
Parameters:
  _methodName - method name



Functor
public Functor(Object _invokee, String _methodName, Class[] _types)(Code)
Create a functor with the invokee, method name, and argument class types. The invokee will be ignored in any invoke() calls.
Parameters:
  _invokee - object on which to invoke the method
Parameters:
  _methodName - method name
Parameters:
  _types -



Functor
public Functor(Class _clazz, String _methodName, Class[] _types)(Code)
Create a functor with the class, method name, and argument class types. Subsequent invoke() calls must provide the appropriate ivokee object.
Parameters:
  _clazz - the class in which to find the method
Parameters:
  _methodName - method name
Parameters:
  _types -



Functor
public Functor(String _methodName)(Code)
Create a functor with just the method name. The invokee and any parameters must be provided in all invoke() calls.
Parameters:
  _methodName - method name



Functor
public Functor(String _methodName, Class[] _types)(Code)
Create a functor with the method name and argument class types. The invokee must be provided in all invoke() calls
Parameters:
  _methodName - method name
Parameters:
  _types - parameter types



Functor
public Functor(Object _invokee, String _methodName, Object[] _args)(Code)
Create a functor with an invokee, method name, and argument values. The invokee will be ignored in any invoke() calls.
Parameters:
  _invokee - object on which to invoke the method
Parameters:
  _methodName - method name
Parameters:
  _args - arguments to be passed to the method



Functor
public Functor(String _methodName, Object[] _args)(Code)
Create a functor from method name and arguments. The class will be determined from the first invoke call. All invoke calls must include a target object; which must be of the same type as the initial invokee.
Parameters:
  _methodName - method name
Parameters:
  _args -




Method Detail
checkMethod
public boolean checkMethod(Object _invokee)(Code)
Check if a read Functor method is valid. true if method exists



checkMethod
public boolean checkMethod(Object _invokee, Class c)(Code)
Check if a write Functor method is valid. true if method exists



invoke
public Object invoke()(Code)
Invoke a Functor, which must have been created with either a class name or object. the object if any



invoke
public Object invoke(Object p_invokee)(Code)
Invoke the method on a given object.
Parameters:
  p_invokee - - provides the object to call; ignored if the class or object were provided to the constructor the value



invoke
public Object invoke(Object[] p_args)(Code)
Invoke the method with the provided parameters. The invokee must have been provided in the constructor.
Parameters:
  p_args - parameters for the method the value



invoke
public Object invoke(Object p_invokee, Object[] p_args)(Code)
Invoke the method on the invokee with the provided parameters. The invokee must agree with the class (if any) provided at construction time. If the invokee was provided at construction time, then this invokee will be ignored. If actual arguments were provided at construction time, then arguments will be ignored.



toString
public String toString()(Code)



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.