Class CancelableNameEnvironment

java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.SearchableEnvironment
org.aspectj.org.eclipse.jdt.internal.core.CancelableNameEnvironment
All Implemented Interfaces:
IJavaSearchConstants, IModuleAwareNameEnvironment, INameEnvironment, INameEnvironmentExtension, INameEnvironmentWithProgress

public class CancelableNameEnvironment extends SearchableEnvironment implements INameEnvironmentWithProgress
  • Constructor Details

  • Method Details

    • findPackages

      public void findPackages(char[] prefix, ISearchRequestor requestor)
      Description copied from class: SearchableEnvironment
      Find the packages that start with the given prefix. A valid prefix is a qualified name separated by periods (ex. java.util). The packages found are passed to: ISearchRequestor.acceptPackage(char[][] packageName)
      Overrides:
      findPackages in class SearchableEnvironment
    • findType

      public NameEnvironmentAnswer findType(char[] name, char[][] packageName)
      Description copied from interface: INameEnvironment
      Find a type named in 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 interface IModuleAwareNameEnvironment
      Specified by:
      findType in interface INameEnvironment
    • findType

      public NameEnvironmentAnswer findType(char[][] compoundTypeName)
      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 interface IModuleAwareNameEnvironment
      Specified by:
      findType in interface INameEnvironment
    • findType

      public NameEnvironmentAnswer findType(char[] typeName, char[][] packageName, boolean searchWithSecondaryTypes, char[] moduleName)
      Description copied from interface: INameEnvironmentExtension
      Find a type named in 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. The flag can be used to switch on/off the search for secondary types. This is useful because the search for secondary types may by very expensive regarding the performance and in many cases it isn't necessary to search for secondary types.
      Specified by:
      findType in interface INameEnvironmentExtension
      Parameters:
      typeName - type to find
      packageName - package of the searched type
      searchWithSecondaryTypes - flag to switch on/off the search for secondary types
      moduleName - the name of the module to search in, or one of ModuleBinding.ANY, ModuleBinding.UNNAMED
      Returns:
      NameEnvironmentAnswer
    • findTypes

      public void findTypes(char[] prefix, boolean findMembers, int matchRule, int searchFor, ISearchRequestor storage, org.eclipse.core.runtime.IProgressMonitor progressMonitor)
      Description copied from class: SearchableEnvironment
      Must be used only by CompletionEngine. The progress monitor is used to be able to cancel completion operations Find the top-level types that are defined in the current environment and whose name starts with the given prefix. The prefix is a qualified name separated by periods or a simple name (ex. java.util.V or V). The types found are passed to one of the following methods (if additional information is known about the types): ISearchRequestor.acceptType(char[][] packageName, char[] typeName) ISearchRequestor.acceptClass(char[][] packageName, char[] typeName, int modifiers) ISearchRequestor.acceptInterface(char[][] packageName, char[] typeName, int modifiers) This method can not be used to find member types... member types are found relative to their enclosing type.
      Overrides:
      findTypes in class SearchableEnvironment
    • setMonitor

      public void setMonitor(org.eclipse.core.runtime.IProgressMonitor monitor)
      Description copied from interface: INameEnvironmentWithProgress
      Set the monitor for the given name environment. In order to be able to cancel this name environment calls, a non-null monitor should be given.
      Specified by:
      setMonitor in interface INameEnvironmentWithProgress
      Parameters:
      monitor - the given monitor