Klasse JarPackageFragmentRoot
java.lang.Object
org.eclipse.core.runtime.PlatformObject
org.aspectj.org.eclipse.jdt.internal.core.JavaElement
org.aspectj.org.eclipse.jdt.internal.core.Openable
org.aspectj.org.eclipse.jdt.internal.core.PackageFragmentRoot
org.aspectj.org.eclipse.jdt.internal.core.JarPackageFragmentRoot
- Alle implementierten Schnittstellen:
IBufferChangedListener,IJavaElement,IOpenable,IPackageFragmentRoot,IParent,org.eclipse.core.runtime.IAdaptable
- Bekannte direkte Unterklassen:
JModPackageFragmentRoot,JrtPackageFragmentRoot
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.
- Siehe auch:
-
IPackageFragmentRootJarPackageFragmentRootInfo
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungprotected static final ArrayListprotected final IClasspathAttribute[]Reflects the extra attributes of the classpath entry declaring this root.protected final org.eclipse.core.runtime.IPathThe path to the jar file (a workspace relative path if the jar is internal, or an OS path if the jar is external)Von Klasse geerbte Felder org.aspectj.org.eclipse.jdt.internal.core.PackageFragmentRoot
ATTACHMENT_PROPERTY_DELIMITER, NO_SOURCE_ATTACHMENT, resourceVon Klasse geerbte Felder org.aspectj.org.eclipse.jdt.internal.core.JavaElement
JEM_ANNOTATION, JEM_CLASSFILE, JEM_COMPILATIONUNIT, JEM_COUNT, JEM_DELIMITER_ESCAPE, JEM_ESCAPE, JEM_FIELD, JEM_IMPORTDECLARATION, JEM_INITIALIZER, JEM_JAVAPROJECT, JEM_LAMBDA_EXPRESSION, JEM_LAMBDA_METHOD, JEM_LOCALVARIABLE, JEM_METHOD, JEM_MODULAR_CLASSFILE, JEM_MODULE, JEM_PACKAGEDECLARATION, JEM_PACKAGEFRAGMENT, JEM_PACKAGEFRAGMENTROOT, JEM_STRING, JEM_TYPE, JEM_TYPE_PARAMETER, NO_ELEMENTS, NO_INFO, NO_STRINGSVon Schnittstelle geerbte Felder org.aspectj.org.eclipse.jdt.core.IJavaElement
ANNOTATION, CLASS_FILE, COMPILATION_UNIT, FIELD, IMPORT_CONTAINER, IMPORT_DECLARATION, INITIALIZER, JAVA_MODEL, JAVA_MODULE, JAVA_PROJECT, LOCAL_VARIABLE, METHOD, PACKAGE_DECLARATION, PACKAGE_FRAGMENT, PACKAGE_FRAGMENT_ROOT, TYPE, TYPE_PARAMETERVon Schnittstelle geerbte Felder org.aspectj.org.eclipse.jdt.core.IPackageFragmentRoot
DEFAULT_PACKAGEROOT_PATH, DESTINATION_PROJECT_CLASSPATH, K_BINARY, K_SOURCE, NO_RESOURCE_MODIFICATION, ORIGINATING_PROJECT_CLASSPATH, OTHER_REFERRING_PROJECTS_CLASSPATH, REPLACE -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungJarPackageFragmentRoot(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. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected booleancomputeChildren(OpenableElementInfo info, org.eclipse.core.resources.IResource underlyingResource) Compute the package fragment children of this package fragment root.protected IJavaElement[]createChildren(HashtableOfArrayToObject rawPackageInfo) protected ObjectReturns a new element info for this element.protected intdetermineKind(org.eclipse.core.resources.IResource underlyingResource) A Jar is always K_BINARY.booleanReturns true if this handle represents the same jar as the given handle.getClassFilePath(String classname) Returns the relative path within an archive for the given class file name.Returns the name of this element.getJar()Returns the underlying ZipFile for this Jar package fragment root.intgetKind()Returns this package fragment root's kind encoded as an integer.Convenience lookup, though currently only JarPackageFragmentRoot is searched for a manifest.Returns theIModuleDescriptionthat this package fragment root contains.Object[]Returns an array of non-java resources contained in the receiver.getPackageFragment(String[] pkgName) getPackageFragment(String[] pkgName, String mod) org.eclipse.core.resources.IResourceReturns the smallest underlying resource that contains this element, ornullif this element is not contained in a resource.inthashCode()Returns the hash code for this Java element.protected voidinitRawPackageInfo(HashtableOfArrayToObject rawPackageInfo, String entryName, boolean isDirectory, String compliance) org.eclipse.core.runtime.IPathbooleanReturns whether this package fragment root's underlying resource is a binary archive (a JAR or zip file).booleanReturns whether this package fragment root is external to the workbench (that is, a local file), and has no underlying resource.booleanJars and jar entries are all read onlyorg.eclipse.core.resources.IResourceresource(PackageFragmentRoot root) protected booleanresourceExists(org.eclipse.core.resources.IResource underlyingResource) Returns whether the corresponding resource or associated file existsprotected voidtoStringAncestors(StringBuffer buffer) Debugging purposesVon Klasse geerbte Methoden org.aspectj.org.eclipse.jdt.internal.core.PackageFragmentRoot
attachSource, buildStructure, computeFolderChildren, copy, createPackageFragment, delete, fullExclusionPatternChars, fullInclusionPatternChars, getAutomaticModuleDescription, getElementType, getHandleFromMemento, getHandleMemento, getHandleMementoDelimiter, getPackageFragment, getPackageName, getPath, getRawClasspathEntry, getResolvedClasspathEntry, getSourceAttachmentPath, getSourceAttachmentRootPath, getSourceMapper, hasChildren, hasCompilationUnit, ignoreOptionalProblems, isComplianceJava9OrHigher, move, resource, setSourceMapper, toStringInfo, validateExistence, validateOnClasspath, verifyAttachSourceVon Klasse geerbte Methoden org.aspectj.org.eclipse.jdt.internal.core.Openable
bufferChanged, canBeRemovedFromCache, canBufferBeRemovedFromCache, closeBuffer, closing, codeComplete, codeSelect, exists, findRecommendedLineSeparator, generateInfos, getBuffer, getBufferFactory, getBufferManager, getCorrespondingResource, getOpenable, getPackageFragmentRoot, getResource, hasBuffer, hasUnsavedChanges, ignoreErrorStatus, isConsistent, isOpen, isSourceElement, isStructureKnown, makeConsistent, open, openAncestors, openBuffer, saveVon Klasse geerbte Methoden org.aspectj.org.eclipse.jdt.internal.core.JavaElement
appendEscapedDelimiter, close, escapeMementoName, findNode, getAncestor, getAttachedJavadoc, getChildren, getChildrenOfType, getClassFile, getCompilationUnit, getElementInfo, getElementInfo, getHandleFromMemento, getHandleIdentifier, getHandleMemento, getJavadocBaseLocation, getJavaModel, getJavaProject, getLibraryJavadocLocation, getOpenableParent, getParent, getPrimaryElement, getPrimaryElement, getSchedulingRule, getSourceElementAt, getURLContents, isAncestorOf, newDoesNotExistStatus, newJavaModelException, newNotPresentException, openWhenClosed, readableName, resolved, setParent, tabString, toDebugString, toString, toString, toStringChildren, toStringInfo, toStringName, toStringWithAncestors, toStringWithAncestors, unresolved, validateAndCacheVon Klasse geerbte Methoden org.eclipse.core.runtime.PlatformObject
getAdapterVon Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitVon Schnittstelle geerbte Methoden org.eclipse.core.runtime.IAdaptable
getAdapterVon Schnittstelle geerbte Methoden org.aspectj.org.eclipse.jdt.core.IJavaElement
exists, getAncestor, getAttachedJavadoc, getCorrespondingResource, getHandleIdentifier, getJavaModel, getJavaProject, getOpenable, getParent, getPrimaryElement, getResource, getSchedulingRule, isStructureKnownVon Schnittstelle geerbte Methoden org.aspectj.org.eclipse.jdt.core.IOpenable
close, findRecommendedLineSeparator, getBuffer, hasUnsavedChanges, isConsistent, isOpen, makeConsistent, open, saveVon Schnittstelle geerbte Methoden org.aspectj.org.eclipse.jdt.core.IParent
getChildren
-
Felddetails
-
EMPTY_LIST
-
jarPath
protected final org.eclipse.core.runtime.IPath jarPathThe path to the jar file (a workspace relative path if the jar is internal, or an OS path if the jar is external) -
extraAttributes
Reflects the extra attributes of the classpath entry declaring this root. Caution, this field is used in hashCode() Ungültige Eingabe: "&" equals() to avoid overzealous sharing. Can be null, if lookup via the corresponding classpath entry failed.
-
-
Konstruktordetails
-
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.
-
-
Methodendetails
-
computeChildren
protected boolean computeChildren(OpenableElementInfo info, org.eclipse.core.resources.IResource underlyingResource) throws JavaModelException 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.- Setzt außer Kraft:
computeChildrenin KlassePackageFragmentRoot- Löst aus:
JavaModelException- The resource associated with this package fragment root does not exist
-
createChildren
-
createElementInfo
Returns a new element info for this element.- Setzt außer Kraft:
createElementInfoin KlassePackageFragmentRoot
-
determineKind
protected int determineKind(org.eclipse.core.resources.IResource underlyingResource) A Jar is always K_BINARY.- Setzt außer Kraft:
determineKindin KlassePackageFragmentRoot
-
equals
Returns true if this handle represents the same jar as the given handle. Two jars are equal if they share the same zip file.- Setzt außer Kraft:
equalsin KlassePackageFragmentRoot- Siehe auch:
-
getElementName
Beschreibung aus Schnittstelle kopiert:IJavaElementReturns the name of this element. This is a handle-only method.- Angegeben von:
getElementNamein SchnittstelleIJavaElement- Setzt außer Kraft:
getElementNamein KlassePackageFragmentRoot- Gibt zurück:
- the element name
- Siehe auch:
-
IAdaptable
-
getJar
Returns the underlying ZipFile for this Jar package fragment root.- Löst aus:
org.eclipse.core.runtime.CoreException- if an error occurs accessing the jar
-
getKind
public int getKind()Beschreibung aus Schnittstelle kopiert:IPackageFragmentRootReturns this package fragment root's kind encoded as an integer. A package fragment root can contain source files (i.e. files with one of theJava-like extensions, or.classfiles, but not both. If the underlying folder or archive contains other kinds of files, they are ignored. In particular,.classfiles are ignored under a source package fragment root, and source files are ignored under a binary package fragment root.- Angegeben von:
getKindin SchnittstelleIPackageFragmentRoot- Setzt außer Kraft:
getKindin KlassePackageFragmentRoot- Gibt zurück:
- this package fragment root's kind encoded as an integer
- Siehe auch:
-
getNonJavaResources
Returns an array of non-java resources contained in the receiver.- Angegeben von:
getNonJavaResourcesin SchnittstelleIPackageFragmentRoot- Setzt außer Kraft:
getNonJavaResourcesin KlassePackageFragmentRoot- Gibt zurück:
- an array of non-Java resources (
IFiles,IFolders, orIStorages if the package fragment root is in archive) contained in this package fragment root - Löst aus:
JavaModelException- if this element does not exist or if an exception occurs while accessing its corresponding resource.- Siehe auch:
-
getPackageFragment
- Setzt außer Kraft:
getPackageFragmentin KlassePackageFragmentRoot
-
getPackageFragment
- Setzt außer Kraft:
getPackageFragmentin KlassePackageFragmentRoot
-
getClassFilePath
Beschreibung aus Klasse kopiert:PackageFragmentRootReturns the relative path within an archive for the given class file name. In certain kind of archives, such as a JMOD file, class files are stored in a nested folder, as opposed to directly under the root. It is the responsibility of such package fragment roots to provide the custom behavior.- Setzt außer Kraft:
getClassFilePathin KlassePackageFragmentRoot- Gibt zurück:
- the relative path for the class file within the archive
-
getModuleDescription
Beschreibung aus Schnittstelle kopiert:IPackageFragmentRootReturns theIModuleDescriptionthat this package fragment root contains. Returnsnullif the root doesn't contain any named module or if the project compiler compliance is 1.8 or lower. If present the module descriptor is found as a child of the package fragment representing the default package. Note that only one of the source package fragment roots in a Java Project can legally contain a module descriptor.- Angegeben von:
getModuleDescriptionin SchnittstelleIPackageFragmentRoot- Setzt außer Kraft:
getModuleDescriptionin KlassePackageFragmentRoot- Gibt zurück:
- the
IModuleDescriptionthis root contains.
-
internalPath
public org.eclipse.core.runtime.IPath internalPath()- Setzt außer Kraft:
internalPathin KlassePackageFragmentRoot
-
resource
- Setzt außer Kraft:
resourcein KlassePackageFragmentRoot
-
getUnderlyingResource
Beschreibung aus Schnittstelle kopiert:IJavaElementReturns the smallest underlying resource that contains this element, ornullif this element is not contained in a resource.- Angegeben von:
getUnderlyingResourcein SchnittstelleIJavaElement- Setzt außer Kraft:
getUnderlyingResourcein KlassePackageFragmentRoot- Gibt zurück:
- the underlying resource, or
nullif none - Löst aus:
JavaModelException- if this element does not exist or if an exception occurs while accessing its underlying resource- Siehe auch:
-
hashCode
public int hashCode()Beschreibung aus Klasse kopiert:JavaElementReturns 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.- Setzt außer Kraft:
hashCodein KlassePackageFragmentRoot
-
initRawPackageInfo
protected void initRawPackageInfo(HashtableOfArrayToObject rawPackageInfo, String entryName, boolean isDirectory, String compliance) -
isArchive
public boolean isArchive()Beschreibung aus Schnittstelle kopiert:IPackageFragmentRootReturns whether this package fragment root's underlying resource is a binary archive (a JAR or zip file).This is a handle-only method.
- Angegeben von:
isArchivein SchnittstelleIPackageFragmentRoot- Setzt außer Kraft:
isArchivein KlassePackageFragmentRoot- Gibt zurück:
- true if this package fragment root's underlying resource is a binary archive, false otherwise
- Siehe auch:
-
isExternal
public boolean isExternal()Beschreibung aus Schnittstelle kopiert:IPackageFragmentRootReturns whether this package fragment root is external to the workbench (that is, a local file), and has no underlying resource.This is a handle-only method.
- Angegeben von:
isExternalin SchnittstelleIPackageFragmentRoot- Setzt außer Kraft:
isExternalin KlassePackageFragmentRoot- Gibt zurück:
- true if this package fragment root is external to the workbench (that is, a local file), and has no underlying resource, false otherwise
- Siehe auch:
-
isReadOnly
public boolean isReadOnly()Jars and jar entries are all read only- Angegeben von:
isReadOnlyin SchnittstelleIJavaElement- Setzt außer Kraft:
isReadOnlyin KlasseJavaElement- Gibt zurück:
trueif this element is read-only- Siehe auch:
-
resourceExists
protected boolean resourceExists(org.eclipse.core.resources.IResource underlyingResource) Returns whether the corresponding resource or associated file exists- Setzt außer Kraft:
resourceExistsin KlasseOpenable
-
toStringAncestors
Beschreibung aus Klasse kopiert:JavaElementDebugging purposes- Setzt außer Kraft:
toStringAncestorsin KlasseJavaElement
-
getIndexPath
-
getManifest
Beschreibung aus Klasse kopiert:PackageFragmentRootConvenience lookup, though currently only JarPackageFragmentRoot is searched for a manifest.- Setzt außer Kraft:
getManifestin KlassePackageFragmentRoot
-