Interface IType

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable, IAnnotatable, IJavaElement, IMember, IParent, ISourceManipulation, ISourceReference
All Known Implementing Classes:
AssistSourceType, BinaryLambdaExpression, BinaryType, LambdaExpression, ResolvedBinaryType, ResolvedLambdaExpression, ResolvedSourceType, SourceType

public interface IType extends IMember, IAnnotatable
Represents either a source type in a compilation unit (either a top-level type, a member type, a local type, an anonymous type or a lambda expression) or a binary type in a class file. Enumeration classes and annotation types are subkinds of classes and interfaces, respectively.

Note that the element name of an anonymous source type and lambda expressions is always empty. Types representing lambda expressions are pseudo-elements and not included in the children of their parent. Lambda expressions are created as the result of a ICodeAssist.codeSelect(...). For more information on such pseudo-elements, see ILocalVariable.

If a binary type cannot be parsed, its structure remains unknown. Use IJavaElement.isStructureKnown to determine whether this is the case.

The children are of type IMember, which includes IField, IMethod, IInitializer and IType. The children are listed in the order in which they appear in the source or class file.

Caveat: The children of a binary type include nested types. However, the parent of such a nested binary type is not the enclosing type, but that nested type's IClassFile!