public class AssistSourceType extends ResolvedSourceType
localOccurrenceCountnameoccurrenceCountJEM_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, parentANNOTATION, 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_PARAMETER| Constructor and Description |
|---|
AssistSourceType(JavaElement parent,
java.lang.String name,
java.util.Map bindingCache,
java.util.Map infoCache) |
| Modifier and Type | Method and Description |
|---|---|
IAnnotation |
getAnnotation(java.lang.String annotationName)
Returns the annotation with the given name declared on this element.
|
java.lang.Object |
getElementInfo(IProgressMonitor monitor)
Returns the info for this handle.
|
IField |
getField(java.lang.String fieldName)
Returns the field with the specified name
in this type (for example,
"bar"). |
java.lang.String |
getFullyQualifiedParameterizedName()
Returns this type's fully qualified name using a '.' enclosing type separator
followed by its type parameters between angle brackets if it is a generic type.
|
IInitializer |
getInitializer(int count)
Returns the initializer with the specified position relative to
the order they are defined in the source.
|
java.lang.String |
getKey()
Returns the binding key for this type only if the given type is
resolved. |
IMethod |
getMethod(java.lang.String selector,
java.lang.String[] parameterTypeSignatures)
Returns the method with the specified name and parameter types
in this type (for example,
"foo", {"I", "QString;"}). |
IType |
getType(java.lang.String typeName)
Returns the member type declared in this type with the given simple name.
|
IType |
getType(java.lang.String typeName,
int count)
Returns the local or anonymous type declared in this source member with the given simple name and/or
with the specified position relative to the order they are defined in the source.
|
ITypeParameter |
getTypeParameter(java.lang.String typeParameterName)
Returns the type parameter declared in this type with the given name.
|
boolean |
isResolved()
Returns whether this type represents a resolved type.
|
protected void |
toStringInfo(int tab,
java.lang.StringBuffer buffer,
java.lang.Object info,
boolean showResolvedInfo)
Debugging purposes
|
unresolvedclosing, codeComplete, codeComplete, codeComplete, codeComplete, codeComplete, createField, createInitializer, createMethod, createType, equals, findMethods, getAnnotations, getChildrenForCategory, getDeclaringType, getElementType, getFields, getFullyQualifiedName, getFullyQualifiedName, getHandleFromMemento, getInitializers, getMethods, getOccurrenceCountSignature, getPackageFragment, getPrimaryElement, getSuperclassName, getSuperclassTypeSignature, getSuperInterfaceNames, getSuperInterfaceTypeSignatures, getTypeParameters, getTypeParameterSignatures, getTypeQualifiedName, getTypeQualifiedName, getTypes, isAnnotation, isAnonymous, isClass, isEnum, isInterface, isLambda, isLocal, isMember, loadTypeHierachy, loadTypeHierachy, newSupertypeHierarchy, newSupertypeHierarchy, newSupertypeHierarchy, newSupertypeHierarchy, newTypeHierarchy, newTypeHierarchy, newTypeHierarchy, newTypeHierarchy, newTypeHierarchy, newTypeHierarchy, resolvedgetElementName, getFullyQualifiedName, getFullyQualifiedParameterizedName, getKey, getKey, getKey, getTypeQualifiedName, resolveType, resolveTypeareSimilarMethods, convertConstant, findMethods, getCategories, getClassFile, getFlags, getHandleMementoDelimiter, getJavadocRange, getNameRange, getOuterMostLocalContext, getTypeRoot, isBinary, isMainMethod, isReadOnly, readableNamecopy, createElementInfo, delete, findNode, generateInfos, getCompilationUnit, getCorrespondingResource, getHandleMemento, getHandleUpdatingCountFromMemento, getOccurrenceCount, getOpenableParent, getPath, getSource, getSourceRange, getUnderlyingResource, hasChildren, isStructureKnown, move, rename, resource, toStringNameappendEscapedDelimiter, close, escapeMementoName, exists, getAncestor, getAttachedJavadoc, getChildren, getChildrenOfType, getElementInfo, getHandleFromMemento, getHandleIdentifier, getHandleMemento, getJavadocBaseLocation, getJavaModel, getJavaProject, getLibraryJavadocLocation, getOpenable, getParent, getPrimaryElement, getResource, getSchedulingRule, getSourceElementAt, getSourceMapper, getURLContents, hashCode, isAncestorOf, newDoesNotExistStatus, newJavaModelException, newNotPresentException, openWhenClosed, tabString, toDebugString, toString, toString, toStringAncestors, toStringChildren, toStringInfo, toStringWithAncestors, toStringWithAncestors, validateAndCacheclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetElementName, resolveType, resolveTypegetCategories, getClassFile, getCompilationUnit, getFlags, getJavadocRange, getOccurrenceCount, getTypeRoot, isBinaryexists, getAncestor, getAttachedJavadoc, getCorrespondingResource, getHandleIdentifier, getJavaModel, getJavaProject, getOpenable, getParent, getPath, getPrimaryElement, getResource, getSchedulingRule, getUnderlyingResource, isReadOnly, isStructureKnownexists, getNameRange, getSource, getSourceRangecopy, delete, move, renamegetChildren, hasChildrenpublic AssistSourceType(JavaElement parent, java.lang.String name, 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 java.lang.String getFullyQualifiedParameterizedName()
throws JavaModelException
ITypegetFullyQualifiedParameterizedName in interface ITypegetFullyQualifiedParameterizedName in class ResolvedSourceTypeJavaModelException - if this element does not exist or if an
exception occurs while accessing its corresponding resource.public java.lang.String getKey()
ITyperesolved.
A binding key is a key that uniquely identifies this type. It allows access
to generic info for parameterized types.
If the given type is not resolved, the returned key is simply the java element's key.
getKey in interface ITypegetKey in class ResolvedSourceTypeIBinding.getKey(),
BindingKey,
IType.isResolved()public boolean isResolved()
ITypeisResolved in interface ITypeisResolved in class ResolvedSourceTypeprotected void toStringInfo(int tab,
java.lang.StringBuffer buffer,
java.lang.Object info,
boolean showResolvedInfo)
JavaElementtoStringInfo in class ResolvedSourceTypeshowResolvedInfo - TODOpublic IAnnotation getAnnotation(java.lang.String annotationName)
IAnnotatablegetAnnotation in interface IAnnotatablegetAnnotation in class SourceRefElementannotationName - the given simple namepublic IField getField(java.lang.String fieldName)
IType"bar").
This is a handle-only method. The field may or may not exist.getField in interface ITypegetField in class SourceTypefieldName - the given nameIType.getField(java.lang.String)public IInitializer getInitializer(int count)
ITypegetInitializer in interface ITypegetInitializer in class SourceTypecount - the specified positionITypepublic IMethod getMethod(java.lang.String selector, java.lang.String[] parameterTypeSignatures)
IType"foo", {"I", "QString;"}).
To get the handle for a constructor, the name specified must be the
simple name of the enclosing type.
This is a handle-only method. The method may or may not be present.
The type signatures may be either unresolved (for source types)
or resolved (for binary types), and either basic (for basic types)
or rich (for parameterized types). See Signature for details.
getMethod in interface ITypegetMethod in class SourceTypeselector - the given nameparameterTypeSignatures - the given parameter typesIType.getMethod(java.lang.String, java.lang.String[])public IType getType(java.lang.String typeName)
ITypegetType in interface ITypegetType in class SourceTypetypeName - the given simple nameITypepublic IType getType(java.lang.String typeName, int count)
IMemberRuntimeException if this member is not a source member.public ITypeParameter getTypeParameter(java.lang.String typeParameterName)
ITypegetTypeParameter in interface ITypegetTypeParameter in class SourceTypetypeParameterName - the given simple name