Class JrtPackageFragmentRoot

All Implemented Interfaces:
IBufferChangedListener, IJavaElement, IOpenable, IPackageFragmentRoot, IParent, IModulePathEntry, org.eclipse.core.runtime.IAdaptable

public class JrtPackageFragmentRoot extends JarPackageFragmentRoot implements IModulePathEntry
A package fragment root that corresponds to a module in a JRT file system.
See Also:
IPackageFragmentRoot, JarPackageFragmentRootInfo
  • Field Details

  • Constructor Details

    • JrtPackageFragmentRoot

      protected JrtPackageFragmentRoot(org.eclipse.core.runtime.IPath jrtPath, String moduleName, JavaProject project, IClasspathAttribute[] extraAttributes)
      Constructs a package fragment root which represents a module contained in a JRT.
  • Method Details

    • computeChildren

      protected boolean computeChildren(OpenableElementInfo info, org.eclipse.core.resources.IResource underlyingResource) throws JavaModelException
      Description copied from class: JarPackageFragmentRoot
      Compute the package fragment children of this package fragment root. These are all of the directory zip entries, and any directories implied by the path of class files contained in the jar of this package fragment root.
      Overrides:
      computeChildren in class JarPackageFragmentRoot
      Throws:
      JavaModelException - The resource associated with this package fragment root does not exist
    • equals

      public boolean equals(Object o)
      Description copied from class: JarPackageFragmentRoot
      Returns true if this handle represents the same jar as the given handle. Two jars are equal if they share the same zip file.
      Overrides:
      equals in class JarPackageFragmentRoot
      See Also:
      Object.equals(java.lang.Object)
    • getElementName

      public String getElementName()
      Description copied from interface: IJavaElement
      Returns the name of this element. This is a handle-only method.
      Specified by:
      getElementName in interface IJavaElement
      Overrides:
      getElementName in class JarPackageFragmentRoot
      Returns:
      the element name
      See Also:
      IAdaptable
    • getPackageFragment

      public PackageFragment getPackageFragment(String[] pkgName)
      Overrides:
      getPackageFragment in class JarPackageFragmentRoot
    • hashCode

      public int hashCode()
      Description copied from class: JavaElement
      Returns the hash code for this Java element. By default, the hash code for an element is a combination of its name and parent's hash code. Elements with other requirements must override this method.
      Overrides:
      hashCode in class JarPackageFragmentRoot
    • toStringInfo

      protected void toStringInfo(int tab, StringBuffer buffer, Object info, boolean showResolvedInfo)
      Description copied from class: JavaElement
      Debugging purposes
      Overrides:
      toStringInfo in class PackageFragmentRoot
      showResolvedInfo - TODO
    • getModule

      public IModule getModule()
      Description copied from interface: IModulePathEntry
      Get the module that this entry contributes. May be null, for instance when this entry does not represent a single module
      Specified by:
      getModule in interface IModulePathEntry
      Returns:
      The module that this entry contributes or null
    • isComplianceJava9OrHigher

      protected boolean isComplianceJava9OrHigher()
      Overrides:
      isComplianceJava9OrHigher in class PackageFragmentRoot
    • getModulesDeclaringPackage

      public char[][] getModulesDeclaringPackage(String qualifiedPackageName, String requestedModuleName)
      Description copied from interface: IModulePathEntry
      Answer the relevant modules that declare the given package. If moduleName is ModuleBinding.ANY then all packages are relevant, if moduleName is ModuleBinding.UNNAMED, then only packages in the unnamed module are relevant, otherwise consider only packages in the module identified by moduleName.
      Specified by:
      getModulesDeclaringPackage in interface IModulePathEntry
    • ignoreErrorStatus

      protected boolean ignoreErrorStatus(org.eclipse.core.runtime.IStatus status)
      Overrides:
      ignoreErrorStatus in class Openable