Example usage for Java org.eclipse.jdt.core IJavaElement fields, constructors, methods, implement or subclass
The text is from its open source code.
int | JAVA_MODEL Constant representing a Java model (workspace level object). |
int | JAVA_PROJECT Constant representing a Java project. |
int | PACKAGE_FRAGMENT_ROOT Constant representing a package fragment root. |
int | PACKAGE_FRAGMENT Constant representing a package fragment. |
int | COMPILATION_UNIT Constant representing a Java compilation unit. |
int | CLASS_FILE Constant representing a class file. |
int | TYPE Constant representing a type (a class or interface). |
int | FIELD Constant representing a field. |
int | METHOD Constant representing a method or constructor. |
int | INITIALIZER Constant representing a stand-alone instance or class initializer. |
int | PACKAGE_DECLARATION Constant representing a package declaration within a compilation unit. |
int | IMPORT_CONTAINER Constant representing all import declarations within a compilation unit. |
int | IMPORT_DECLARATION Constant representing an import declaration within a compilation unit. |
int | LOCAL_VARIABLE Constant representing a local variable declaration. |
int | TYPE_PARAMETER Constant representing a type parameter declaration. |
int | ANNOTATION Constant representing an annotation. |
boolean | exists() Returns whether this Java element exists in the model. |
IJavaElement | getAncestor(int ancestorType) Returns this Java element or the first ancestor of this element that has the given type. |
String | getAttachedJavadoc(IProgressMonitor monitor) Returns the Javadoc as HTML source if this element has attached Javadoc, This should be used only for binary elements. |
IResource | getCorrespondingResource() Returns the resource that corresponds directly to this element, or null if there is no resource that corresponds to this element. |
String | getElementName() Returns the name of this element. |
int | getElementType() Returns this element's kind encoded as an integer. |
String | getHandleIdentifier() Returns a string representation of this element handle. |
IJavaProject | getJavaProject() 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). |
IOpenable | getOpenable() Returns the first openable parent. |
IJavaElement | getParent() Returns the element directly containing this element, or null if this element has no parent. |
IPath | getPath() Returns the path to the innermost resource enclosing this element. |
IJavaElement | getPrimaryElement() 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. |
IResource | getResource() Returns the innermost resource enclosing this element. |
ISchedulingRule | getSchedulingRule() Returns the scheduling rule associated with this Java element. |
IResource | getUnderlyingResource() Returns the smallest underlying resource that contains this element, or null if this element is not contained in a resource. |
boolean | isReadOnly() Returns whether this Java element is read-only. |
boolean | isStructureKnown() Returns whether the structure of this element is known. |