com.ibm.dtfj.java

Interface JavaClassLoader


  1. public interface JavaClassLoader

Represents an internal ClassLoader structure within a Java VM instance. For most ClassLoaders there is a corresponding java.lang.ClassLoader object within with JavaRuntime. For primordial class loaders such as the bootstrap class loader, there may or may not be a corresponding java.lang.ClassLoader instance.

Since Java does not define any strict inheritance structure between class loaders, there are no APIs for inspecting 'child' or 'parent' class loaders. This information may be inferred by inspecting the corresponding java.lang.ClassLoader instance.

See Also:
ClassLoader

Method Summary

Modifier and Type Method and Description
  1. boolean
equals(java.lang.Object obj)
  1. JavaClass
findClass(java.lang.String name)
Find a named class within this class loader.
  1. java.util.Iterator
getCachedClasses()
When a ClassLoader successfully delegates a findClass() request to another ClassLoader, the result of the delegation must be cached within the internal structure so that the VM does not make repeated requests for the same class.
  1. java.util.Iterator
getDefinedClasses()
Get the set of classes which are defined in this JavaClassLoader.
  1. JavaObject
getObject()
Get the java.lang.ClassLoader instance associated with this class loader.
  1. int
hashCode()

Method Detail

getDefinedClasses

  1. java.util.Iterator getDefinedClasses( )
Get the set of classes which are defined in this JavaClassLoader.
Returns:
an iterator over the collection of classes which are defined in this JavaClassLoader
See Also:

getCachedClasses

  1. java.util.Iterator getCachedClasses( )
When a ClassLoader successfully delegates a findClass() request to another ClassLoader, the result of the delegation must be cached within the internal structure so that the VM does not make repeated requests for the same class.
Returns:
an iterator over the collection of classes which are defined in this JavaClassLoader or which were found by delegation to other JavaClassLoaders
See Also:

findClass

  1. JavaClass findClass(java.lang.String name)
  2. throws CorruptDataException
Find a named class within this class loader. The class may have been defined in this class loader, or this class loader may have delegated the load to another class loader and cached the result.
Parameters:
name - of the class to find. Packages should be separated by '/' instead of '.'
Returns:
the JavaClass instance, or null if it is not found
Throws:

getObject

  1. JavaObject getObject()
  2. throws CorruptDataException
Get the java.lang.ClassLoader instance associated with this class loader.
Returns:
a JavaObject representing the java.lang.ClassLoader instance associated with this class loader, or null if there is no Java class loader associated with this low-level class loader.
Throws:
See Also:
JavaObject, ClassLoader

equals

  1. boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
Parameters:
obj -
Returns:
True if the given object refers to the same Java Class Loader in the image

hashCode

  1. int hashCode()
Overrides:
hashCode in class java.lang.Object