Class JarPackageFragmentRoot

All Implemented Interfaces:
IBufferChangedListener, IJavaElement, IOpenable, IPackageFragmentRoot, IParent, org.eclipse.core.runtime.IAdaptable
Direct Known Subclasses:
JModPackageFragmentRoot, JrtPackageFragmentRoot

public class JarPackageFragmentRoot extends PackageFragmentRoot
A package fragment root that corresponds to a .jar or .zip.

NOTE: The only visible entries from a .jar or .zip package fragment root are .class files.

NOTE: A jar package fragment root may or may not have an associated resource.

See Also:
IPackageFragmentRoot, JarPackageFragmentRootInfo
  • Field Details

    • EMPTY_LIST

      protected static final ArrayList EMPTY_LIST
    • jarPath

      protected final org.eclipse.core.runtime.IPath jarPath
      The path to the jar file (a workspace relative path if the jar is internal, or an OS path if the jar is external)
    • extraAttributes

      protected final IClasspathAttribute[] extraAttributes
      Reflects the extra attributes of the classpath entry declaring this root. Caution, this field is used in hashCode() & equals() to avoid overzealous sharing. Can be null, if lookup via the corresponding classpath entry failed.
  • Constructor Details

    • JarPackageFragmentRoot

      public JarPackageFragmentRoot(org.eclipse.core.resources.IResource resource, org.eclipse.core.runtime.IPath externalJarPath, JavaProject project, IClasspathAttribute[] attributes)
      Constructs a package fragment root which is the root of the Java package directory hierarchy based on a JAR file.
  • Method Details