Package org.eclipse.cdt.core.settings.model

## Class CLibraryFileEntry

- java.lang.Object
- - org.eclipse.cdt.core.settings.model.ACSettingEntry
  - - org.eclipse.cdt.core.settings.model.ACPathEntry
    - - org.eclipse.cdt.core.settings.model.CLibraryFileEntry

All Implemented Interfaces:
  `ICLanguageSettingEntry`, `ICLanguageSettingPathEntry`, `ICLibraryFileEntry`, `ICPathEntry`, `ICSettingEntry`

    public final class CLibraryFileEntry
    extends ACPathEntry
    implements ICLibraryFileEntry

Representation in the project model of library file settings entries. As an example, those are supplied by a gcc compiler with option "-l".

### Field Summary

### Fields inherited from interface org.eclipse.cdt.core.settings.model.ICSettingEntry

`ALL, BUILTIN, EXPORTED, FRAMEWORKS_MAC, INCLUDE_FILE, INCLUDE_PATH, LIBRARY_FILE, LIBRARY_PATH, LOCAL, MACRO, MACRO_FILE, NONE, OUTPUT_PATH, READONLY, RESOLVED, SOURCE_PATH, UNDEFINED, VALUE_WORKSPACE_PATH`

### Constructor Summary

Constructors
`CLibraryFileEntry​(String name, int flags)` This constructor is discouraged to be referenced by clients.
`CLibraryFileEntry​(String name, int flags, org.eclipse.core.runtime.IPath sourceAttachmentPath, org.eclipse.core.runtime.IPath sourceAttachmentRootPath, org.eclipse.core.runtime.IPath sourceAttachmentPrefixMapping)`
`CLibraryFileEntry​(org.eclipse.core.resources.IFile rc, int flags)` This constructor is discouraged to be used directly.
`CLibraryFileEntry​(org.eclipse.core.resources.IFile rc, int flags, org.eclipse.core.runtime.IPath sourceAttachmentPath, org.eclipse.core.runtime.IPath sourceAttachmentRootPath, org.eclipse.core.runtime.IPath sourceAttachmentPrefixMapping)`
`CLibraryFileEntry​(org.eclipse.core.runtime.IPath location, int flags)` This constructor is discouraged to be used directly.
`CLibraryFileEntry​(org.eclipse.core.runtime.IPath location, int flags, org.eclipse.core.runtime.IPath sourceAttachmentPath, org.eclipse.core.runtime.IPath sourceAttachmentRootPath, org.eclipse.core.runtime.IPath sourceAttachmentPrefixMapping)`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected String` `contentsToString()`
`boolean` `equals​(Object other)`
`boolean` `equalsByContents​(ICSettingEntry entry)`
`int` `getKind()`
`org.eclipse.core.runtime.IPath` `getSourceAttachmentPath()` Returns the path to the source archive or folder associated with this C path entry, or `null` if this C path entry has no source attachment.
`org.eclipse.core.runtime.IPath` `getSourceAttachmentPrefixMapping()` Returns the path to map the source paths with to the source achive or folder An empty path indicates that the is a one-to-one mapping of source paths to the source achive or folder path.
`org.eclipse.core.runtime.IPath` `getSourceAttachmentRootPath()` Returns the path within the source archive or folder where source are located.
`int` `hashCode()`
`boolean` `isFile()`

### Methods inherited from class org.eclipse.cdt.core.settings.model.ACPathEntry

`fullPathForLocation, getFullPath, getLocation, isValueWorkspacePath`

### Methods inherited from class org.eclipse.cdt.core.settings.model.ACSettingEntry

`checkFlags, codeForContentsKey, codeForNameKey, equalsByName, getByNameMatchFlags, getFlags, getName, getValue, isBuiltIn, isReadOnly, isResolved, toString`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface org.eclipse.cdt.core.settings.model.ICPathEntry

`getFullPath, getLocation, isValueWorkspacePath`

### Methods inherited from interface org.eclipse.cdt.core.settings.model.ICSettingEntry

`equalsByName, getFlags, getName, getValue, isBuiltIn, isReadOnly, isResolved`

### Constructor Detail

#### CLibraryFileEntry

    public CLibraryFileEntry​(String name,
                             int flags)

This constructor is discouraged to be referenced by clients. Instead, use pooled entries with CDataUtil.createCLibraryFileEntry(name, flags).

Parameters:
  `name` - - library file path. The path can be an absolute location on the local file-system or with flag `ICSettingEntry.VALUE_WORKSPACE_PATH` it is treated as workspace full path.
  `flags` - - bitwise combination of `ICSettingEntry` flags.

#### CLibraryFileEntry

    public CLibraryFileEntry​(org.eclipse.core.runtime.IPath location,
                             int flags)

This constructor is discouraged to be used directly. Instead, use pooled entries with CDataUtil.createCLibraryFileEntry(location.toString(), flags) or wrap it with CDataUtil.getPooledEntry(new CLibraryFileEntry(location, flags)).

Parameters:
  `location` - - library file path. The path can be an absolute location on the local file-system or with flag `ICSettingEntry.VALUE_WORKSPACE_PATH` it is treated as workspace full path.
  `flags` - - bitwise combination of `ICSettingEntry` flags.

#### CLibraryFileEntry

    public CLibraryFileEntry​(org.eclipse.core.resources.IFile rc,
                             int flags)

This constructor is discouraged to be used directly. Instead, use pooled entries wrapping with CDataUtil.getPooledEntry(new CLibraryFileEntry(rc, flags)).

Parameters:
  `rc` - - library file as a resource in the workspace.
  `flags` - - bitwise combination of `ICSettingEntry` flags. If `ICSettingEntry.VALUE_WORKSPACE_PATH` is missing it will be supplied.

#### CLibraryFileEntry

    public CLibraryFileEntry​(String name,
                             int flags,
                             org.eclipse.core.runtime.IPath sourceAttachmentPath,
                             org.eclipse.core.runtime.IPath sourceAttachmentRootPath,
                             org.eclipse.core.runtime.IPath sourceAttachmentPrefixMapping)

#### CLibraryFileEntry

    public CLibraryFileEntry​(org.eclipse.core.runtime.IPath location,
                             int flags,
                             org.eclipse.core.runtime.IPath sourceAttachmentPath,
                             org.eclipse.core.runtime.IPath sourceAttachmentRootPath,
                             org.eclipse.core.runtime.IPath sourceAttachmentPrefixMapping)

#### CLibraryFileEntry

    public CLibraryFileEntry​(org.eclipse.core.resources.IFile rc,
                             int flags,
                             org.eclipse.core.runtime.IPath sourceAttachmentPath,
                             org.eclipse.core.runtime.IPath sourceAttachmentRootPath,
                             org.eclipse.core.runtime.IPath sourceAttachmentPrefixMapping)

### Method Detail

#### getKind

    public final int getKind()

Specified by:
  `getKind` in interface `ICSettingEntry`

#### isFile

    public final boolean isFile()

Specified by:
  `isFile` in class `ACPathEntry`

#### getSourceAttachmentPath

    public org.eclipse.core.runtime.IPath getSourceAttachmentPath()

Description copied from interface: `ICLibraryFileEntry`
Returns the path to the source archive or folder associated with this C path entry, or `null` if this C path entry has no source attachment.

Only library and variable C path entries may have source attachments. For library C path entries, the result path (if present) locates a source archive or folder. This archive or folder can be located in a project of the workspace or outside thr workspace. For variable c path entries, the result path (if present) has an analogous form and meaning as the variable path, namely the first segment is the name of a c path variable.

Specified by:
  `getSourceAttachmentPath` in interface `ICLibraryFileEntry`
Returns:
  the path to the source archive or folder, or `null` if none

#### getSourceAttachmentPrefixMapping

    public org.eclipse.core.runtime.IPath getSourceAttachmentPrefixMapping()

Description copied from interface: `ICLibraryFileEntry`
Returns the path to map the source paths with to the source achive or folder An empty path indicates that the is a one-to-one mapping of source paths to the source achive or folder path. Returns a non-`null` value if and only if `getSourceAttachmentPath` returns a non-`null` value.

Specified by:
  `getSourceAttachmentPrefixMapping` in interface `ICLibraryFileEntry`
Returns:
  the path mapping within the source archive or folder, or `null` if not applicable

#### getSourceAttachmentRootPath

    public org.eclipse.core.runtime.IPath getSourceAttachmentRootPath()

Description copied from interface: `ICLibraryFileEntry`
Returns the path within the source archive or folder where source are located. An empty path indicates that packages are located at the root of the source archive or folder. Returns a non-`null` value if and only if `getSourceAttachmentPath` returns a non-`null` value.

Specified by:
  `getSourceAttachmentRootPath` in interface `ICLibraryFileEntry`
Returns:
  the path within the source archive or folder, or `null` if not applicable

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `ACSettingEntry`

#### equals

    public boolean equals​(Object other)

Overrides:
  `equals` in class `ACSettingEntry`

#### equalsByContents

    public boolean equalsByContents​(ICSettingEntry entry)

Specified by:
  `equalsByContents` in interface `ICSettingEntry`
Overrides:
  `equalsByContents` in class `ACSettingEntry`

#### contentsToString

    protected String contentsToString()

Overrides:
  `contentsToString` in class `ACPathEntry`