Klasse ModulePathContainerInitializer

java.lang.Object
org.aspectj.org.eclipse.jdt.core.ClasspathContainerInitializer
org.aspectj.org.eclipse.jdt.internal.core.ModulePathContainerInitializer

public class ModulePathContainerInitializer extends ClasspathContainerInitializer
  • Konstruktordetails

    • ModulePathContainerInitializer

      public ModulePathContainerInitializer()
  • Methodendetails

    • initialize

      public void initialize(org.eclipse.core.runtime.IPath containerPath, IJavaProject project) throws org.eclipse.core.runtime.CoreException
      Beschreibung aus Klasse kopiert: ClasspathContainerInitializer
      Binds a classpath container to a IClasspathContainer for a given project, or silently fails if unable to do so.

      A container is identified by a container path, which must be formed of two segments. The first segment is used as a unique identifier (which this initializer did register onto), and the second segment can be used as an additional hint when performing the resolution.

      The initializer is invoked if a container path needs to be resolved for a given project, and no value for it was recorded so far. The implementation of the initializer would typically set the corresponding container using JavaCore#setClasspathContainer.

      A container initialization can be indirectly performed while attempting to resolve a project classpath using IJavaProject#getResolvedClasspath(; or directly when using JavaCore#getClasspathContainer. During the initialization process, any attempt to further obtain the same container will simply return null so as to avoid an infinite regression of initializations.

      A container initialization may also occur indirectly when setting a project classpath, as the operation needs to resolve the classpath for validation purpose. While the operation is in progress, a referenced container initializer may be invoked. If the initializer further tries to access the referring project classpath, it will not see the new assigned classpath until the operation has completed. Note that once the Java change notification occurs (at the end of the operation), the model has been updated, and the project classpath can be queried normally.

      This method is called by the Java model to give the party that defined this particular kind of classpath container the chance to install classpath container objects that will be used to convert classpath container entries into simpler classpath entries. The method is typically called exactly once for a given Java project and classpath container entry. This method must not be called by other clients.

      There are a wide variety of conditions under which this method may be invoked. To ensure that the implementation does not interfere with correct functioning of the Java model, the implementation should use only the following Java model APIs:

      The effects of using other Java model APIs are unspecified.
      Angegeben von:
      initialize in Klasse ClasspathContainerInitializer
      Parameter:
      containerPath - a two-segment path (ID/hint) identifying the container that needs to be resolved
      project - the Java project in which context the container is to be resolved. This allows generic containers to be bound with project specific values.
      Löst aus:
      org.eclipse.core.runtime.CoreException - if an exception occurs during the initialization
      Siehe auch: