Class AssistCompilationUnit
java.lang.Object
org.eclipse.core.runtime.PlatformObject
org.aspectj.org.eclipse.jdt.internal.core.JavaElement
org.aspectj.org.eclipse.jdt.internal.core.Openable
org.aspectj.org.eclipse.jdt.internal.core.CompilationUnit
org.aspectj.org.eclipse.jdt.internal.codeassist.impl.AssistCompilationUnit
- All Implemented Interfaces:
IBufferChangedListener,ICodeAssist,ICompilationUnit,IJavaElement,IOpenable,IParent,ISourceManipulation,ISourceReference,ITypeRoot,IWorkingCopy,ICompilationUnit,IDependent,SuffixConstants,org.eclipse.core.runtime.IAdaptable
-
Field Summary
Fields inherited from class org.aspectj.org.eclipse.jdt.internal.core.CompilationUnit
name, ownerFields inherited from class org.aspectj.org.eclipse.jdt.internal.core.JavaElement
JEM_ANNOTATION, JEM_CLASSFILE, JEM_COMPILATIONUNIT, JEM_COUNT, JEM_DELIMITER_ESCAPE, JEM_ESCAPE, JEM_FIELD, JEM_IMPORTDECLARATION, JEM_INITIALIZER, JEM_JAVAPROJECT, JEM_LAMBDA_EXPRESSION, JEM_LAMBDA_METHOD, JEM_LOCALVARIABLE, JEM_METHOD, JEM_MODULAR_CLASSFILE, JEM_MODULE, JEM_PACKAGEDECLARATION, JEM_PACKAGEFRAGMENT, JEM_PACKAGEFRAGMENTROOT, JEM_STRING, JEM_TYPE, JEM_TYPE_PARAMETER, NO_ELEMENTS, NO_INFO, NO_STRINGSFields inherited from interface org.aspectj.org.eclipse.jdt.core.ICompilationUnit
ENABLE_BINDINGS_RECOVERY, ENABLE_STATEMENTS_RECOVERY, FORCE_PROBLEM_DETECTION, IGNORE_METHOD_BODIES, NO_ASTFields inherited from interface org.aspectj.org.eclipse.jdt.internal.compiler.env.IDependent
JAR_FILE_ENTRY_SEPARATORFields inherited from interface org.aspectj.org.eclipse.jdt.core.IJavaElement
ANNOTATION, CLASS_FILE, COMPILATION_UNIT, FIELD, IMPORT_CONTAINER, IMPORT_DECLARATION, INITIALIZER, JAVA_MODEL, JAVA_MODULE, JAVA_PROJECT, LOCAL_VARIABLE, METHOD, PACKAGE_DECLARATION, PACKAGE_FRAGMENT, PACKAGE_FRAGMENT_ROOT, TYPE, TYPE_PARAMETERFields inherited from interface org.aspectj.org.eclipse.jdt.internal.compiler.util.SuffixConstants
EXTENSION_aj, EXTENSION_AJ, EXTENSION_class, EXTENSION_CLASS, EXTENSION_java, EXTENSION_JAVA, EXTENSION_jmod, EXTENSION_JMOD, SUFFIX_aj, SUFFIX_AJ, SUFFIX_class, SUFFIX_CLASS, SUFFIX_java, SUFFIX_JAVA, SUFFIX_STRING_aj, SUFFIX_STRING_AJ, SUFFIX_STRING_class, SUFFIX_STRING_CLASS, SUFFIX_STRING_java, SUFFIX_STRING_JAVA -
Constructor Summary
ConstructorsConstructorDescriptionAssistCompilationUnit(ICompilationUnit compilationUnit, WorkingCopyOwner owner, Map<JavaElement, Binding> bindingCache, Map<IJavaElement, IElementInfo> infoCache) -
Method Summary
Modifier and TypeMethodDescriptiongetElementInfo(org.eclipse.core.runtime.IProgressMonitor monitor) Returns the info for this handle.Returns the import container for this compilation unit.Returns the first package declaration in this compilation unit with the given package name (there normally is at most one package declaration).Returns the top-level type declared in this compilation unit with the given simple type name.booleanReturns whether this element has one or more immediate children.Methods inherited from class org.aspectj.org.eclipse.jdt.internal.core.CompilationUnit
applyTextEdit, becomeWorkingCopy, becomeWorkingCopy, buildStructure, calculateHashCode, canBeRemovedFromCache, canBufferBeRemovedFromCache, cloneCachingContents, close, closing, codeComplete, codeComplete, codeComplete, codeComplete, codeComplete, codeComplete, codeComplete, codeSelect, codeSelect, commit, commitWorkingCopy, copy, createElementInfo, createImport, createImport, createPackageDeclaration, createType, delete, destroy, discardWorkingCopy, equals, findElements, findPrimaryType, findSharedWorkingCopy, findWorkingCopy, getAllTypes, getCompilationUnit, getContents, getCorrespondingResource, getCustomOptions, getElementAt, getElementName, getElementType, getFileName, getHandleFromMemento, getHandleMementoDelimiter, getImport, getImports, getMainTypeName, getModule, getModuleName, getNameRange, getOriginal, getOriginalElement, getOwner, getPackageDeclarations, getPackageName, getPath, getPerWorkingCopyInfo, getPrimary, getPrimaryElement, getSharedWorkingCopy, getSource, getSourceRange, getTypeRoot, getTypes, getUnderlyingResource, getWorkingCopy, getWorkingCopy, getWorkingCopy, getWorkingCopy, getWorkingCopy, hasBuffer, hasResourceChanged, ignoreOptionalProblems, isBasedOn, isConsistent, isPrimary, isSourceElement, isWorkingCopy, makeConsistent, makeConsistent, move, openAncestors, openBuffer, originalFromClone, reconcile, reconcile, reconcile, reconcile, reconcile, rename, resource, restore, save, setOptions, toStringInfo, updateTimeStamp, validateCompilationUnit, validateExistenceMethods inherited from class org.aspectj.org.eclipse.jdt.internal.core.Openable
bufferChanged, closeBuffer, codeComplete, codeSelect, exists, findRecommendedLineSeparator, generateInfos, getBuffer, getBufferFactory, getBufferManager, getOpenable, getPackageFragmentRoot, getResource, hasUnsavedChanges, ignoreErrorStatus, isOpen, isStructureKnown, open, resource, resourceExistsMethods inherited from class org.aspectj.org.eclipse.jdt.internal.core.JavaElement
appendEscapedDelimiter, escapeMementoName, findNode, getAncestor, getAttachedJavadoc, getChildren, getChildrenOfType, getClassFile, getElementInfo, getHandleFromMemento, getHandleIdentifier, getHandleMemento, getHandleMemento, getJavadocBaseLocation, getJavaModel, getJavaProject, getLibraryJavadocLocation, getOpenableParent, getParent, getPrimaryElement, getSchedulingRule, getSourceElementAt, getSourceMapper, getURLContents, hashCode, isAncestorOf, isReadOnly, newDoesNotExistStatus, newJavaModelException, newNotPresentException, openWhenClosed, readableName, resetHashCode, resolved, tabString, toDebugString, toString, toString, toStringAncestors, toStringChildren, toStringInfo, toStringName, toStringWithAncestors, toStringWithAncestors, unresolved, validateAndCacheMethods inherited from class org.eclipse.core.runtime.PlatformObject
getAdapterMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapterMethods inherited from interface org.aspectj.org.eclipse.jdt.core.ICompilationUnit
getOptionsMethods inherited from interface org.aspectj.org.eclipse.jdt.internal.compiler.env.ICompilationUnit
getDestinationPath, getExternalAnnotationPath, moduleMethods inherited from interface org.aspectj.org.eclipse.jdt.core.IJavaElement
exists, getAncestor, getAttachedJavadoc, getHandleIdentifier, getJavaModel, getJavaProject, getOpenable, getParent, getPrimaryElement, getResource, getSchedulingRule, isReadOnly, isStructureKnownMethods inherited from interface org.aspectj.org.eclipse.jdt.core.IOpenable
findRecommendedLineSeparator, getBuffer, hasUnsavedChanges, isOpen, openMethods inherited from interface org.aspectj.org.eclipse.jdt.core.IParent
getChildrenMethods inherited from interface org.aspectj.org.eclipse.jdt.core.ISourceReference
exists
-
Constructor Details
-
AssistCompilationUnit
public AssistCompilationUnit(ICompilationUnit compilationUnit, WorkingCopyOwner owner, Map<JavaElement, Binding> bindingCache, Map<IJavaElement, IElementInfo> infoCache)
-
-
Method Details
-
getElementInfo
public CompilationUnitElementInfo getElementInfo(org.eclipse.core.runtime.IProgressMonitor monitor) throws JavaModelException Description copied from class:JavaElementReturns the info for this handle. If this element is not already open, it and all of its parents are opened. Does not return null. NOTE: BinaryType infos are NOT rooted under JavaElementInfo.- Overrides:
getElementInfoin classJavaElement- Throws:
JavaModelException- if the element is not present or not accessible
-
getImportContainer
Description copied from interface:ICompilationUnitReturns the import container for this compilation unit. This is a handle-only method. The import container may or may not exist. The import container can used to access the imports.- Specified by:
getImportContainerin interfaceICompilationUnit- Overrides:
getImportContainerin classCompilationUnit- Returns:
- a handle onto the corresponding import container. The import contain may or may not exist.
- See Also:
-
getPackageDeclaration
Description copied from interface:ICompilationUnitReturns the first package declaration in this compilation unit with the given package name (there normally is at most one package declaration). This is a handle-only method. The package declaration may or may not exist.- Specified by:
getPackageDeclarationin interfaceICompilationUnit- Overrides:
getPackageDeclarationin classCompilationUnit- Parameters:
pkg- the name of the package declaration as defined by JLS2 7.4. (For example,"java.lang")- Returns:
- the first package declaration in this compilation unit with the given package name
- See Also:
-
getType
Description copied from interface:ICompilationUnitReturns the top-level type declared in this compilation unit with the given simple type name. The type name has to be a valid compilation unit name. This is a handle-only method. The type may or may not exist.- Specified by:
getTypein interfaceICompilationUnit- Overrides:
getTypein classCompilationUnit- Parameters:
typeName- the simple name of the requested type in the compilation unit- Returns:
- a handle onto the corresponding type. The type may or may not exist.
- See Also:
-
hasChildren
Description copied from interface:IParentReturns whether this element has one or more immediate children. This is a convenience method, and may be more efficient than testing whethergetChildrenis an empty array.- Specified by:
hasChildrenin interfaceIParent- Overrides:
hasChildrenin classJavaElement- Returns:
- true if the immediate children of this element, false otherwise
- Throws:
JavaModelException- if this element does not exist or if an exception occurs while accessing its corresponding resource- See Also:
-