org.aspectj.org.eclipse.jdt.internal.codeassist.impl
Class AssistSourceType

java.lang.Object
  extended by PlatformObject
      extended by org.aspectj.org.eclipse.jdt.internal.core.JavaElement
          extended by org.aspectj.org.eclipse.jdt.internal.core.SourceRefElement
              extended by org.aspectj.org.eclipse.jdt.internal.core.Member
                  extended by org.aspectj.org.eclipse.jdt.internal.core.NamedMember
                      extended by org.aspectj.org.eclipse.jdt.internal.core.SourceType
                          extended by org.aspectj.org.eclipse.jdt.internal.core.ResolvedSourceType
                              extended by org.aspectj.org.eclipse.jdt.internal.codeassist.impl.AssistSourceType
All Implemented Interfaces:
IAnnotatable, IJavaElement, IMember, IParent, ISourceManipulation, ISourceReference, IType

public class AssistSourceType
extends ResolvedSourceType


Field Summary
 
Fields inherited from class org.aspectj.org.eclipse.jdt.internal.core.NamedMember
name
 
Fields inherited from class org.aspectj.org.eclipse.jdt.internal.core.SourceRefElement
occurrenceCount
 
Fields inherited from class org.aspectj.org.eclipse.jdt.internal.core.JavaElement
JEM_ANNOTATION, JEM_CLASSFILE, JEM_COMPILATIONUNIT, JEM_COUNT, JEM_ESCAPE, JEM_FIELD, JEM_IMPORTDECLARATION, JEM_INITIALIZER, JEM_JAVAPROJECT, JEM_LOCALVARIABLE, JEM_METHOD, JEM_PACKAGEDECLARATION, JEM_PACKAGEFRAGMENT, JEM_PACKAGEFRAGMENTROOT, JEM_TYPE, JEM_TYPE_PARAMETER, NO_ELEMENTS, NO_INFO, parent
 
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_PROJECT, LOCAL_VARIABLE, METHOD, PACKAGE_DECLARATION, PACKAGE_FRAGMENT, PACKAGE_FRAGMENT_ROOT, TYPE, TYPE_PARAMETER
 
Constructor Summary
AssistSourceType(JavaElement parent, java.lang.String name, java.util.Map bindingCache, java.util.Map infoCache)
           
 
Method Summary
 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
 
Methods inherited from class org.aspectj.org.eclipse.jdt.internal.core.ResolvedSourceType
unresolved
 
Methods inherited from class org.aspectj.org.eclipse.jdt.internal.core.SourceType
closing, codeComplete, codeComplete, codeComplete, codeComplete, codeComplete, createField, createInitializer, createMethod, createType, equals, findMethods, getAnnotations, getChildrenForCategory, getDeclaringType, getElementType, getFields, getFullyQualifiedName, getFullyQualifiedName, getHandleFromMemento, getInitializers, getMethods, getPackageFragment, getPrimaryElement, getSuperclassName, getSuperclassTypeSignature, getSuperInterfaceNames, getSuperInterfaceTypeSignatures, getTypeParameters, getTypeParameterSignatures, getTypeQualifiedName, getTypeQualifiedName, getTypes, isAnnotation, isAnonymous, isClass, isEnum, isInterface, isLocal, isMember, loadTypeHierachy, loadTypeHierachy, newSupertypeHierarchy, newSupertypeHierarchy, newSupertypeHierarchy, newSupertypeHierarchy, newTypeHierarchy, newTypeHierarchy, newTypeHierarchy, newTypeHierarchy, newTypeHierarchy, newTypeHierarchy, resolved
 
Methods inherited from class org.aspectj.org.eclipse.jdt.internal.core.NamedMember
getElementName, getFullyQualifiedName, getFullyQualifiedParameterizedName, getKey, getKey, getKey, getTypeQualifiedName, resolveType, resolveType
 
Methods inherited from class org.aspectj.org.eclipse.jdt.internal.core.Member
areSimilarMethods, convertConstant, findMethods, getCategories, getClassFile, getFlags, getHandleMementoDelimiter, getJavadocRange, getNameRange, getOuterMostLocalContext, getTypeRoot, isBinary, isMainMethod, isReadOnly, readableName
 
Methods inherited from class org.aspectj.org.eclipse.jdt.internal.core.SourceRefElement
copy, createElementInfo, delete, findNode, generateInfos, getCompilationUnit, getCorrespondingResource, getHandleMemento, getHandleUpdatingCountFromMemento, getOccurrenceCount, getOpenableParent, getPath, getSource, getSourceRange, getUnderlyingResource, hasChildren, isStructureKnown, move, rename, resource, toStringName
 
Methods inherited from class org.aspectj.org.eclipse.jdt.internal.core.JavaElement
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
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.aspectj.org.eclipse.jdt.core.IType
getElementName, resolveType, resolveType
 
Methods inherited from interface org.aspectj.org.eclipse.jdt.core.IMember
getCategories, getClassFile, getCompilationUnit, getFlags, getJavadocRange, getOccurrenceCount, getTypeRoot, isBinary
 
Methods inherited from interface org.aspectj.org.eclipse.jdt.core.IJavaElement
exists, getAncestor, getAttachedJavadoc, getCorrespondingResource, getHandleIdentifier, getJavaModel, getJavaProject, getOpenable, getParent, getPath, getPrimaryElement, getResource, getSchedulingRule, getUnderlyingResource, isReadOnly, isStructureKnown
 
