public class FileContentImpl extends IndexedFileImpl implements PsiDependentFileContent
Modifier and Type | Class and Description |
---|---|
static class |
FileContentImpl.IllegalDataException |
myFile, myFileName, myFileType
Constructor and Description |
---|
FileContentImpl(VirtualFile file,
byte [] content) |
FileContentImpl(VirtualFile file,
java.lang.CharSequence contentAsText,
long documentStamp) |
Modifier and Type | Method and Description |
---|---|
static FileContent |
createByFile(VirtualFile file) |
static FileContent |
createByFile(VirtualFile file,
Project project) |
PsiFile |
createFileFromText(java.lang.CharSequence text) |
static PsiFile |
createFileFromText(Project project,
java.lang.CharSequence text,
LanguageFileType fileType,
VirtualFile file,
java.lang.String fileName) |
java.nio.charset.Charset |
getCharset() |
byte [] |
getContent() |
java.lang.CharSequence |
getContentAsText() |
VirtualFile |
getFile() |
java.lang.String |
getFileName() |
FileType |
getFileTypeWithoutSubstitution() |
byte [] |
getHash(boolean fromDocument) |
LighterAST |
getLighterAST() |
Project |
getProject() |
PsiFile |
getPsiFile() |
PsiFile |
getPsiFileForPsiDependentIndex()
Deprecated.
|
long |
getStamp() |
boolean |
isPhysicalContent() |
void |
setHashes(byte [] fileContentHash,
byte [] documentHash) |
java.lang.String |
toString() |
getFileType, setProject
changeUserMap, clearUserData, clone, copyCopyableDataTo, copyUserDataTo, getCopyableUserData, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putCopyableUserData, putUserData, putUserDataIfAbsent, replace, setUserMap
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getFileType
getUserData, putUserData
public FileContentImpl(VirtualFile file, java.lang.CharSequence contentAsText, long documentStamp)
public FileContentImpl(VirtualFile file, byte [] content)
public PsiFile getPsiFile()
getPsiFile
in interface FileContent
getPsiFile
in interface PsiDependentFileContent
public LighterAST getLighterAST()
getLighterAST
in interface PsiDependentFileContent
public PsiFile createFileFromText(java.lang.CharSequence text)
public static PsiFile createFileFromText(Project project, java.lang.CharSequence text, LanguageFileType fileType, VirtualFile file, java.lang.String fileName)
public static FileContent createByFile(VirtualFile file) throws java.io.IOException
java.io.IOException
public static FileContent createByFile(VirtualFile file, Project project) throws java.io.IOException
java.io.IOException
public FileType getFileTypeWithoutSubstitution()
public VirtualFile getFile()
getFile
in interface IndexedFile
getFile
in class IndexedFileImpl
public java.lang.String getFileName()
getFileName
in interface IndexedFile
getFileName
in class IndexedFileImpl
public java.nio.charset.Charset getCharset()
public long getStamp()
public boolean isPhysicalContent()
public byte [] getContent()
getContent
in interface FileContent
public java.lang.CharSequence getContentAsText()
getContentAsText
in interface FileContent
public java.lang.String toString()
toString
in class java.lang.Object
public byte [] getHash(boolean fromDocument)
public void setHashes(byte [] fileContentHash, byte [] documentHash)
@Deprecated public PsiFile getPsiFileForPsiDependentIndex()
FileContent.getPsiFile()
public Project getProject()
getProject
in interface IndexedFile
getProject
in class IndexedFileImpl