Package org.eclipse.cdt.core.index
Class URIRelativeLocationConverter
- java.lang.Object
-
- org.eclipse.cdt.core.index.URIRelativeLocationConverter
-
- All Implemented Interfaces:
IIndexLocationConverter
public class URIRelativeLocationConverter extends java.lang.Object implements IIndexLocationConverter
A IIndexLocationConverter for converting relative paths within an index, by prefixing them with the supplied base URI.Note: The supplied base URI must end with a forward slash
This location converter is internal-representation-compatible with ResourceContainerRelativeLocationConverter- Since:
- 4.0
-
-
Constructor Summary
Constructors Constructor Description URIRelativeLocationConverter(java.net.URI baseURI)Constructs an URIRelativeLocationConverter which will relative paths by prefixing the supplied base URI.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IIndexFileLocationfromInternalFormat(java.lang.String raw)Convert a raw string in an internal IIndexFragment implementation specific format to an IIndexFileLocation or null if the internal format could not be translated.java.lang.StringtoInternalFormat(IIndexFileLocation location)Convert a IIndexFileLocation to the internal IIndexFragment implementation specific format or null if the location could not be translated.
-
-
-
Constructor Detail
-
URIRelativeLocationConverter
public URIRelativeLocationConverter(java.net.URI baseURI)
Constructs an URIRelativeLocationConverter which will relative paths by prefixing the supplied base URI.- Parameters:
baseURI- the URI which will form the absolute base that relative paths are concatenated to. Note: It must end with a forward slash.
-
-
Method Detail
-
fromInternalFormat
public IIndexFileLocation fromInternalFormat(java.lang.String raw)
Description copied from interface:IIndexLocationConverterConvert a raw string in an internal IIndexFragment implementation specific format to an IIndexFileLocation or null if the internal format could not be translated.- Specified by:
fromInternalFormatin interfaceIIndexLocationConverter
-
toInternalFormat
public java.lang.String toInternalFormat(IIndexFileLocation location)
Description copied from interface:IIndexLocationConverterConvert a IIndexFileLocation to the internal IIndexFragment implementation specific format or null if the location could not be translated.- Specified by:
toInternalFormatin interfaceIIndexLocationConverter- Returns:
- an internal representation for the location specified
-
-