public class AssistSourceField extends ResolvedSourceField
nameoccurrenceCountJEM_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, parentANNOTATION, 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| Constructor and Description |
|---|
AssistSourceField(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.
|
java.lang.String |
getKey()
Returns the binding key for this field only if the given field is
resolved. |
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.
|
boolean |
isResolved()
Returns whether this field represents a resolved field.
|
protected void |
toStringInfo(int tab,
java.lang.StringBuffer buffer,
java.lang.Object info,
boolean showResolvedInfo)
Debugging purposes
|
unresolvedequals, findNode, getConstant, getElementType, getHandleMementoDelimiter, getPrimaryElement, getTypeSignature, isEnumConstant, resolvedgetElementName, getFullyQualifiedName, getFullyQualifiedParameterizedName, getKey, getKey, getKey, getKey, getOccurrenceCountSignature, getPackageFragment, getTypeParameters, getTypeQualifiedName, resolveType, resolveTypeareSimilarMethods, convertConstant, findMethods, getCategories, getClassFile, getDeclaringType, getFlags, getHandleFromMemento, getJavadocRange, getNameRange, getOuterMostLocalContext, getTypeRoot, isBinary, isMainMethod, isReadOnly, readableNameclosing, copy, createElementInfo, delete, generateInfos, getAnnotations, 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, waitgetElementNamegetCategories, getClassFile, getCompilationUnit, getDeclaringType, 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, hasChildrengetAnnotationspublic AssistSourceField(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 getKey()
IFieldresolved.
A binding key is a key that uniquely identifies this field. It allows access to generic info
for parameterized fields.
If the given field is not resolved, the returned key is simply the java element's key.
getKey in interface IFieldgetKey in class ResolvedSourceFieldIBinding.getKey(),
BindingKey,
IField.isResolved()public boolean isResolved()
IFieldisResolved in interface IFieldisResolved in class ResolvedSourceFieldprotected void toStringInfo(int tab,
java.lang.StringBuffer buffer,
java.lang.Object info,
boolean showResolvedInfo)
JavaElementtoStringInfo in class ResolvedSourceFieldshowResolvedInfo - TODOpublic IAnnotation getAnnotation(java.lang.String annotationName)
IAnnotatablegetAnnotation in interface IAnnotatablegetAnnotation in class SourceRefElementannotationName - the given simple namepublic IType getType(java.lang.String typeName, int count)
IMemberRuntimeException if this member is not a source member.