Eclipse JDT
2.1

org.eclipse.jdt.launching
Interface IRuntimeClasspathEntry


public interface IRuntimeClasspathEntry

Represents an entry on a runtime classpath. A runtime classpath entry may refer to one of the following:

Clients are not intended to implement this interface.

Since:
2.0

Field Summary
static int ARCHIVE
          Type identifier for archive entries.
static int BOOTSTRAP_CLASSES
          Classpath property identifier for entries that should appear on the bootstrap path explicitly.
static int CONTAINER
          Type identifier for container entries.
static int PROJECT
          Type identifier for project entries.
static int STANDARD_CLASSES
          Classpath property identifier for entries that appear on the bootstrap path by default.
static int USER_CLASSES
          Classpath property identifier for entries that should appear on the user classpath.
static int VARIABLE
          Type identifier for variable entries.
 
Method Summary
 IClasspathEntry getClasspathEntry()
          Returns a classpath entry equivalent to this runtime classpath entry.
 int getClasspathProperty()
          Returns a constant indicating where this entry should appear on the runtime classpath by default.
 String getLocation()
          Returns an absolute path in the local file system for this entry, or null if none, or if this entry is of type CONTAINER.
 String getMemento()
          Returns a memento for this classpath entry.
 IPath getPath()
          Returns the path associated with this entry.
 IResource getResource()
          Returns the resource associated with this entry, or null if none.
 String getSourceAttachmentLocation()
          Returns an absolute path in the local file system for the source attachment associated with this entry entry, or null if none.
 IPath getSourceAttachmentPath()
          Returns the path to the source archive associated with this entry, or null if this classpath entry has no source attachment.
 String getSourceAttachmentRootLocation()
          Returns a path relative to this entry's source attachment path for the root location containing source, or null if none.
 IPath getSourceAttachmentRootPath()
          Returns the path within the source archive where package fragments are located.
 int getType()
          Returns this classpath entry's type.
 String getVariableName()
          Returns the first segment of the path associated with this entry, or null if this entry is not of type VARIABLE or CONTAINER.
 void setClasspathProperty(int location)
          Sets whether this entry should appear on the bootstrap classpath, the user classpath, or whether this entry is a standard bootstrap entry that does not need to appear on the classpath.
 void setSourceAttachmentPath(IPath path)
          Sets the path to the source archive associated with this entry, or null if this classpath entry has no source attachment.
 void setSourceAttachmentRootPath(IPath path)
          Sets the path within the source archive where package fragments are located.
 

Field Detail

PROJECT

public static final int PROJECT
Type identifier for project entries.

ARCHIVE

public static final int ARCHIVE
Type identifier for archive entries.

VARIABLE

public static final int VARIABLE
Type identifier for variable entries.

CONTAINER

public static final int CONTAINER
Type identifier for container entries.

STANDARD_CLASSES

public static final int STANDARD_CLASSES
Classpath property identifier for entries that appear on the bootstrap path by default.

BOOTSTRAP_CLASSES

public static final int BOOTSTRAP_CLASSES
Classpath property identifier for entries that should appear on the bootstrap path explicitly.

USER_CLASSES

public static final int USER_CLASSES
Classpath property identifier for entries that should appear on the user classpath.
Method Detail

getType

public int getType()
Returns this classpath entry's type. The type of a runtime classpath entry is identified by one of the following constants:
Returns:
this classpath entry's type

getMemento

public String getMemento()
                  throws CoreException
Returns a memento for this classpath entry.
Returns:
a memento for this classpath entry
Throws:
CoreException - if an exception occurrs generating a memento

getPath

public IPath getPath()
Returns the path associated with this entry. The format of the path returned depends on this entry's type:
Returns:
the path associated with this entry
See Also:
IClasspathEntry.getPath()

getResource

public IResource getResource()
Returns the resource associated with this entry, or null if none. A project, archive, or folder entry may be associated with a resource.
Returns:
the resource associated with this entry, or null

getSourceAttachmentPath

public IPath getSourceAttachmentPath()
Returns the path to the source archive associated with this entry, or null if this classpath entry has no source attachment.

Only archive and variable entries may have source attachments. For archive entries, the path (if present) locates a source archive. For variable entries, the path (if present) has an analogous form and meaning as the variable path, namely the first segment is the name of a classpath variable.

Returns:
the path to the source archive, or null if none

setSourceAttachmentPath

public void setSourceAttachmentPath(IPath path)
Sets the path to the source archive associated with this entry, or null if this classpath entry has no source attachment.

Only archive and variable entries may have source attachments. For archive entries, the path refers to a source archive. For variable entries, the path has an analogous form and meaning as the variable path, namely the first segment is the name of a classpath variable.

Parameters:
path - the path to the source archive, or null if none

getSourceAttachmentRootPath

public IPath getSourceAttachmentRootPath()
Returns the path within the source archive where package fragments are located. An empty path indicates that packages are located at the root of the source archive. Returns a non-null value if and only if getSourceAttachmentPath returns a non-null value.
Returns:
root path within the source archive, or null if not applicable

setSourceAttachmentRootPath

public void setSourceAttachmentRootPath(IPath path)
Sets the path within the source archive where package fragments are located. An empty path indicates that packages are located at the root of the source archive. Only valid if a source attachment path is also specified.
Parameters:
path - root path within the source archive, or null

getClasspathProperty

public int getClasspathProperty()
Returns a constant indicating where this entry should appear on the runtime classpath by default. The value returned is one of the following:
Returns:
where this entry should appear on the runtime classpath

setClasspathProperty

public void setClasspathProperty(int location)
Sets whether this entry should appear on the bootstrap classpath, the user classpath, or whether this entry is a standard bootstrap entry that does not need to appear on the classpath. The location is one of:
Parameters:
location - a classpat property constant

getLocation

public String getLocation()
Returns an absolute path in the local file system for this entry, or null if none, or if this entry is of type CONTAINER.
Returns:
an absolute path in the local file system for this entry, or null if none

getSourceAttachmentLocation

public String getSourceAttachmentLocation()
Returns an absolute path in the local file system for the source attachment associated with this entry entry, or null if none.
Returns:
an absolute path in the local file system for the source attachment associated with this entry entry, or null if none

getSourceAttachmentRootLocation

public String getSourceAttachmentRootLocation()
Returns a path relative to this entry's source attachment path for the root location containing source, or null if none.
Returns:
a path relative to this entry's source attachment path for the root location containing source, or null if none

getVariableName

public String getVariableName()
Returns the first segment of the path associated with this entry, or null if this entry is not of type VARIABLE or CONTAINER.
Returns:
the first segment of the path associated with this entry, or null if this entry is not of type VARIABLE or CONTAINER

getClasspathEntry

public IClasspathEntry getClasspathEntry()
Returns a classpath entry equivalent to this runtime classpath entry.
Returns:
a classpath entry equivalent to this runtime classpath entry
Since:
2.1

Eclipse JDT
2.1

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.