Methods inherited from interface org.aspectj.org.eclipse.jdt.core.ISourceReference
exists, getNameRange, getSource, getSourceRange
 
Methods inherited from interface org.aspectj.org.eclipse.jdt.core.ISourceManipulation
copy, delete, move, rename
 
Methods inherited from interface org.aspectj.org.eclipse.jdt.core.IParent
getChildren, hasChildren
 

Constructor Detail

AssistSourceType

public AssistSourceType(JavaElement parent,
                        java.lang.String name,
                        java.util.Map bindingCache,
                        java.util.Map infoCache)
Method Detail

getElementInfo

public java.lang.Object getElementInfo(IProgressMonitor monitor)
                                throws JavaModelException
Description 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 class JavaElement
Throws:
JavaModelException - if the element is not present or not accessible

getFullyQualifiedParameterizedName

public java.lang.String getFullyQualifiedParameterizedName()
                                                    throws JavaModelException
Description copied from interface: IType
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. For example, "p.X<T>", "java.util.Map<java.lang.String, p.X>"

Specified by:
getFullyQualifiedParameterizedName in interface IType
Overrides:
getFullyQualifiedParameterizedName in class ResolvedSourceType
Returns:
the fully qualified parameterized representation of this type
Throws:
JavaModelException - if this element does not exist or if an exception occurs while accessing its corresponding resource.

getKey

public java.lang.String getKey()
Description copied from interface: IType
Returns the binding key for this type only if the given type is resolved. 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.

Specified by:
getKey in interface IType
Overrides:
getKey in class ResolvedSourceType
Returns:
the binding key for this type
See Also:
IBinding.getKey(), BindingKey, IType.isResolved()

isResolved

public boolean isResolved()
Description copied from interface: IType
Returns whether this type represents a resolved type. If a type is resolved, its key contains resolved information.

Specified by:
isResolved in interface IType
Overrides:
isResolved in class ResolvedSourceType
Returns:
whether this type represents a resolved type.

toStringInfo

protected void toStringInfo(int tab,
                            java.lang.StringBuffer buffer,
                            java.lang.Object info,
                            boolean showResolvedInfo)
Description copied from class: JavaElement
Debugging purposes

Overrides:
toStringInfo in class ResolvedSourceType
showResolvedInfo - TODO

getAnnotation

public IAnnotation getAnnotation(java.lang.String annotationName)
Description copied from interface: IAnnotatable
Returns the annotation with the given name declared on this element. This is a handle-only method. The annotation may or may not exist.

Specified by:
getAnnotation in interface IAnnotatable
Overrides:
getAnnotation in class SourceRefElement
Parameters:
annotationName - the given simple name
Returns:
the annotation with the given name declared on this element

getField

public IField getField(java.lang.String fieldName)
Description copied from interface: IType
Returns the field with the specified name in this type (for example, "bar"). This is a handle-only method. The field may or may not exist.

Specified by:
getField in interface IType
Overrides:
getField in class SourceType
Parameters:
fieldName - the given name
Returns:
the field with the specified name in this type
See Also:
IType.getField(java.lang.String)

getInitializer

public IInitializer getInitializer(int count)
Description copied from interface: IType
Returns the initializer with the specified position relative to the order they are defined in the source. Numbering starts at 1 (thus the first occurrence is occurrence 1, not occurrence 0). This is a handle-only method. The initializer may or may not be present.

Specified by:
getInitializer in interface IType
Overrides:
getInitializer in class SourceType
Parameters:
count - the specified position
Returns:
the initializer with the specified position relative to the order they are defined in the source
See Also:
IType

getMethod

public IMethod getMethod(java.lang.String selector,
                         java.lang.String[] parameterTypeSignatures)
Description copied from interface: IType
Returns the method with the specified name and parameter types in this type (for example, "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.

Specified by:
getMethod in interface IType
Overrides:
getMethod in class SourceType
Parameters:
selector - the given name
parameterTypeSignatures - the given parameter types
Returns:
the method with the specified name and parameter types in this type
See Also:
IType.getMethod(java.lang.String, java.lang.String[])

getType

public IType getType(java.lang.String typeName)
Description copied from interface: IType
Returns the member type declared in this type with the given simple name. This is a handle-only method. The type may or may not exist.

Specified by:
getType in interface IType
Overrides:
getType in class SourceType
Parameters:
typeName - the given simple name
Returns:
the member type declared in this type with the given simple name
See Also:
IType

getType

public IType getType(java.lang.String typeName,
                     int count)
Description copied from interface: IMember
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. The name is empty if it is an anonymous type. Numbering starts at 1 (thus the first occurrence is occurrence 1, not occurrence 0). This is a handle-only method. The type may or may not exist. Throws a RuntimeException if this member is not a source member.

Specified by:
getType in interface IMember
Overrides:
getType in class Member
Parameters:
typeName - the given simple name
count - the specified position
Returns:
the type with the given name and/or with the specified position relative to the order they are defined in the source
See Also:
IMember

getTypeParameter

public ITypeParameter getTypeParameter(java.lang.String typeParameterName)
Description copied from interface: IType
Returns the type parameter declared in this type with the given name. This is a handle-only method. The type parameter may or may not exist.

Specified by:
getTypeParameter in interface IType
Overrides:
getTypeParameter in class SourceType
Parameters:
typeParameterName - the given simple name
Returns:
the type parameter declared in this type with the given name