Java org.eclipse.jdt.core IPackageFragment fields, constructors, methods, implement or subclass

Example usage for Java org.eclipse.jdt.core IPackageFragment fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.eclipse.jdt.core IPackageFragment.

The text is from its open source code.

Implementation

org.eclipse.jdt.core.IPackageFragment has the following implementations.
Click this link to see all its implementation.

Field

StringDEFAULT_PACKAGE_NAME

The name of package fragment for the default package (value: the empty string, "").

Method

voidclose()
Closes this element and its buffer (if any).
booleancontainsJavaResources()
Returns whether this fragment contains at least one Java resource.
ICompilationUnitcreateCompilationUnit(String name, String contents, boolean force, IProgressMonitor monitor)
Creates and returns a compilation unit in this package fragment with the specified name and contents.
booleanexists()
Returns whether this Java element exists in the model.
IJavaElementgetAncestor(int ancestorType)
Returns this Java element or the first ancestor of this element that has the given type.
StringgetAttachedJavadoc(IProgressMonitor monitor)

Returns the Javadoc as HTML source if this element has attached Javadoc, null otherwise.

This should be used only for binary elements.

IClassFilegetClassFile(String name)
Returns the class file with the specified name in this package (for example, "Object.class").
IClassFile[]getClassFiles()
Returns all of the ordinary class files in this package fragment.
ICompilationUnitgetCompilationUnit(String name)
Returns the compilation unit with the specified name in this package (for example, "Object.java").
ICompilationUnit[]getCompilationUnits()
Returns all of the compilation units in this package fragment.
IResourcegetCorrespondingResource()
Returns the resource that corresponds directly to this element, or null if there is no resource that corresponds to this element.
StringgetElementName()
Returns the dot-separated package name of this fragment, for example "java.lang", or "" (the empty string), for the default package.
intgetElementType()
Returns this element's kind encoded as an integer.
StringgetHandleIdentifier()
Returns a string representation of this element handle.
IJavaProjectgetJavaProject()
Returns the Java project this element is contained in, or null if this element is not contained in any Java project (for instance, the IJavaModel is not contained in any Java project).
intgetKind()
Returns this package fragment's root kind encoded as an integer.
Object[]getNonJavaResources()
Returns an array of non-Java resources contained in this package fragment.
IJavaElementgetParent()
Returns the element directly containing this element, or null if this element has no parent.
IPathgetPath()
Returns the path to the innermost resource enclosing this element.
IJavaElementgetPrimaryElement()
Returns the primary element (whose compilation unit is the primary compilation unit) this working copy element was created from, or this element if it is a descendant of a primary compilation unit or if it is not a descendant of a working copy (e.g.
IResourcegetResource()
Returns the innermost resource enclosing this element.
IResourcegetUnderlyingResource()
Returns the smallest underlying resource that contains this element, or null if this element is not contained in a resource.
booleanhasSubpackages()
Returns whether this package fragment's name is a prefix of other package fragments in this package fragment's root.
booleanisDefaultPackage()
Returns whether this package fragment is a default package.
booleanisOpen()
Returns whether this openable is open.
booleanisReadOnly()
Returns whether this Java element is read-only.
voidopen(IProgressMonitor progress)
Opens this element and all parent elements that are not already open.
voidsave(IProgressMonitor progress, boolean force)
Saves any changes in this element's buffer to its underlying resource via a workspace resource operation.