Interface of a classpath container. A classpath container provides a way to indirectly reference a set of classpath entries through a classpath entry of kind
CPE_CONTAINER
. Typically, a classpath container can be used to describe a complex library composed of multiple JARs or projects, considering also that containers can map to different set of entries on each project, in other words, several projects can reference the same generic container path, but have each of them actually bound to a different container object.
The set of entries associated with a classpath container may contain any of the following:
- library entries (
CPE_LIBRARY
) - project entries (
CPE_PROJECT
)
In particular, a classpath container can neither reference further classpath containers or classpath variables.
A library entry can reference other libraries through the Class-Path section of the JAR's MANIFEST.MF file. If the container wants such referenced entries to be part of the classpath, the container must explicitly add them to the array returned from {@link #getClasspathEntries()}.
Classpath container values are persisted locally to the workspace, but are not preserved from a session to another. It is thus highly recommended to register a ClasspathContainerInitializer
for each referenced container (through the extension point "org.eclipse.jdt.core.ClasspathContainerInitializer").
@see IClasspathEntry
@since 2.0