Java Doc for ClassHelper.java in  » Database-ORM » db-ojb » org » apache » ojb » broker » 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 » Database ORM » db ojb » org.apache.ojb.broker.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.ojb.broker.util.ClassHelper

ClassHelper
public class ClassHelper (Code)
Helper class with static methods for java class, method, and field handling.
version:
   $Id: ClassHelper.java,v 1.10.2.3 2005/12/21 22:27:47 tomdz Exp $




Method Summary
public static  ObjectbuildNewObjectInstance(ClassDescriptor cld)
     Builds a new instance for the class represented by the given class descriptor.
public static  ClassgetClass(String className, boolean initialize)
     Retrieves the class object for the given qualified class name.
public static  ClassgetClass(String name)
    
public static  ClassLoadergetClassLoader()
     Returns the class loader currently used by OJB.
public static  FieldgetField(Class clazz, String fieldName)
     Determines the field via reflection look-up.
public static  MethodgetMethod(Class clazz, String methodName, Class[] params)
     Determines the method with the specified signature via reflection look-up.
public static  MethodgetMethod(Object object, String methodName, Class[] params)
     Determines the method with the specified signature via reflection look-up.
public static  MethodgetMethod(String className, String methodName, Class[] params)
     Determines the method with the specified signature via reflection look-up.
public static  URLgetResource(String name)
     Determines the url of the indicated resource using the currently set class loader.
public static  ObjectnewInstance(Class target)
     Returns a new instance of the given class, using the default or a no-arg constructor.
public static  ObjectnewInstance(Class target, boolean makeAccessible)
     Returns a new instance of the given class, using the default or a no-arg constructor.
public static  ObjectnewInstance(Class target, Class[] types, Object[] args)
     Returns a new instance of the given class, using the constructor with the specified parameter types.
public static  ObjectnewInstance(Class target, Class[] types, Object[] args, boolean makeAccessible)
     Returns a new instance of the given class, using the constructor with the specified parameter types.
public static  ObjectnewInstance(String className)
     Returns a new instance of the class with the given qualified name using the default or or a no-arg constructor.
public static  ObjectnewInstance(String className, Class[] types, Object[] args)
     Returns a new instance of the class with the given qualified name using the constructor with the specified signature.
public static  ObjectnewInstance(Class target, Class type, Object arg)
     Returns a new instance of the given class using the constructor with the specified parameter.
public static  ObjectnewInstance(String className, Class type, Object arg)
     Returns a new instance of the class with the given qualified name using the constructor with the specified parameter.
public static  voidsetClassLoader(ClassLoader loader)
     Sets the classloader to be used by OJB.



Method Detail
buildNewObjectInstance
public static Object buildNewObjectInstance(ClassDescriptor cld)(Code)
Builds a new instance for the class represented by the given class descriptor.
Parameters:
  cld - The class descriptor The instance



getClass
public static Class getClass(String className, boolean initialize) throws ClassNotFoundException(Code)
Retrieves the class object for the given qualified class name.
Parameters:
  className - The qualified name of the class
Parameters:
  initialize - Whether the class shall be initialized The class object



getClass
public static Class getClass(String name) throws ClassNotFoundException(Code)
Convenience method for ClassHelper.getClass(String,boolean) getClass(name, true)
Parameters:
  name - The qualified class name The class object



getClassLoader
public static ClassLoader getClassLoader()(Code)
Returns the class loader currently used by OJB. Defaults to the class loader of the current thread (Thread.currentThread().getContextClassLoader()) if not set differently. If class loader is not explicitly set and the loader for the current thread context is null, the JVM default class loader will be used. The classloader used by OJB
See Also:   ClassHelper.setClassLoader(ClassLoader)



getField
public static Field getField(Class clazz, String fieldName)(Code)
Determines the field via reflection look-up.
Parameters:
  clazz - The java class to search in
Parameters:
  fieldName - The field's name The field object or null if no matching field was found



