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, owner
Fields 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_STRINGS
Fields inherited from interface org.aspectj.org.eclipse.jdt.core.ICompilationUnit
ENABLE_BINDINGS_RECOVERY, ENABLE_STATEMENTS_RECOVERY, FORCE_PROBLEM_DETECTION, IGNORE_METHOD_BODIES, NO_AST
Fields inherited from interface org.aspectj.org.eclipse.jdt.internal.compiler.env.IDependent
JAR_FILE_ENTRY_SEPARATOR
Fields 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_PARAMETER
Fields 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
ConstructorDescriptionAssistCompilationUnit(ICompilationUnit compilationUnit, WorkingCopyOwner owner, Map bindingCache, Map 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.getPackageDeclaration(String pkg)
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.boolean
Returns 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, 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, validateExistence
Methods 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, resourceExists
Methods 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, resolved, setParent, tabString, toDebugString, toString, toString, toStringAncestors, toStringChildren, toStringInfo, toStringName, toStringWithAncestors, toStringWithAncestors, unresolved, validateAndCache
Methods inherited from class org.eclipse.core.runtime.PlatformObject
getAdapter
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
Methods inherited from interface org.aspectj.org.eclipse.jdt.core.ICompilationUnit
getOptions
Methods inherited from interface org.aspectj.org.eclipse.jdt.internal.compiler.env.ICompilationUnit
getDestinationPath, getExternalAnnotationPath, module
Methods inherited from interface org.aspectj.org.eclipse.jdt.core.IJavaElement
exists, getAncestor, getAttachedJavadoc, getHandleIdentifier, getJavaModel, getJavaProject, getOpenable, getParent, getPrimaryElement, getResource, getSchedulingRule, isReadOnly, isStructureKnown
Methods inherited from interface org.aspectj.org.eclipse.jdt.core.IOpenable
findRecommendedLineSeparator, getBuffer, hasUnsavedChanges, isOpen, open
Methods inherited from interface org.aspectj.org.eclipse.jdt.core.IParent
getChildren
Methods inherited from interface org.aspectj.org.eclipse.jdt.core.ISourceReference
exists
-
Constructor Details
-
AssistCompilationUnit
public AssistCompilationUnit(ICompilationUnit compilationUnit, WorkingCopyOwner owner, Map bindingCache, Map infoCache)
-
-
Method Details
-
getElementInfo
public Object getElementInfo(org.eclipse.core.runtime.IProgressMonitor monitor) throws JavaModelExceptionDescription copied from class:JavaElement
Returns 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:
getElementInfo
in classJavaElement
- Throws:
JavaModelException
- if the element is not present or not accessible
-
getImportContainer
Description copied from interface:ICompilationUnit
Returns 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:
getImportContainer
in interfaceICompilationUnit
- Overrides:
getImportContainer
in classCompilationUnit
- Returns:
- a handle onto the corresponding import container. The import contain may or may not exist.
- See Also:
ICompilationUnit.getImportContainer()
-
getPackageDeclaration
Description copied from interface:ICompilationUnit
Returns 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:
getPackageDeclaration
in interfaceICompilationUnit
- Overrides:
getPackageDeclaration
in 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:
ICompilationUnit.getPackageDeclaration(String)
-
getType
Description copied from interface:ICompilationUnit
Returns 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:
getType
in interfaceICompilationUnit
- Overrides:
getType
in 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:
ICompilationUnit.getType(String)
-
hasChildren
Description copied from interface:IParent
Returns whether this element has one or more immediate children. This is a convenience method, and may be more efficient than testing whethergetChildren
is an empty array.- Specified by:
hasChildren
in interfaceIParent
- Overrides:
hasChildren
in 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:
IParent
-