Interface IJavaElement

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable
All Known Subinterfaces:
AbstractModule, IAnnotation, IClassFile, ICompilationUnit, IField, IImportContainer, IImportDeclaration, IInitializer, IJavaModel, IJavaProject, ILocalVariable, IMember, IMethod, IModularClassFile, IModuleDescription, IOrdinaryClassFile, IPackageDeclaration, IPackageFragment, IPackageFragmentRoot, IType, ITypeParameter, ITypeRoot
All Known Implementing Classes:
AbstractClassFile, AbstractModule.AutoModule, Annotation, AssistAnnotation, AssistCompilationUnit, AssistImportContainer, AssistImportDeclaration, AssistInitializer, AssistPackageDeclaration, AssistSourceField, AssistSourceMethod, AssistSourceType, AssistTypeParameter, BinaryLambdaExpression, BinaryLambdaMethod, BinaryMember, BinaryMethod, BinaryModule, BinaryType, ClassFile, ClassFileWorkingCopy, CompilationUnit, ExternalJavaProject, ExternalPackageFragmentRoot, ImportContainer, ImportDeclaration, Initializer, JarPackageFragmentRoot, JavaElement, JavaModel, JavaProject, JModPackageFragmentRoot, JrtPackageFragmentRoot, LambdaExpression, LambdaMethod, LocalVariable, Member, ModularClassFile, NamedMember, Openable, PackageDeclaration, PackageFragment, PackageFragmentRoot, ResolvedBinaryField, ResolvedBinaryMethod, ResolvedBinaryType, ResolvedLambdaExpression, ResolvedSourceField, ResolvedSourceMethod, ResolvedSourceType, SourceField, SourceMethod, SourceModule, SourceRefElement, SourceType, TypeParameter

public interface IJavaElement extends org.eclipse.core.runtime.IAdaptable
Common protocol for all elements provided by the Java model. Java model elements are exposed to clients as handles to the actual underlying element. The Java model may hand out any number of handles for each element. Handles that refer to the same element are guaranteed to be equal, but not necessarily identical.

Methods annotated as "handle-only" do not require underlying elements to exist. Methods that require underlying elements to exist throw a JavaModelException when an underlying element is missing. JavaModelException.isDoesNotExist can be used to recognize this common special case.