Class ExternalPackageFragmentRoot
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.ExternalPackageFragmentRoot
- All Implemented Interfaces:
IBufferChangedListener,IJavaElement,IOpenable,IPackageFragmentRoot,IParent,org.eclipse.core.runtime.IAdaptable
A package fragment root that corresponds to an external class folder.
NOTE: An external package fragment root never has an associated resource.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.eclipse.core.runtime.IPathThe path to the external folder (an OS path)Fields inherited from class org.aspectj.org.eclipse.jdt.internal.core.PackageFragmentRoot
ATTACHMENT_PROPERTY_DELIMITER, NO_SOURCE_ATTACHMENT, resourceFields inherited from class 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_STRINGSFields inherited from interface 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_PARAMETERFields inherited from interface 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 -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedExternalPackageFragmentRoot(org.eclipse.core.resources.IResource linkedFolder, org.eclipse.core.runtime.IPath externalPath, JavaProject project) protectedExternalPackageFragmentRoot(org.eclipse.core.runtime.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 aIJavaProjectand does not have an associatedIResource. -
Method Summary
Modifier and TypeMethodDescriptionprotected intprotected intdetermineKind(org.eclipse.core.resources.IResource underlyingResource) An external class folder is always K_BINARY.booleanReturns true if this handle represents the same external folder as the given handle.Returns the name of this element.intgetKind()Returns this package fragment root's kind encoded as an integer.org.eclipse.core.runtime.IPathgetPath()Returns the path to the innermost resource enclosing this element.org.eclipse.core.resources.IResourceReturns the smallest underlying resource that contains this element, ornullif this element is not contained in a resource.booleanReturns whether this package fragment root is external to the workbench (that is, a local file), and has no underlying resource.org.eclipse.core.resources.IResourceresource(PackageFragmentRoot root) protected booleanresourceExists(org.eclipse.core.resources.IResource underlyingResource) Returns whether the corresponding resource or associated file existsprotected voidtoStringAncestors(StringBuilder buffer) Debugging purposesMethods inherited from class org.aspectj.org.eclipse.jdt.internal.core.PackageFragmentRoot
attachSource, buildStructure, computeChildren, computeFolderChildren, copy, createElementInfo, createPackageFragment, delete, fullExclusionPatternChars, fullInclusionPatternChars, getAutomaticModuleDescription, getClassFilePath, getElementType, getHandleFromMemento, getHandleMemento, getHandleMementoDelimiter, getManifest, getModuleDescription, getNonJavaResources, getPackageFragment, getPackageFragment, getPackageFragment, getPackageName, getRawClasspathEntry, getResolvedClasspathEntry, getSourceAttachmentPath, getSourceAttachmentRootPath, getSourceMapper, hasChildren, hasCompilationUnit, ignoreOptionalProblems, internalPath, isArchive, isComplianceJava9OrHigher, move, resource, setSourceMapper, toStringInfo, validateExistence, validateOnClasspath, verifyAttachSourceMethods inherited from class 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, saveMethods inherited from class 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, hashCode, isAncestorOf, isReadOnly, newDoesNotExistStatus, newJavaModelException, newNotPresentException, openWhenClosed, readableName, resetHashCode, resolved, tabString, toDebugString, toString, toString, toStringChildren, toStringInfo, toStringName, toStringWithAncestors, toStringWithAncestors, unresolved, validateAndCacheMethods inherited from class org.eclipse.core.runtime.PlatformObject
getAdapterMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapterMethods inherited from interface org.aspectj.org.eclipse.jdt.core.IJavaElement
exists, getAncestor, getAttachedJavadoc, getCorrespondingResource, getHandleIdentifier, getJavaModel, getJavaProject, getOpenable, getParent, getPrimaryElement, getResource, getSchedulingRule, isReadOnly, isStructureKnownMethods inherited from interface org.aspectj.org.eclipse.jdt.core.IOpenable
close, findRecommendedLineSeparator, getBuffer, hasUnsavedChanges, isConsistent, isOpen, makeConsistent, open, saveMethods inherited from interface org.aspectj.org.eclipse.jdt.core.IParent
getChildren
-
Field Details
-
externalPath
protected final org.eclipse.core.runtime.IPath externalPathThe path to the external folder (an OS path)
-
-
Constructor Details
-
ExternalPackageFragmentRoot
protected ExternalPackageFragmentRoot(org.eclipse.core.runtime.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 aIJavaProjectand does not have an associatedIResource. -
ExternalPackageFragmentRoot
protected ExternalPackageFragmentRoot(org.eclipse.core.resources.IResource linkedFolder, org.eclipse.core.runtime.IPath externalPath, JavaProject project)
-
-
Method Details
-
determineKind
protected int determineKind(org.eclipse.core.resources.IResource underlyingResource) An external class folder is always K_BINARY.- Overrides:
determineKindin classPackageFragmentRoot
-
equals
Returns true if this handle represents the same external folder as the given handle.- Overrides:
equalsin classPackageFragmentRoot- See Also:
-
calculateHashCode
protected int calculateHashCode()- Overrides:
calculateHashCodein classPackageFragmentRoot
-
getElementName
Description copied from interface:IJavaElementReturns the name of this element. This is a handle-only method.- Specified by:
getElementNamein interfaceIJavaElement- Overrides:
getElementNamein classPackageFragmentRoot- Returns:
- the element name
- See Also:
-
getKind
public int getKind()Description copied from interface: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.- Specified by:
getKindin interfaceIPackageFragmentRoot- Overrides:
getKindin classPackageFragmentRoot- Returns:
- this package fragment root's kind encoded as an integer
- See Also:
-
getPath
public org.eclipse.core.runtime.IPath getPath()Description copied from interface:IJavaElementReturns the path to the innermost resource enclosing this element. If this element is not included in an external library, the path returned is the full, absolute path to the underlying resource, relative to the workbench. If this element is included in an external library, the path returned is the absolute path to the archive or to the folder in the file system. This is a handle-only method.- Specified by:
getPathin interfaceIJavaElement- Overrides:
getPathin classPackageFragmentRoot- Returns:
- the path to the innermost resource enclosing this element
- See Also:
-
getUnderlyingResource
Description copied from interface:IJavaElementReturns the smallest underlying resource that contains this element, ornullif this element is not contained in a resource.- Specified by:
getUnderlyingResourcein interfaceIJavaElement- Overrides:
getUnderlyingResourcein classPackageFragmentRoot- Returns:
- the underlying resource, or
nullif none - Throws:
JavaModelException- if this element does not exist or if an exception occurs while accessing its underlying resource- See Also:
-
isExternal
public boolean isExternal()Description copied from interface: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.
- Specified by:
isExternalin interfaceIPackageFragmentRoot- Overrides:
isExternalin classPackageFragmentRoot- Returns:
- true if this package fragment root is external to the workbench (that is, a local file), and has no underlying resource, false otherwise
- See Also:
-
resource
- Overrides:
resourcein classPackageFragmentRoot
-
resourceExists
protected boolean resourceExists(org.eclipse.core.resources.IResource underlyingResource) Description copied from class:OpenableReturns whether the corresponding resource or associated file exists- Overrides:
resourceExistsin classOpenable
-
toStringAncestors
Description copied from class:JavaElementDebugging purposes- Overrides:
toStringAncestorsin classJavaElement
-