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

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

Introduction

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

The text is from its open source code.

Implementation

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

Field

intJAVA_MODEL
Constant representing a Java model (workspace level object).
intJAVA_PROJECT
Constant representing a Java project.
intPACKAGE_FRAGMENT_ROOT
Constant representing a package fragment root.
intPACKAGE_FRAGMENT
Constant representing a package fragment.
intCOMPILATION_UNIT
Constant representing a Java compilation unit.
intCLASS_FILE
Constant representing a class file.
intTYPE
Constant representing a type (a class or interface).
intFIELD
Constant representing a field.
intMETHOD
Constant representing a method or constructor.
intINITIALIZER
Constant representing a stand-alone instance or class initializer.
intPACKAGE_DECLARATION
Constant representing a package declaration within a compilation unit.
intIMPORT_CONTAINER
Constant representing all import declarations within a compilation unit.
intIMPORT_DECLARATION
Constant representing an import declaration within a compilation unit.
intLOCAL_VARIABLE
Constant representing a local variable declaration.
intTYPE_PARAMETER
Constant representing a type parameter declaration.
intANNOTATION
Constant representing an annotation.

Method

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.

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 name of this element.
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).
IOpenablegetOpenable()
Returns the first openable parent.
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.
ISchedulingRulegetSchedulingRule()
Returns the scheduling rule associated with this Java element.
IResourcegetUnderlyingResource()
Returns the smallest underlying resource that contains this element, or null if this element is not contained in a resource.
booleanisReadOnly()
Returns whether this Java element is read-only.
booleanisStructureKnown()
Returns whether the structure of this element is known.