|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.runtime.PlatformObject
org.eclipse.jdt.internal.core.JavaElement
org.eclipse.jdt.internal.core.Openable
org.eclipse.jdt.internal.core.PackageFragmentRoot
org.eclipse.jdt.internal.core.JarPackageFragmentRoot
public class JarPackageFragmentRoot
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.
IPackageFragmentRoot
,
JarPackageFragmentRootInfo
Field Summary |
---|
Fields inherited from class org.eclipse.jdt.internal.core.PackageFragmentRoot |
---|
NO_SOURCE_ATTACHMENT |
Fields inherited from class org.eclipse.jdt.internal.core.JavaElement |
---|
JEM_ANNOTATION, JEM_CLASSFILE, JEM_COMPILATIONUNIT, JEM_COUNT, JEM_ESCAPE, JEM_FIELD, JEM_IMPORTDECLARATION, JEM_INITIALIZER, JEM_JAVAPROJECT, JEM_LOCALVARIABLE, JEM_METHOD, JEM_PACKAGEDECLARATION, JEM_PACKAGEFRAGMENT, JEM_PACKAGEFRAGMENTROOT, JEM_TYPE, JEM_TYPE_PARAMETER |
Fields inherited from interface 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 |
Fields inherited from interface org.eclipse.jdt.core.IJavaElement |
---|
ANNOTATION, CLASS_FILE, COMPILATION_UNIT, FIELD, IMPORT_CONTAINER, IMPORT_DECLARATION, INITIALIZER, JAVA_MODEL, JAVA_PROJECT, LOCAL_VARIABLE, METHOD, PACKAGE_DECLARATION, PACKAGE_FRAGMENT, PACKAGE_FRAGMENT_ROOT, TYPE, TYPE_PARAMETER |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
Returns true if this handle represents the same jar as the given handle. |
java.lang.String |
getElementName()
Returns the name of this element. |
java.util.zip.ZipFile |
getJar()
Returns the underlying ZipFile for this Jar package fragment root. |
int |
getKind()
Returns this package fragment root's kind encoded as an integer. |
java.lang.Object[] |
getNonJavaResources()
Returns an array of non-java resources contained in the receiver. |
PackageFragment |
getPackageFragment(java.lang.String[] pkgName)
|
IResource |
getUnderlyingResource()
Returns the smallest underlying resource that contains this element, or null if this element is not contained
in a resource. |
int |
hashCode()
Returns the hash code for this Java element. |
org.eclipse.core.runtime.IPath |
internalPath()
|
boolean |
isArchive()
Returns whether this package fragment root's underlying resource is a binary archive (a JAR or zip file). |
boolean |
isExternal()
Returns whether this package fragment root is external to the workbench (that is, a local file), and has no underlying resource. |
boolean |
isReadOnly()
Jars and jar entries are all read only |
IResource |
resource(PackageFragmentRoot root)
|
Methods inherited from class org.eclipse.jdt.internal.core.PackageFragmentRoot |
---|
attachSource, copy, createPackageFragment, delete, fullExclusionPatternChars, fullInclusionPatternChars, getElementType, getHandleFromMemento, getPackageFragment, getPath, getRawClasspathEntry, getSourceAttachmentPath, getSourceAttachmentRootPath, getSourceMapper, hasChildren, move, resource, setSourceMapper |
Methods inherited from class org.eclipse.jdt.internal.core.Openable |
---|
bufferChanged, canBeRemovedFromCache, canBufferBeRemovedFromCache, exists, findRecommendedLineSeparator, getBuffer, getBufferFactory, getCorrespondingResource, getOpenable, getPackageFragmentRoot, getResource, hasUnsavedChanges, isConsistent, isOpen, isStructureKnown, makeConsistent, open, save |
Methods inherited from class org.eclipse.jdt.internal.core.JavaElement |
---|
close, findNode, getAncestor, getAttachedJavadoc, getChildren, getChildrenOfType, getClassFile, getCompilationUnit, getElementInfo, getElementInfo, getHandleFromMemento, getHandleIdentifier, getHandleMemento, getJavaModel, getJavaProject, getOpenableParent, getParent, getPrimaryElement, getPrimaryElement, getSchedulingRule, isAncestorOf, newJavaModelException, newNotPresentException, readableName, resolved, toDebugString, toString, toStringInfo, toStringWithAncestors, toStringWithAncestors, unresolved |
Methods inherited from class org.eclipse.core.runtime.PlatformObject |
---|
getAdapter |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.jdt.core.IParent |
---|
getChildren |
Methods inherited from interface org.eclipse.jdt.core.IJavaElement |
---|
exists, getAncestor, getAttachedJavadoc, getCorrespondingResource, getHandleIdentifier, getJavaModel, getJavaProject, getOpenable, getParent, getPrimaryElement, getResource, getSchedulingRule, isStructureKnown |
Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
---|
getAdapter |
Methods inherited from interface org.eclipse.jdt.core.IOpenable |
---|
close, findRecommendedLineSeparator, getBuffer, hasUnsavedChanges, isConsistent, isOpen, makeConsistent, open, save |
Method Detail |
---|
public boolean equals(java.lang.Object o)
equals
in class PackageFragmentRoot
Object.equals(java.lang.Object)
public java.lang.String getElementName()
IJavaElement
getElementName
in interface IJavaElement
getElementName
in class PackageFragmentRoot
IAdaptable
public java.util.zip.ZipFile getJar() throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
- if an error occurs accessing the jarpublic int getKind()
IPackageFragmentRoot
Java-like extensions
,
or .class
files, but not both.
If the underlying folder or archive contains other kinds of files, they are ignored.
In particular, .class
files are ignored under a source package fragment root,
and source files are ignored under a binary package fragment root.
getKind
in interface IPackageFragmentRoot
getKind
in class PackageFragmentRoot
IPackageFragmentRoot
public java.lang.Object[] getNonJavaResources() throws JavaModelException
getNonJavaResources
in interface IPackageFragmentRoot
getNonJavaResources
in class PackageFragmentRoot
IFile
s,
IFolder
s, or IStorage
s if the
package fragment root is in archive) contained in this package
fragment root
JavaModelException
- if this element does not exist or if an
exception occurs while accessing its corresponding resource.IClasspathEntry.getInclusionPatterns()
,
IClasspathEntry.getExclusionPatterns()
public PackageFragment getPackageFragment(java.lang.String[] pkgName)
getPackageFragment
in class PackageFragmentRoot
public org.eclipse.core.runtime.IPath internalPath()
internalPath
in class PackageFragmentRoot
public IResource resource(PackageFragmentRoot root)
resource
in class PackageFragmentRoot
public IResource getUnderlyingResource() throws JavaModelException
IJavaElement
null
if this element is not contained
in a resource.
getUnderlyingResource
in interface IJavaElement
getUnderlyingResource
in class PackageFragmentRoot
null
if none
JavaModelException
- if this element does not exist or if an
exception occurs while accessing its underlying resourceIJavaElement
public int hashCode()
JavaElement
hashCode
in class PackageFragmentRoot
public boolean isArchive()
IPackageFragmentRoot
This is a handle-only method.
isArchive
in interface IPackageFragmentRoot
isArchive
in class PackageFragmentRoot
IPackageFragmentRoot
public boolean isExternal()
IPackageFragmentRoot
This is a handle-only method.
isExternal
in interface IPackageFragmentRoot
isExternal
in class PackageFragmentRoot
IPackageFragmentRoot
public boolean isReadOnly()
isReadOnly
in interface IJavaElement
isReadOnly
in class JavaElement
true
if this element is read-onlyIJavaElement
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |