public class AssistCompilationUnit extends CompilationUnit
name, ownerJEM_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_PACKAGEDECLARATION, JEM_PACKAGEFRAGMENT, JEM_PACKAGEFRAGMENTROOT, JEM_STRING, JEM_TYPE, JEM_TYPE_PARAMETER, NO_ELEMENTS, NO_INFO, parentENABLE_BINDINGS_RECOVERY, ENABLE_STATEMENTS_RECOVERY, FORCE_PROBLEM_DETECTION, IGNORE_METHOD_BODIES, NO_ASTANNOTATION, CLASS_FILE, COMPILATION_UNIT, FIELD, IMPORT_CONTAINER, IMPORT_DECLARATION, INITIALIZER, JAVA_MODEL, JAVA_PROJECT, LOCAL_VARIABLE, METHOD, PACKAGE_DECLARATION, PACKAGE_FRAGMENT, PACKAGE_FRAGMENT_ROOT, TYPE, TYPE_PARAMETERJAR_FILE_ENTRY_SEPARATOREXTENSION_aj, EXTENSION_AJ, EXTENSION_class, EXTENSION_CLASS, EXTENSION_java, EXTENSION_JAVA, 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 and Description |
|---|
AssistCompilationUnit(ICompilationUnit compilationUnit,
WorkingCopyOwner owner,
java.util.Map bindingCache,
java.util.Map infoCache) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getElementInfo(IProgressMonitor monitor)
Returns the info for this handle.
|
IImportContainer |
getImportContainer()
Returns the import container for this compilation unit.
|
IPackageDeclaration |
getPackageDeclaration(java.lang.String pkg)
Returns the first package declaration in this compilation unit with the given package name
(there normally is at most one package declaration).
|
IType |
getType(java.lang.String typeName)
Returns the top-level type declared in this compilation unit with the given simple type name.
|
boolean |
hasChildren()
Returns whether this element has one or more immediate children.
|
applyTextEdit, becomeWorkingCopy, becomeWorkingCopy, buildStructure, canBeRemovedFromCache, canBufferBeRemovedFromCache, cloneCachingContents, close, closing, 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, getElementAt, getElementName, getElementType, getFileName, getHandleFromMemento, getHandleMementoDelimiter, getImport, getImports, getMainTypeName, 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, toStringInfo, updateTimeStamp, validateCompilationUnit, validateExistencebufferChanged, closeBuffer, codeComplete, codeSelect, exists, findRecommendedLineSeparator, generateInfos, getBuffer, getBufferFactory, getBufferManager, getOpenable, getPackageFragmentRoot, getResource, hasUnsavedChanges, isOpen, isStructureKnown, open, resource, resourceExistsappendEscapedDelimiter, 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, tabString, toDebugString, toString, toString, toStringAncestors, toStringChildren, toStringInfo, toStringName, toStringWithAncestors, toStringWithAncestors, unresolved, validateAndCacheclone, finalize, getClass, notify, notifyAll, wait, wait, waitexists, getAncestor, getAttachedJavadoc, getHandleIdentifier, getJavaModel, getJavaProject, getOpenable, getParent, getPrimaryElement, getResource, getSchedulingRule, isReadOnly, isStructureKnowngetChildrenfindRecommendedLineSeparator, getBuffer, hasUnsavedChanges, isOpen, openexistspublic AssistCompilationUnit(ICompilationUnit compilationUnit, WorkingCopyOwner owner, java.util.Map bindingCache, java.util.Map infoCache)
public java.lang.Object getElementInfo(IProgressMonitor monitor)
throws JavaModelException
JavaElementgetElementInfo in class JavaElementJavaModelException - if the element is not present or not accessiblepublic IImportContainer getImportContainer()
ICompilationUnitgetImportContainer in class CompilationUnitICompilationUnit.getImportContainer()public IPackageDeclaration getPackageDeclaration(java.lang.String pkg)
ICompilationUnitgetPackageDeclaration in class CompilationUnitpkg - the name of the package declaration as defined by JLS2 7.4. (For example, "java.lang")ICompilationUnit.getPackageDeclaration(String)public IType getType(java.lang.String typeName)
ICompilationUnitgetType in class CompilationUnittypeName - the simple name of the requested type in the compilation unitICompilationUnit.getType(String)public boolean hasChildren()
throws JavaModelException
IParentgetChildren is an empty array.hasChildren in interface IParenthasChildren in class JavaElementJavaModelException - if this element does not exist or if an
exception occurs while accessing its corresponding resourceIParent