Package org.eclipse.cdt.core.index
Interface IIndexFile
-
- All Superinterfaces:
IFileNomination
public interface IIndexFile extends IFileNomination
Represents a file that has been indexed.- Since:
- 4.0
- Restriction:
- This interface is not intended to be implemented by clients.
- Restriction:
- This interface is not intended to be extended by clients.
-
-
Field Summary
Fields Modifier and Type Field Description static IIndexFile[]EMPTY_FILE_ARRAY
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description IIndexName[]findNames(int offset, int length)Find all names within the given range.longgetContentsHash()Hash of the file contents when the file was indexed.intgetEncodingHashcode()Deprecated.Returns 0.IIndexInclude[]getIncludes()Returns all includes found in this file.intgetLinkageID()Returns the id of the linkage this file was parsed in.IIndexFileLocationgetLocation()Returns an IIndexFileLocation representing the location of this fileIIndexMacro[]getMacros()Returns all macros defined in this file.IIndexIncludegetParsedInContext()Returns the include that was used to parse this file, may benull.java.lang.StringgetReplacementHeader()Returns the name of the replacement header obtained from@headername{header}or fromIWYU pragma: private, include "header".intgetScannerConfigurationHashcode()Deprecated.Returns 0.longgetSourceReadTime()Time when the file was read during indexing.longgetTimestamp()Last modification of file before it was indexed.ICPPUsingDirective[]getUsingDirectives()Returns all using directives for namespaces and global scope, found in this file.java.lang.StringtoDebugString()Returns detailed information about the file.-
Methods inherited from interface org.eclipse.cdt.core.dom.ast.IFileNomination
getSignificantMacros, hasPragmaOnceSemantics
-
-
-
-
Field Detail
-
EMPTY_FILE_ARRAY
static final IIndexFile[] EMPTY_FILE_ARRAY
-
-
Method Detail
-
getLocation
IIndexFileLocation getLocation() throws org.eclipse.core.runtime.CoreException
Returns an IIndexFileLocation representing the location of this file- Throws:
org.eclipse.core.runtime.CoreException
-
getIncludes
IIndexInclude[] getIncludes() throws org.eclipse.core.runtime.CoreException
Returns all includes found in this file.- Returns:
- an array of all includes found in this file
- Throws:
org.eclipse.core.runtime.CoreException
-
getMacros
IIndexMacro[] getMacros() throws org.eclipse.core.runtime.CoreException
Returns all macros defined in this file.- Returns:
- an array of macros found in this file
- Throws:
org.eclipse.core.runtime.CoreException
-
getUsingDirectives
ICPPUsingDirective[] getUsingDirectives() throws org.eclipse.core.runtime.CoreException
Returns all using directives for namespaces and global scope, found in this file.- Throws:
org.eclipse.core.runtime.CoreException- Since:
- 5.0
-
getTimestamp
long getTimestamp() throws org.eclipse.core.runtime.CoreExceptionLast modification of file before it was indexed.- Returns:
- the last modification date of the file at the time it was parsed.
- Throws:
org.eclipse.core.runtime.CoreException
-
getSourceReadTime
long getSourceReadTime() throws org.eclipse.core.runtime.CoreExceptionTime when the file was read during indexing. Corresponds to the start of reading.- Returns:
- time of indexing in milliseconds since epoch
- Throws:
org.eclipse.core.runtime.CoreException- Since:
- 5.4
-
getContentsHash
long getContentsHash() throws org.eclipse.core.runtime.CoreExceptionHash of the file contents when the file was indexed.- Returns:
- 64-bit hash of the file content.
- Throws:
org.eclipse.core.runtime.CoreException- Since:
- 5.2
-
getScannerConfigurationHashcode
@Deprecated int getScannerConfigurationHashcode() throws org.eclipse.core.runtime.CoreExceptionDeprecated.Returns 0.- Throws:
org.eclipse.core.runtime.CoreException- Restriction:
- This method is not intended to be referenced by clients.
-
getEncodingHashcode
@Deprecated int getEncodingHashcode() throws org.eclipse.core.runtime.CoreExceptionDeprecated.Returns 0.- Throws:
org.eclipse.core.runtime.CoreException- Since:
- 5.3
- Restriction:
- This method is not intended to be referenced by clients.
-
findNames
IIndexName[] findNames(int offset, int length) throws org.eclipse.core.runtime.CoreException
Find all names within the given range.- Throws:
org.eclipse.core.runtime.CoreException
-
getParsedInContext
IIndexInclude getParsedInContext() throws org.eclipse.core.runtime.CoreException
Returns the include that was used to parse this file, may benull.- Throws:
org.eclipse.core.runtime.CoreException
-
getLinkageID
int getLinkageID() throws org.eclipse.core.runtime.CoreExceptionReturns the id of the linkage this file was parsed in.- Throws:
org.eclipse.core.runtime.CoreException- Since:
- 5.0
-
getReplacementHeader
java.lang.String getReplacementHeader() throws org.eclipse.core.runtime.CoreExceptionReturns the name of the replacement header obtained from@headername{header}or fromIWYU pragma: private, include "header". Returns an empty string if the file containedIWYU pragma: privatewithout a replacement header. Returnsnullif the file does not contain@headername{header}orIWYU pragma: private.- Throws:
org.eclipse.core.runtime.CoreException- Since:
- 5.7
-
toDebugString
java.lang.String toDebugString()
Returns detailed information about the file. For debugging only.- Since:
- 5.4
-
-