public class ExternalPackageFragmentRoot extends PackageFragmentRoot
NOTE: An external package fragment root never has an associated resource.
IPackageFragmentRoot,
PackageFragmentRootInfo| Modifier and Type | Field and Description |
|---|---|
protected IPath |
externalPath
The path to the external folder
(an OS path)
|
ATTACHMENT_PROPERTY_DELIMITER, NO_SOURCE_ATTACHMENT, resourceJEM_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_PACKAGEDECLARATION, JEM_PACKAGEFRAGMENT, JEM_PACKAGEFRAGMENTROOT, JEM_STRING, JEM_TYPE, JEM_TYPE_PARAMETER, NO_ELEMENTS, NO_INFO, parentDEFAULT_PACKAGEROOT_PATH, DESTINATION_PROJECT_CLASSPATH, K_BINARY, K_SOURCE, NO_RESOURCE_MODIFICATION, ORIGINATING_PROJECT_CLASSPATH, OTHER_REFERRING_PROJECTS_CLASSPATH, REPLACEANNOTATION, 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| Modifier | Constructor and Description |
|---|---|
protected |
ExternalPackageFragmentRoot(IPath externalPath,
JavaProject project)
Constructs a package fragment root which is the root of the Java package directory hierarchy
based on an external folder that is not contained in a
IJavaProject and
does not have an associated IResource. |
protected |
ExternalPackageFragmentRoot(IResource linkedFolder,
IPath externalPath,
JavaProject project) |
| Modifier and Type | Method and Description |
|---|---|
protected int |
determineKind(IResource underlyingResource)
An external class folder is always K_BINARY.
|
boolean |
equals(java.lang.Object o)
Returns true if this handle represents the same external folder
as the given handle.
|
java.lang.String |
getElementName()
Returns the name of this element.
|
int |
getKind()
Returns this package fragment root's kind encoded as an integer.
|
IPath |
getPath()
Returns the path to the innermost resource enclosing this element.
|
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.
|
boolean |
isExternal()
Returns whether this package fragment root is external
to the workbench (that is, a local file), and has no
underlying resource.
|
IResource |
resource(PackageFragmentRoot root) |
protected boolean |
resourceExists(IResource underlyingResource)
Returns whether the corresponding resource or associated file exists
|
protected void |
toStringAncestors(java.lang.StringBuffer buffer)
Debugging purposes
|
attachSource, buildStructure, computeChildren, computeFolderChildren, copy, createElementInfo, createPackageFragment, delete, fullExclusionPatternChars, fullInclusionPatternChars, getElementType, getHandleFromMemento, getHandleMemento, getHandleMementoDelimiter, getNonJavaResources, getPackageFragment, getPackageFragment, getPackageName, getRawClasspathEntry, getResolvedClasspathEntry, getSourceAttachmentPath, getSourceAttachmentRootPath, getSourceMapper, hasChildren, ignoreOptionalProblems, internalPath, isArchive, move, resource, setSourceMapper, toStringInfo, validateExistence, validateOnClasspath, verifyAttachSourcebufferChanged, canBeRemovedFromCache, canBufferBeRemovedFromCache, closeBuffer, closing, codeComplete, codeSelect, exists, findRecommendedLineSeparator, generateInfos, getBuffer, getBufferFactory, getBufferManager, getCorrespondingResource, getOpenable, getPackageFragmentRoot, getResource, hasBuffer, hasUnsavedChanges, isConsistent, isOpen, isSourceElement, isStructureKnown, makeConsistent, open, openAncestors, openBuffer, saveappendEscapedDelimiter, 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, isReadOnly, newDoesNotExistStatus, newJavaModelException, newNotPresentException, openWhenClosed, readableName, resolved, tabString, toDebugString, toString, toString, toStringChildren, toStringInfo, toStringName, toStringWithAncestors, toStringWithAncestors, unresolved, validateAndCacheclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetChildrenexists, getAncestor, getAttachedJavadoc, getCorrespondingResource, getHandleIdentifier, getJavaModel, getJavaProject, getOpenable, getParent, getPrimaryElement, getResource, getSchedulingRule, isReadOnly, isStructureKnownclose, findRecommendedLineSeparator, getBuffer, hasUnsavedChanges, isConsistent, isOpen, makeConsistent, open, saveprotected final IPath externalPath
protected ExternalPackageFragmentRoot(IPath externalPath,
JavaProject project)
IJavaProject and
does not have an associated IResource.protected ExternalPackageFragmentRoot(IResource linkedFolder,
IPath externalPath,
JavaProject project)
protected int determineKind(IResource underlyingResource)
determineKind in class PackageFragmentRootpublic boolean equals(java.lang.Object o)
equals in class PackageFragmentRootObject.equals(java.lang.Object)public java.lang.String getElementName()
IJavaElementgetElementName in interface IJavaElementgetElementName in class PackageFragmentRootIAdaptablepublic int getKind()
IPackageFragmentRootJava-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 IPackageFragmentRootgetKind in class PackageFragmentRootIPackageFragmentRootpublic IPath getPath()
IJavaElementgetPath in interface IJavaElementgetPath in class PackageFragmentRootIPackageFragmentRootpublic IResource getUnderlyingResource()
throws JavaModelException
IJavaElementnull if this element is not contained
in a resource.getUnderlyingResource in interface IJavaElementgetUnderlyingResource in class PackageFragmentRootnull if noneJavaModelException - if this element does not exist or if an
exception occurs while accessing its underlying resourceIJavaElementpublic int hashCode()
JavaElementhashCode in class PackageFragmentRootpublic boolean isExternal()
IPackageFragmentRootThis is a handle-only method.
isExternal in interface IPackageFragmentRootisExternal in class PackageFragmentRootIPackageFragmentRootpublic IResource resource(PackageFragmentRoot root)
resource in class PackageFragmentRootprotected boolean resourceExists(IResource underlyingResource)
OpenableresourceExists in class Openableprotected void toStringAncestors(java.lang.StringBuffer buffer)
JavaElementtoStringAncestors in class JavaElement