Class IndexBasedJavaSearchEnvironment
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.search.matching.IndexBasedJavaSearchEnvironment
- All Implemented Interfaces:
INameEnvironment
,SuffixConstants
public class IndexBasedJavaSearchEnvironment
extends Object
implements INameEnvironment, SuffixConstants
-
Field Summary
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, EXTENSION_jmod, EXTENSION_JMOD, 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 Summary
ConstructorDescriptionIndexBasedJavaSearchEnvironment(List<IJavaProject> javaProject, ICompilationUnit[] copies)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cleanup()
This method cleans the environment.static INameEnvironment
create(List<IJavaProject> javaProjects, ICompilationUnit[] copies)
findType(char[][] compoundTypeName)
Find a type with the given compound name.findType(char[] typeName, char[][] packageName)
Find a type namedin the package . boolean
isBetter(NameEnvironmentAnswer currentBest, int currentBestClasspathPosition, NameEnvironmentAnswer toTest, int toTestClasspathPosition)
static boolean
boolean
isPackage(char[][] parentPackageName, char[] packageName)
Answer whether packageName is the name of a known subpackage inside the package parentPackageName.void
-
Constructor Details
-
IndexBasedJavaSearchEnvironment
-
-
Method Details
-
isEnabled
public static boolean isEnabled() -
findType
Description copied from interface:INameEnvironment
Find a type with the given compound name. Answer the binary form of the type if it is known to be consistent. Otherwise, answer the compilation unit which defines the type or null if the type does not exist. Types in the default package are specified as {{typeName}}. It is unknown whether the package containing the type actually exists. NOTE: This method can be used to find a member type using its internal name A$B, but the source file for A is answered if the binary file is inconsistent.- Specified by:
findType
in interfaceINameEnvironment
-
isBetter
public boolean isBetter(NameEnvironmentAnswer currentBest, int currentBestClasspathPosition, NameEnvironmentAnswer toTest, int toTestClasspathPosition) -
findType
Description copied from interface:INameEnvironment
Find a type namedin the package . Answer the binary form of the type if it is known to be consistent. Otherwise, answer the compilation unit which defines the type or null if the type does not exist. The default package is indicated by char[0][]. It is known that the package containing the type exists. NOTE: This method can be used to find a member type using its internal name A$B, but the source file for A is answered if the binary file is inconsistent. - Specified by:
findType
in interfaceINameEnvironment
-
isPackage
public boolean isPackage(char[][] parentPackageName, char[] packageName)Description copied from interface:INameEnvironment
Answer whether packageName is the name of a known subpackage inside the package parentPackageName. A top level package is found relative to null. The default package is always assumed to exist. For example: isPackage({{java}, {awt}}, {event}); isPackage(null, {java});- Specified by:
isPackage
in interfaceINameEnvironment
-
cleanup
public void cleanup()Description copied from interface:INameEnvironment
This method cleans the environment. It is responsible for releasing the memory and freeing resources. Passed that point, the name environment is no longer usable. A name environment can have a long life cycle, therefore it is the responsibility of the code which created it to decide when it is a good time to clean it up.- Specified by:
cleanup
in interfaceINameEnvironment
-
printTimeSpent
public void printTimeSpent() -
create
-