Class VirtualFile

    • Constructor Detail

      • VirtualFile

        public VirtualFile​(String content)
      • VirtualFile

        public VirtualFile​(String contents,
                           String name)
    • Method Detail

      • getContentChars

        public char[] getContentChars​(Environment env)
        Description copied from interface: SpoonFile
        Gets the file content as a char array, considering encoding or encoding provider.
        Specified by:
        getContentChars in interface SpoonFile
      • isJava

        public boolean isJava()
        Description copied from interface: SpoonFile
        True if a Java source code file.
        Specified by:
        isJava in interface SpoonFile
      • isFile

        public boolean isFile()
        Description copied from interface: SpoonResource
        Tells if this resource is a file.
        Specified by:
        isFile in interface SpoonResource
      • isArchive

        public boolean isArchive()
        Description copied from interface: SpoonResource
        Tells if this resource is an archive.
        Specified by:
        isArchive in interface SpoonResource
      • toFile

        public File toFile()
        Description copied from interface: SpoonResource
        Gets the corresponding file if possible (returns null if this resource does not correspond to any file on the filesystem).
        Specified by:
        toFile in interface SpoonResource
      • isActualFile

        public boolean isActualFile()
        Description copied from interface: SpoonFile
        Tells if this file is an actual file (not a virtual file that holds in-memory contents).
        Specified by:
        isActualFile in interface SpoonFile
        Returns: