Java Doc for ObjectUtilities.java in  » Graphic-Library » jcommon-components » org » jfree » 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 » Graphic Library » jcommon components » org.jfree.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jfree.util.ObjectUtilities

ObjectUtilities
final public class ObjectUtilities (Code)
A collection of useful static utility methods for handling classes and object instantiation.
author:
   Thomas Morgner


Field Summary
final public static  StringCLASS_CONTEXT
     A constant for using the ClassContext as source for the classloader.
final public static  StringTHREAD_CONTEXT
     A constant for using the TheadContext as source for the classloader.


Method Summary
public static  Objectclone(Object object)
     Returns a clone of the specified object, if it can be cloned, otherwise throws a CloneNotSupportedException.
Parameters:
  object - the object to clone (null not permitted).
public static  CollectiondeepClone(Collection collection)
     Returns a new collection containing clones of all the items in the specified collection.
Parameters:
  collection - the collection (null not permitted).
public static  booleanequal(Object o1, Object o2)
     Returns true if the two objects are equal OR both null.
Parameters:
  o1 - object 1 (null permitted).
Parameters:
  o2 - object 2 (null permitted).
public static  ClassLoadergetClassLoader()
     Returns the custom classloader or null, if no custom classloader is defined.
public static synchronized  ClassLoadergetClassLoader(Class c)
     Returns the classloader, which was responsible for loading the given class.
Parameters:
  c - the classloader, either an application class loader or theboot loader.
public static  StringgetClassLoaderSource()
     Returns the internal configuration entry, whether the classloader of the thread context or the context classloader should be used.
public static  URLgetResource(String name, Class c)
     Returns the resource specified by the absolute name.
public static  InputStreamgetResourceAsStream(String name, Class context)
     Returns the inputstream for the resource specified by the absolute name.
public static  URLgetResourceRelative(String name, Class c)
     Returns the resource specified by the relative name.
public static  InputStreamgetResourceRelativeAsStream(String name, Class context)
     Returns the inputstream for the resource specified by the relative name.
public static  inthashCode(Object object)
     Returns a hash code for an object, or zero if the object is null.
Parameters:
  object - the object (null permitted).
public static  booleanisJDK14()
    
public static  ObjectloadAndInstantiate(String className, Class source)
     Tries to create a new instance of the given class.
public static  ObjectloadAndInstantiate(String className, Class source, Class type)
     Tries to create a new instance of the given class.
public static synchronized  voidsetClassLoader(ClassLoader classLoader)
     Redefines the custom classloader.
public static  voidsetClassLoaderSource(String classLoaderSource)
     Defines the internal configuration entry, whether the classloader of the thread context or the context classloader should be used.

Field Detail
CLASS_CONTEXT
final public static String CLASS_CONTEXT(Code)
A constant for using the ClassContext as source for the classloader.



THREAD_CONTEXT
final public static String THREAD_CONTEXT(Code)
A constant for using the TheadContext as source for the classloader.





Method Detail
clone
public static Object clone(Object object) throws CloneNotSupportedException(Code)
Returns a clone of the specified object, if it can be cloned, otherwise throws a CloneNotSupportedException.
Parameters:
  object - the object to clone (null not permitted). A clone of the specified object.
throws:
  CloneNotSupportedException - if the object cannot be cloned.



deepClone
public static Collection deepClone(Collection collection) throws CloneNotSupportedException(Code)
Returns a new collection containing clones of all the items in the specified collection.
Parameters:
  collection - the collection (null not permitted). A new collection containing clones of all the items in the specified collection.
throws:
  CloneNotSupportedException - if any of the items in the collectioncannot be cloned.



equal
public static boolean equal(Object o1, Object o2)(Code)
Returns true if the two objects are equal OR both null.
Parameters:
  o1 - object 1 (null permitted).
Parameters:
  o2 - object 2 (null permitted). true or false.



getClassLoader
public static ClassLoader getClassLoader()(Code)
Returns the custom classloader or null, if no custom classloader is defined. the custom classloader or null to use the default.



getClassLoader
public static synchronized ClassLoader getClassLoader(Class c)(Code)
Returns the classloader, which was responsible for loading the given class.
Parameters:
  c - the classloader, either an application class loader or theboot loader. the classloader, never null.
throws:
  SecurityException - if the SecurityManager does not allow to grabthe context classloader.



getClassLoaderSource
public static String getClassLoaderSource()(Code)
Returns the internal configuration entry, whether the classloader of the thread context or the context classloader should be used. the classloader source, either THREAD_CONTEXT or CLASS_CONTEXT.



getResource
public static URL getResource(String name, Class c)(Code)
Returns the resource specified by the absolute name.
Parameters:
  name - the name of the resource
Parameters:
  c - the source class the url of the resource or null, if not found.



getResourceAsStream
public static InputStream getResourceAsStream(String name, Class context)(Code)
Returns the inputstream for the resource specified by the absolute name.
Parameters:
  name - the name of the resource
Parameters:
  context - the source class the url of the resource or null, if not found.



getResourceRelative
public static URL getResourceRelative(String name, Class c)(Code)
Returns the resource specified by the relative name.
Parameters:
  name - the name of the resource relative to the given class
Parameters:
  c - the source class the url of the resource or null, if not found.



getResourceRelativeAsStream
public static InputStream getResourceRelativeAsStream(String name, Class context)(Code)
Returns the inputstream for the resource specified by the relative name.
Parameters:
  name - the name of the resource relative to the given class
Parameters:
  context - the source class the url of the resource or null, if not found.



hashCode
public static int hashCode(Object object)(Code)
Returns a hash code for an object, or zero if the object is null.
Parameters:
  object - the object (null permitted). The object's hash code (or zero if the object isnull).



isJDK14
public static boolean isJDK14()(Code)



loadAndInstantiate
public static Object loadAndInstantiate(String className, Class source)(Code)
Tries to create a new instance of the given class. This is a short cut for the common bean instantiation code.
Parameters:
  className - the class name as String, never null.
Parameters:
  source - the source class, from where to get the classloader. the instantiated object or null, if an error occured.



loadAndInstantiate
public static Object loadAndInstantiate(String className, Class source, Class type)(Code)
Tries to create a new instance of the given class. This is a short cut for the common bean instantiation code. This method is a type-safe method and will not instantiate the class unless it is an instance of the given type.
Parameters:
  className - the class name as String, never null.
Parameters:
  source - the source class, from where to get the classloader. the instantiated object or null, if an error occured.



setClassLoader
public static synchronized void setClassLoader(ClassLoader classLoader)(Code)
Redefines the custom classloader.
Parameters:
  classLoader - the new classloader or null to use the default.



setClassLoaderSource
public static void setClassLoaderSource(String classLoaderSource)(Code)
Defines the internal configuration entry, whether the classloader of the thread context or the context classloader should be used.

This setting can only be defined using the API, there is no safe way to put this into an external configuration file.
Parameters:
  classLoaderSource - the classloader source,either THREAD_CONTEXT or CLASS_CONTEXT.




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.