Package com.google.javascript.jscomp

# Class JSSourceFile

java.lang.Object
com.google.javascript.jscomp.SourceFile
com.google.javascript.jscomp.JSSourceFile

All Implemented Interfaces:
  `StaticSourceFile`, `Serializable`

@Deprecated public class JSSourceFile extends SourceFile implements Serializable
Deprecated.
JSSourceFile is an empty wrapper around SourceFile. Just use SourceFile directly.
An abstract representation of a JavaScript source file, as input to JSCompiler.

See Also:
  - Serialized Form

## Nested Class Summary

## Nested classes/interfaces inherited from class com.google.javascript.jscomp.SourceFile

`SourceFile.Builder, SourceFile.Generator`

## Method Summary

Modifier and Type
Method
Description
`void`
`clearCachedSource()`
Deprecated.
`static JSSourceFile`
`fromCode(String fileName, String code)`
Deprecated.
`static JSSourceFile`
`fromFile(File file)`
Deprecated.
`static JSSourceFile`
`fromFile(File file, Charset charSet)`
Deprecated.
`static JSSourceFile`
`fromFile(String fileName)`
Deprecated.
`static JSSourceFile`
`fromFile(String fileName, Charset charSet)`
Deprecated.
`static JSSourceFile`
`fromGenerator(String fileName, SourceFile.Generator generator)`
Deprecated.
`static JSSourceFile`
`fromInputStream(String fileName, InputStream s)`
Deprecated.
`String`
`getCode()`
Deprecated.
Gets all the code in this source file.

### Methods inherited from class com.google.javascript.jscomp.SourceFile

`builder, fromCode, fromInputStream, fromReader, getCodeReader, getColumnOfOffset, getLine, getLineOffset, getLineOfOffset, getName, getOriginalPath, getRegion, isExtern, setOriginalPath, toString`

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

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

## Method Details

### fromFile

public static JSSourceFile fromFile(String fileName, Charset charSet)
Deprecated.

### fromFile

public static JSSourceFile fromFile(String fileName)
Deprecated.

### fromFile

public static JSSourceFile fromFile(File file, Charset charSet)
Deprecated.

### fromFile

public static JSSourceFile fromFile(File file)
Deprecated.

### fromCode

public static JSSourceFile fromCode(String fileName, String code)
Deprecated.

### fromInputStream

public static JSSourceFile fromInputStream(String fileName, InputStream s) throws IOException
Deprecated.

Throws:
  `IOException`

### fromGenerator

public static JSSourceFile fromGenerator(String fileName, SourceFile.Generator generator)
Deprecated.

### getCode

public String getCode() throws IOException
Deprecated.
Description copied from class: `SourceFile`
Gets all the code in this source file.

Overrides:
  `getCode` in class `SourceFile`
Throws:
  `IOException`

### clearCachedSource

public void clearCachedSource()
Deprecated.

Overrides:
  `clearCachedSource` in class `SourceFile`