Logo Search packages:      
Sourcecode: jamvm version File versions

Package java::lang::ClassLoader::getPackage ( String  name  )  [inline, protected]

Returns the Package object for the requested package name. It returns null when the package is not defined by this classloader or one of its parents.

Parameters:
name the package name to find
Returns:
the package, if defined
Since:
1.2

Definition at line 780 of file ClassLoader.java.

References definedPackages, getPackage(), and parent.

Referenced by definePackage(), and getPackage().

  {
    Package p;
    if (parent == null)
      p = VMClassLoader.getPackage(name);
    else
      p = parent.getPackage(name);

    if (p == null)
      {
      synchronized (definedPackages)
        {
          p = (Package) definedPackages.get(name);
        }
      }
    return p;
  }


Generated by  Doxygen 1.6.0   Back to index