getMethod
public static Method getMethod(Class clazz, String methodName, Class[] params)(Code)
Determines the method with the specified signature via reflection look-up.
Parameters:
  clazz - The java class to search in
Parameters:
  methodName - The method's name
Parameters:
  params - The parameter types The method object or null if no matching method was found



getMethod
public static Method getMethod(Object object, String methodName, Class[] params)(Code)
Determines the method with the specified signature via reflection look-up.
Parameters:
  object - The instance whose class is searched for the method
Parameters:
  methodName - The method's name
Parameters:
  params - The parameter types A method object or null if no matching method was found



getMethod
public static Method getMethod(String className, String methodName, Class[] params)(Code)
Determines the method with the specified signature via reflection look-up.
Parameters:
  className - The qualified name of the searched class
Parameters:
  methodName - The method's name
Parameters:
  params - The parameter types A method object or null if no matching method was found



getResource
public static URL getResource(String name)(Code)
Determines the url of the indicated resource using the currently set class loader.
Parameters:
  name - The resource name The resource's url



newInstance
public static Object newInstance(Class target) throws InstantiationException, IllegalAccessException(Code)
Returns a new instance of the given class, using the default or a no-arg constructor.
Parameters:
  target - The class to instantiate The instance



newInstance
public static Object newInstance(Class target, boolean makeAccessible) throws InstantiationException, IllegalAccessException(Code)
Returns a new instance of the given class, using the default or a no-arg constructor. This method can also use private no-arg constructors if makeAccessible is set to true (and there are no other security constraints).
Parameters:
  target - The class to instantiate
Parameters:
  makeAccessible - If the constructor shall be made accessible prior to using it The instance



newInstance
public static Object newInstance(Class target, Class[] types, Object[] args) throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException(Code)
Returns a new instance of the given class, using the constructor with the specified parameter types.
Parameters:
  target - The class to instantiate
Parameters:
  types - The parameter types
Parameters:
  args - The arguments The instance



newInstance
public static Object newInstance(Class target, Class[] types, Object[] args, boolean makeAccessible) throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException(Code)
Returns a new instance of the given class, using the constructor with the specified parameter types. This method can also use private constructors if makeAccessible is set to true (and there are no other security constraints).
Parameters:
  target - The class to instantiate
Parameters:
  types - The parameter types
Parameters:
  args - The arguments
Parameters:
  makeAccessible - If the constructor shall be made accessible prior to using it The instance



newInstance
public static Object newInstance(String className) throws InstantiationException, IllegalAccessException, ClassNotFoundException(Code)
Returns a new instance of the class with the given qualified name using the default or or a no-arg constructor.
Parameters:
  className - The qualified name of the class to instantiate



newInstance
public static Object newInstance(String className, Class[] types, Object[] args) throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException, ClassNotFoundException(Code)
Returns a new instance of the class with the given qualified name using the constructor with the specified signature.
Parameters:
  className - The qualified name of the class to instantiate
Parameters:
  types - The parameter types
Parameters:
  args - The arguments The instance



newInstance
public static Object newInstance(Class target, Class type, Object arg) throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException(Code)
Returns a new instance of the given class using the constructor with the specified parameter.
Parameters:
  target - The class to instantiate
Parameters:
  type - The types of the single parameter of the constructor
Parameters:
  arg - The argument The instance



newInstance
public static Object newInstance(String className, Class type, Object arg) throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException, ClassNotFoundException(Code)
Returns a new instance of the class with the given qualified name using the constructor with the specified parameter.
Parameters:
  className - The qualified name of the class to instantiate
Parameters:
  type - The types of the single parameter of the constructor
Parameters:
  arg - The argument The instance



setClassLoader
public static void setClassLoader(ClassLoader loader)(Code)
Sets the classloader to be used by OJB. This can be set by external application that need to pass a specific classloader to OJB.
Parameters:
  loader - The class loader. If null then OJB will usethe class loader of the current thread



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.