Klasse PackageFragment
- Alle implementierten Schnittstellen:
IBufferChangedListener,IJavaElement,IOpenable,IPackageFragment,IParent,ISourceManipulation,SuffixConstants,org.eclipse.core.runtime.IAdaptable
- Siehe auch:
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungString[]protected static final IClassFile[]Constant empty list of class filesprotected static final ICompilationUnit[]Constant empty list of compilation unitsprotected static final IOrdinaryClassFile[]Von 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.IPackageFragment
DEFAULT_PACKAGE_NAMEVon Schnittstelle geerbte Felder org.aspectj.org.eclipse.jdt.internal.compiler.util.SuffixConstants
EXTENSION_aj, EXTENSION_AJ, EXTENSION_class, EXTENSION_CLASS, EXTENSION_java, EXTENSION_JAVA, EXTENSION_jmod, EXTENSION_JMOD, SUFFIX_aj, SUFFIX_AJ, SUFFIX_class, SUFFIX_CLASS, SUFFIX_java, SUFFIX_JAVA, SUFFIX_STRING_aj, SUFFIX_STRING_AJ, SUFFIX_STRING_class, SUFFIX_STRING_CLASS, SUFFIX_STRING_java, SUFFIX_STRING_JAVA -
Konstruktorübersicht
KonstruktorenModifiziererKonstruktorBeschreibungprotectedPackageFragment(PackageFragmentRoot root, String[] names) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected booleanbuildStructure(OpenableElementInfo info, org.eclipse.core.runtime.IProgressMonitor pm, Map newElements, org.eclipse.core.resources.IResource underlyingResource) Builds this element's structure and properties in the given info object, based on this element's current contents (reuse buffer contents if this element has an open buffer, or resource contents if this element does not have an open buffer).booleanReturns true if this fragment contains at least one java resource.voidcopy(IJavaElement container, IJavaElement sibling, String rename, boolean force, org.eclipse.core.runtime.IProgressMonitor monitor) Copies this element to the given container.createCompilationUnit(String cuName, String contents, boolean force, org.eclipse.core.runtime.IProgressMonitor monitor) Creates and returns a compilation unit in this package fragment with the specified name and contents.protected Objectvoiddelete(boolean force, org.eclipse.core.runtime.IProgressMonitor monitor) Deletes this element, forcing if specified and necessary.booleanReturns true if this handle represents the same Java element as the given handle.booleanexists()Returns whether this Java element exists in the model.Returns a collection of all class files in this - a folder package fragment which has a root that has its kind set toIPackageFragmentRoot.K_Sourcedoes not recognize class files.getAttachedJavadoc(org.eclipse.core.runtime.IProgressMonitor monitor) Returns the Javadoc as HTML source if this element has attached Javadoc,nullotherwise.getClassFile(String classFileName) Returns the class file with the specified name in this package (for example,"Object.class").Veraltet.getCompilationUnit(String cuName) Returns the compilation unit with the specified name in this package (for example,"Object.java").Returns all of the compilation units in this package fragment.Returns all of the compilation units in this package fragment that are in working copy mode and that have the given owner.Returns the name of this element.intReturns this element's kind encoded as an integer.getHandleFromMemento(String token, MementoTokenizer memento, WorkingCopyOwner owner) protected charReturns thecharthat marks the start of this handles contribution to a memento.intgetKind()Returns this package fragment's root kind encoded as an integer.Returns the class file for"module-info.class"in this package.Object[]Returns an array of non-java resources contained in the receiver.getOrdinaryClassFile(String classFileName) Returns the class file with the specified name in this package (for example,"Object.class").Returns a collection of ordinary class files in this - a folder package fragment which has a root that has its kind set toIPackageFragmentRoot.K_Sourcedoes not recognize class files.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 element has one or more immediate children.inthashCode()Returns the hash code for this Java element.booleanReturns whether this package fragment's name is a prefix of other package fragments in this package fragment's root.protected booleanbooleanReturns whether this package fragment is a default package.protected final booleanvoidmove(IJavaElement container, IJavaElement sibling, String rename, boolean force, org.eclipse.core.runtime.IProgressMonitor monitor) Moves this element to the given container.voidRenames this element to the given name.org.eclipse.core.resources.IResourceresource(PackageFragmentRoot root) protected voidtoStringChildren(int tab, StringBuffer buffer, Object info) Debugging purposesprotected voidtoStringInfo(int tab, StringBuffer buffer, Object info, boolean showResolvedInfo) Debugging purposesprotected org.eclipse.core.runtime.IStatusvalidateExistence(org.eclipse.core.resources.IResource underlyingResource) Von Klasse geerbte Methoden org.aspectj.org.eclipse.jdt.internal.core.Openable
bufferChanged, canBeRemovedFromCache, canBufferBeRemovedFromCache, closeBuffer, closing, codeComplete, codeSelect, findRecommendedLineSeparator, generateInfos, getBuffer, getBufferFactory, getBufferManager, getCorrespondingResource, getOpenable, getPackageFragmentRoot, getResource, hasBuffer, hasUnsavedChanges, ignoreErrorStatus, isConsistent, isOpen, isSourceElement, isStructureKnown, makeConsistent, open, openAncestors, openBuffer, resource, resourceExists, saveVon Klasse geerbte Methoden org.aspectj.org.eclipse.jdt.internal.core.JavaElement
appendEscapedDelimiter, close, escapeMementoName, findNode, getAncestor, getChildren, getChildrenOfType, getClassFile, getCompilationUnit, getElementInfo, getElementInfo, getHandleFromMemento, getHandleIdentifier, getHandleMemento, getHandleMemento, getJavadocBaseLocation, getJavaModel, getJavaProject, getLibraryJavadocLocation, getOpenableParent, getParent, getPrimaryElement, getPrimaryElement, getSchedulingRule, getSourceElementAt, getSourceMapper, getURLContents, isAncestorOf, isReadOnly, newDoesNotExistStatus, newJavaModelException, newNotPresentException, openWhenClosed, readableName, resolved, setParent, tabString, toDebugString, toString, toString, toStringAncestors, 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
getAncestor, getCorrespondingResource, getHandleIdentifier, getJavaModel, getJavaProject, getOpenable, getParent, getPrimaryElement, getResource, getSchedulingRule, isReadOnly, 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
-
NO_CLASSFILES
Constant empty list of class files -
NO_ORDINARY_CLASSFILES
-
NO_COMPILATION_UNITS
Constant empty list of compilation units -
names
-
-
Konstruktordetails
-
PackageFragment
-
-
Methodendetails
-
buildStructure
protected boolean buildStructure(OpenableElementInfo info, org.eclipse.core.runtime.IProgressMonitor pm, Map newElements, org.eclipse.core.resources.IResource underlyingResource) throws JavaModelException Beschreibung aus Klasse kopiert:OpenableBuilds this element's structure and properties in the given info object, based on this element's current contents (reuse buffer contents if this element has an open buffer, or resource contents if this element does not have an open buffer). Children are placed in the given newElements table (note, this element has already been placed in the newElements table). Returns true if successful, or false if an error is encountered while determining the structure of this element.- Angegeben von:
buildStructurein KlasseOpenable- Löst aus:
JavaModelException- Siehe auch:
-
containsJavaResources
Returns true if this fragment contains at least one java resource. Returns false otherwise.- Angegeben von:
containsJavaResourcesin SchnittstelleIPackageFragment- Gibt zurück:
- true if this fragment contains at least one Java resource, false otherwise
- Löst aus:
JavaModelException- if this element does not exist or if an exception occurs while accessing its corresponding resource.
-
copy
public void copy(IJavaElement container, IJavaElement sibling, String rename, boolean force, org.eclipse.core.runtime.IProgressMonitor monitor) throws JavaModelException Beschreibung aus Schnittstelle kopiert:ISourceManipulationCopies this element to the given container.- Angegeben von:
copyin SchnittstelleISourceManipulation- Parameter:
container- the containersibling- the sibling element before which the copy should be inserted, ornullif the copy should be inserted as the last child of the containerrename- the new name for the element, ornullif the copy retains the name of this elementforce-trueif any existing child in the container with the target name should be replaced, andfalseto throw an exception in the event of a name collisionmonitor- a progress monitor- Löst aus:
JavaModelException- if this element could not be copied. Reasons include:- This Java element, container element, or sibling does not exist (ELEMENT_DOES_NOT_EXIST)
- A
CoreExceptionoccurred while updating an underlying resource - The container is of an incompatible type (INVALID_DESTINATION)
- The sibling is not a child of the given container (INVALID_SIBLING)
- The new name is invalid (INVALID_NAME)
- A child in the container already exists with the same name (NAME_COLLISION)
and
replacehas been specified asfalse - The container or this element is read-only (READ_ONLY)
- Siehe auch:
-
createCompilationUnit
public ICompilationUnit createCompilationUnit(String cuName, String contents, boolean force, org.eclipse.core.runtime.IProgressMonitor monitor) throws JavaModelException Beschreibung aus Schnittstelle kopiert:IPackageFragmentCreates and returns a compilation unit in this package fragment with the specified name and contents. No verification is performed on the contents.It is possible that a compilation unit with the same name already exists in this package fragment. The value of the
forceparameter affects the resolution of such a conflict:-
true- in this case the compilation is created with the new contents -
false- in this case aJavaModelExceptionis thrown
- Angegeben von:
createCompilationUnitin SchnittstelleIPackageFragment- Parameter:
cuName- the given namecontents- the given contentsforce- specify how to handle conflict is the same name already existsmonitor- the given progress monitor- Gibt zurück:
- a compilation unit in this package fragment with the specified name and contents
- Löst aus:
JavaModelException- if the element could not be created. Reasons include:- This Java element does not exist (ELEMENT_DOES_NOT_EXIST)
- A
CoreExceptionoccurred while creating an underlying resource - The name is not a valid compilation unit name (INVALID_NAME)
- The contents are
null(INVALID_CONTENTS)
- Siehe auch:
-
-
createElementInfo
- Setzt außer Kraft:
createElementInfoin KlasseOpenable- Siehe auch:
-
delete
public void delete(boolean force, org.eclipse.core.runtime.IProgressMonitor monitor) throws JavaModelException Beschreibung aus Schnittstelle kopiert:ISourceManipulationDeletes this element, forcing if specified and necessary.- Angegeben von:
deletein SchnittstelleISourceManipulation- Parameter:
force- a flag controlling whether underlying resources that are not in sync with the local file system will be tolerated (same as the force flag in IResource operations).monitor- a progress monitor- Löst aus:
JavaModelException- if this element could not be deleted. Reasons include:- This Java element does not exist (ELEMENT_DOES_NOT_EXIST)
- A
CoreExceptionoccurred while updating an underlying resource (CORE_EXCEPTION) - This element is read-only (READ_ONLY)
- Siehe auch:
-
equals
Beschreibung aus Klasse kopiert:JavaElementReturns true if this handle represents the same Java element as the given handle. By default, two handles represent the same element if they are identical or if they represent the same type of element, have equal names, parents, and occurrence counts.If a subclass has other requirements for equality, this method must be overridden.
- Setzt außer Kraft:
equalsin KlasseJavaElement- Siehe auch:
-
exists
public boolean exists()Beschreibung aus Schnittstelle kopiert:IJavaElementReturns whether this Java element exists in the model.Java elements are handle objects that may or may not be backed by an actual element. Java elements that are backed by an actual element are said to "exist", and this method returns
true. For Java elements that are not working copies, it is always the case that if the element exists, then its parent also exists (provided it has one) and includes the element as one of its children. It is therefore possible to navigated to any existing Java element from the root of the Java model along a chain of existing Java elements. On the other hand, working copies are said to exist until they are destroyed (withIWorkingCopy.destroy). Unlike regular Java elements, a working copy never shows up among the children of its parent element (which may or may not exist).- Angegeben von:
existsin SchnittstelleIJavaElement- Setzt außer Kraft:
existsin KlasseOpenable- Gibt zurück:
trueif this element exists in the Java model, andfalseif this element does not exist- Siehe auch:
-
getOrdinaryClassFile
Beschreibung aus Schnittstelle kopiert:IPackageFragmentReturns the class file with the specified name in this package (for example,"Object.class"). The ".class" suffix is required. This is a handle-only method. The class file may or may not be present.This method is not applicable to the files
"module-info.class"as introduced in Java 9. For those please useIPackageFragment.getModularClassFile().- Angegeben von:
getOrdinaryClassFilein SchnittstelleIPackageFragment- Parameter:
classFileName- the given name- Gibt zurück:
- the class file with the specified name in this package
- Löst aus:
IllegalArgumentException- if the name does not end with ".class" or if the name is "module-info.class".- Siehe auch:
-
getClassFile
Beschreibung aus Schnittstelle kopiert:IPackageFragmentReturns the class file with the specified name in this package (for example,"Object.class"). The ".class" suffix is required. This is a handle-only method. The class file may or may not be present.This method can handle ordinary class files or modular class files denoted by the name
"module-info.class".- Angegeben von:
getClassFilein SchnittstelleIPackageFragment- Parameter:
classFileName- the given name- Gibt zurück:
- the class file with the specified name in this package
- Löst aus:
IllegalArgumentException- if the name does not end with ".class".- Siehe auch:
-
getModularClassFile
Beschreibung aus Schnittstelle kopiert:IPackageFragmentReturns the class file for"module-info.class"in this package. This is a handle-only method. The class file may or may not be present. If the class file is present, then it is guaranteed to contain anIModuleDescription.- Angegeben von:
getModularClassFilein SchnittstelleIPackageFragment- Gibt zurück:
- the class file representing "module-info.class" in this package.
-
getOrdinaryClassFiles
Returns a collection of ordinary class files in this - a folder package fragment which has a root that has its kind set toIPackageFragmentRoot.K_Sourcedoes not recognize class files.- Angegeben von:
getOrdinaryClassFilesin SchnittstelleIPackageFragment- Gibt zurück:
- all of the ordinary class files in this package fragment
- Löst aus:
JavaModelException- if this element does not exist or if an exception occurs while accessing its corresponding resource.- Siehe auch:
-
getAllClassFiles
Returns a collection of all class files in this - a folder package fragment which has a root that has its kind set toIPackageFragmentRoot.K_Sourcedoes not recognize class files.- Angegeben von:
getAllClassFilesin SchnittstelleIPackageFragment- Gibt zurück:
- all of the class files in this package fragment
- Löst aus:
JavaModelException- if this element does not exist or if an exception occurs while accessing its corresponding resource.- Siehe auch:
-
getClassFiles
Veraltet.Beschreibung aus Schnittstelle kopiert:IPackageFragmentReturns all of the ordinary class files in this package fragment.Note: this list never includes a modular class file (see
IPackageFragment.getModularClassFile()).Note: it is possible that a package fragment contains only compilation units (in other words, its kind is
K_SOURCE), in which case this method returns an empty collection.- Angegeben von:
getClassFilesin SchnittstelleIPackageFragment- Gibt zurück:
- all of the ordinary class files in this package fragment
- Löst aus:
JavaModelException- if this element does not exist or if an exception occurs while accessing its corresponding resource.
-
getCompilationUnit
Beschreibung aus Schnittstelle kopiert:IPackageFragmentReturns the compilation unit with the specified name in this package (for example,"Object.java"). The name has to be a valid compilation unit name. This is a handle-only method. The compilation unit may or may not be present.- Angegeben von:
getCompilationUnitin SchnittstelleIPackageFragment- Parameter:
cuName- the given name- Gibt zurück:
- the compilation unit with the specified name in this package
- Löst aus:
IllegalArgumentException- if the name does not end with ".java"- Siehe auch:
-
getCompilationUnits
Beschreibung aus Schnittstelle kopiert:IPackageFragmentReturns all of the compilation units in this package fragment.Note: it is possible that a package fragment contains only class files (in other words, its kind is
K_BINARY), in which case this method returns an empty collection.- Angegeben von:
getCompilationUnitsin SchnittstelleIPackageFragment- Gibt zurück:
- all of the compilation units in this package fragment
- Löst aus:
JavaModelException- if this element does not exist or if an exception occurs while accessing its corresponding resource.- Siehe auch:
-
getCompilationUnits
Beschreibung aus Schnittstelle kopiert:IPackageFragmentReturns all of the compilation units in this package fragment that are in working copy mode and that have the given owner.Only existing working copies are returned. So a compilation unit handle that has no corresponding resource on disk will be included if and only if is in working copy mode.
Note: it is possible that a package fragment contains only class files (in other words, its kind is
K_BINARY), in which case this method returns an empty collection.- Angegeben von:
getCompilationUnitsin SchnittstelleIPackageFragment- Parameter:
owner- the owner of the returned compilation units- Gibt zurück:
- all of the compilation units in this package fragment
- Siehe auch:
-
getElementName
Beschreibung aus Schnittstelle kopiert:IJavaElementReturns the name of this element. This is a handle-only method.- Angegeben von:
getElementNamein SchnittstelleIJavaElement- Angegeben von:
getElementNamein SchnittstelleIPackageFragment- Setzt außer Kraft:
getElementNamein KlasseJavaElement- Gibt zurück:
- the element name
- Siehe auch:
-
getElementType
public int getElementType()Beschreibung aus Schnittstelle kopiert:IJavaElementReturns this element's kind encoded as an integer. This is a handle-only method.- Angegeben von:
getElementTypein SchnittstelleIJavaElement- Gibt zurück:
- the kind of element; one of the constants declared in
IJavaElement - Siehe auch:
-
getHandleFromMemento
public IJavaElement getHandleFromMemento(String token, MementoTokenizer memento, WorkingCopyOwner owner) - Angegeben von:
getHandleFromMementoin KlasseJavaElement
-
getHandleMementoDelimiter
protected char getHandleMementoDelimiter()Beschreibung aus Klasse kopiert:JavaElementReturns thecharthat marks the start of this handles contribution to a memento.- Angegeben von:
getHandleMementoDelimiterin KlasseJavaElement- Siehe auch:
-
getKind
Beschreibung aus Schnittstelle kopiert:IPackageFragmentReturns this package fragment's root kind encoded as an integer. A package fragment can contain source files (i.e. files with one of theJava-like extensions), or.classfiles. This is a convenience method.- Angegeben von:
getKindin SchnittstelleIPackageFragment- Gibt zurück:
- this package fragment's root kind encoded as an integer
- Löst aus:
JavaModelException- if this element does not exist or if an exception occurs while accessing its corresponding resource.- Siehe auch:
-
getNonJavaResources
Returns an array of non-java resources contained in the receiver.- Angegeben von:
getNonJavaResourcesin SchnittstelleIPackageFragment- Gibt zurück:
- an array of non-Java resources (
IFiles,IFolders, orIStorages if the package fragment is in an archive) contained in this package fragment - Löst aus:
JavaModelException- if this element does not exist or if an exception occurs while accessing its corresponding resource.- Siehe auch:
-
getPath
public org.eclipse.core.runtime.IPath getPath()Beschreibung aus Schnittstelle kopiert: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.- Angegeben von:
getPathin SchnittstelleIJavaElement- Gibt zurück:
- the path to the innermost resource enclosing this element
- Siehe auch:
-
resource
-
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 KlasseOpenable- 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 KlasseJavaElement
-
hasChildren
Beschreibung aus Schnittstelle kopiert:IParentReturns whether this element has one or more immediate children. This is a convenience method, and may be more efficient than testing whethergetChildrenis an empty array.- Angegeben von:
hasChildrenin SchnittstelleIParent- Setzt außer Kraft:
hasChildrenin KlasseJavaElement- Gibt zurück:
- true if the immediate children of this element, false otherwise
- Löst aus:
JavaModelException- if this element does not exist or if an exception occurs while accessing its corresponding resource- Siehe auch:
-
hasSubpackages
Beschreibung aus Schnittstelle kopiert:IPackageFragmentReturns whether this package fragment's name is a prefix of other package fragments in this package fragment's root.- Angegeben von:
hasSubpackagesin SchnittstelleIPackageFragment- Gibt zurück:
- true if this package fragment's name is a prefix of other package fragments in this package fragment's root, false otherwise
- Löst aus:
JavaModelException- if this element does not exist or if an exception occurs while accessing its corresponding resource.- Siehe auch:
-
internalIsValidPackageName
protected boolean internalIsValidPackageName() -
isDefaultPackage
public boolean isDefaultPackage()Beschreibung aus Schnittstelle kopiert:IPackageFragmentReturns whether this package fragment is a default package. This is a handle-only method.- Angegeben von:
isDefaultPackagein SchnittstelleIPackageFragment- Gibt zurück:
- true if this package fragment is a default package
- Siehe auch:
-
isValidPackageName
protected final boolean isValidPackageName() -
move
public void move(IJavaElement container, IJavaElement sibling, String rename, boolean force, org.eclipse.core.runtime.IProgressMonitor monitor) throws JavaModelException Beschreibung aus Schnittstelle kopiert:ISourceManipulationMoves this element to the given container.- Angegeben von:
movein SchnittstelleISourceManipulation- Parameter:
container- the containersibling- the sibling element before which the element should be inserted, ornullif the element should be inserted as the last child of the containerrename- the new name for the element, ornullif the element retains its nameforce-trueif any existing child in the container with the target name should be replaced, andfalseto throw an exception in the event of a name collisionmonitor- a progress monitor- Löst aus:
JavaModelException- if this element could not be moved. Reasons include:- This Java element, container element, or sibling does not exist (ELEMENT_DOES_NOT_EXIST)
- A
CoreExceptionoccurred while updating an underlying resource - The container is of an incompatible type (INVALID_DESTINATION)
- The sibling is not a child of the given container (INVALID_SIBLING)
- The new name is invalid (INVALID_NAME)
- A child in the container already exists with the same name (NAME_COLLISION)
and
replacehas been specified asfalse - The container or this element is read-only (READ_ONLY)
- Siehe auch:
-
rename
public void rename(String newName, boolean force, org.eclipse.core.runtime.IProgressMonitor monitor) throws JavaModelException Beschreibung aus Schnittstelle kopiert:ISourceManipulationRenames this element to the given name.- Angegeben von:
renamein SchnittstelleISourceManipulation- Parameter:
newName- the new name for the elementforce-trueif any existing element with the target name should be replaced, andfalseto throw an exception in the event of a name collisionmonitor- a progress monitor- Löst aus:
JavaModelException- if this element could not be renamed. Reasons include:- This Java element does not exist (ELEMENT_DOES_NOT_EXIST)
- A
CoreExceptionoccurred while updating an underlying resource - The new name is invalid (INVALID_NAME)
- A child in the container already exists with the same name (NAME_COLLISION)
and
replacehas been specified asfalse - This element is read-only (READ_ONLY)
- Siehe auch:
-
toStringChildren
Debugging purposes- Setzt außer Kraft:
toStringChildrenin KlasseJavaElement
-
toStringInfo
Debugging purposes- Setzt außer Kraft:
toStringInfoin KlasseJavaElement- Parameter:
showResolvedInfo- TODO
-
getAttachedJavadoc
public String getAttachedJavadoc(org.eclipse.core.runtime.IProgressMonitor monitor) throws JavaModelException Beschreibung aus Schnittstelle kopiert:IJavaElementReturns the Javadoc as HTML source if this element has attached Javadoc,
nullotherwise.This should be used only for binary elements. Source elements will always return
null.The encoding used to read the Javadoc is the one defined by the content type of the file. If none is defined, then the project's encoding of this Java element is used. If the project's encoding cannot be retrieved, then the platform encoding is used.
In case the Javadoc doesn't exist for this element,
nullis returned.The HTML is extracted from the attached Javadoc and provided as is. No transformation or validation is done.
- Angegeben von:
getAttachedJavadocin SchnittstelleIJavaElement- Setzt außer Kraft:
getAttachedJavadocin KlasseJavaElement- Parameter:
monitor- the given progress monitor, can benull- Gibt zurück:
- the extracted javadoc from the attached javadoc,
nullif none - Löst aus:
JavaModelException- if:- this element does not exist
- retrieving the attached javadoc fails (timed-out, invalid URL, ...)
- the format of the javadoc doesn't match expected standards (different anchors,...)
- Siehe auch:
-
validateExistence
protected org.eclipse.core.runtime.IStatus validateExistence(org.eclipse.core.resources.IResource underlyingResource) - Angegeben von:
validateExistencein KlasseOpenable
-