org.aspectj.org.eclipse.jdt.internal.core.search.indexing
Class SourceIndexer

java.lang.Object
  extended by org.aspectj.org.eclipse.jdt.internal.core.search.indexing.AbstractIndexer
      extended by org.aspectj.org.eclipse.jdt.internal.core.search.indexing.SourceIndexer
All Implemented Interfaces:
ITypeRequestor, SuffixConstants, IIndexConstants

public class SourceIndexer
extends AbstractIndexer
implements ITypeRequestor, SuffixConstants

A SourceIndexer indexes java files using a java parser. The following items are indexed: Declarations of:
- Classes
- Interfaces;
- Methods;
- Fields;
- Lambda expressions;
References to:
- Methods (with number of arguments);
- Fields;
- Types;
- Constructors.


Field Summary
 ISourceElementRequestor requestor
           
 
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, 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
 
Fields inherited from interface org.aspectj.org.eclipse.jdt.internal.core.search.indexing.IIndexConstants
AND_PATTERN, ANNOT_REF_PATTERN, ANNOTATION_REF, ANNOTATION_TYPE_SUFFIX, CLASS_AND_ENUM_SUFFIX, CLASS_AND_INTERFACE_SUFFIX, CLASS_SUFFIX, CONSTRUCTOR_DECL, CONSTRUCTOR_PATTERN, CONSTRUCTOR_REF, COUNTS, DEFAULT_CONSTRUCTOR, ENUM_SUFFIX, FIELD_DECL, FIELD_PATTERN, INTERFACE_AND_ANNOTATION_SUFFIX, INTERFACE_SUFFIX, LOCAL_VAR_PATTERN, METHOD_DECL, METHOD_PATTERN, METHOD_REF, OBJECT, ONE_STAR, ONE_STAR_CHAR, ONE_ZERO, ONE_ZERO_CHAR, OR_PATTERN, PARAMETER_SEPARATOR, PKG_DECL_PATTERN, PKG_REF_PATTERN, REF, SECONDARY_SUFFIX, SEPARATOR, SUPER_REF, SUPER_REF_PATTERN, TYPE_DECL, TYPE_DECL_PATTERN, TYPE_PARAM_PATTERN, TYPE_REF_PATTERN, TYPE_SUFFIX, ZERO_CHAR
 
Constructor Summary
SourceIndexer(SearchDocument document)
           
 
Method Summary
 void accept(IBinaryType binaryType, PackageBinding packageBinding, AccessRestriction accessRestriction)
          Accept the resolved binary form for the requested type.
 void accept(ICompilationUnit unit, AccessRestriction accessRestriction)
          Accept the requested type's compilation unit.
 void accept(ISourceType[] sourceTypes, PackageBinding packageBinding, AccessRestriction accessRestriction)
          Accept the unresolved source forms for the requested type.
 void indexDocument()
           
 void indexResolvedDocument()
           
 void resolveDocument()
           
 
Methods inherited from class org.aspectj.org.eclipse.jdt.internal.core.search.indexing.AbstractIndexer
addAnnotationTypeDeclaration, addAnnotationTypeReference, addClassDeclaration, addConstructorDeclaration, addConstructorReference, addDefaultConstructorDeclaration, addEnumDeclaration, addFieldDeclaration, addFieldReference, addIndexEntry, addInterfaceDeclaration, addMethodDeclaration, addMethodReference, addNameReference, addTypeDeclaration, addTypeReference
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

requestor

public ISourceElementRequestor requestor
Constructor Detail

SourceIndexer

public SourceIndexer(SearchDocument document)
Method Detail

indexDocument

public void indexDocument()
Specified by:
indexDocument in class AbstractIndexer

accept

public void accept(IBinaryType binaryType,
                   PackageBinding packageBinding,
                   AccessRestriction accessRestriction)
Description copied from interface: ITypeRequestor
Accept the resolved binary form for the requested type.

Specified by:
accept in interface ITypeRequestor

accept

public void accept(ICompilationUnit unit,
                   AccessRestriction accessRestriction)
Description copied from interface: ITypeRequestor
Accept the requested type's compilation unit.

Specified by:
accept in interface ITypeRequestor

accept

public void accept(ISourceType[] sourceTypes,
                   PackageBinding packageBinding,
                   AccessRestriction accessRestriction)
Description copied from interface: ITypeRequestor
Accept the unresolved source forms for the requested type. Note that the multiple source forms can be answered, in case the target compilation unit contains multiple types. The first one is then guaranteed to be the one corresponding to the requested type.

Specified by:
accept in interface ITypeRequestor

resolveDocument

public void resolveDocument()

indexResolvedDocument

public void indexResolvedDocument()
Overrides:
indexResolvedDocument in class AbstractIndexer