classpathhelper
Interface PackageStore


public interface PackageStore

Interface defining an object that stores and creates packages. This interface primarily is designed to define a cache to decrease the number of objects created. It also exists to support unit testing so a mocked cache can be inserted for testing.

Since:
1.2
Author:
bharris

Method Summary
 Package getPackage(Package parent, java.lang.String packagename)
          Finds/creates a package based on the parent package and the relative name.
 Package getPackage(java.lang.String packagename)
          Finds/creates a package with the specified name.
 

Method Detail

getPackage

public Package getPackage(Package parent,
                          java.lang.String packagename)
Finds/creates a package based on the parent package and the relative name.

Parameters:
parent - The parent package.
packagename - The relative name.
Returns:
A new or cached package corresponding to the requested package.
Since:
1.2

getPackage

public Package getPackage(java.lang.String packagename)
Finds/creates a package with the specified name.

Parameters:
packagename - The package name.
Returns:
A new or cached package corresponding to the requested package.
Since:
1.2