Class TypedAstDeserializer.DeserializedAst
- java.lang.Object
-
- com.google.javascript.jscomp.serialization.TypedAstDeserializer.DeserializedAst
-
- Enclosing class:
- TypedAstDeserializer
public abstract static class TypedAstDeserializer.DeserializedAst extends java.lang.ObjectThe result of deserializing a TypedAst.List
-
-
Constructor Summary
Constructors Constructor Description DeserializedAst()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract com.google.common.collect.ImmutableMap<java.lang.String,SourceFile>getAllFiles()Maps from file name to the canonical SourceFile for all source files referenced on the TypedASTabstract ColorRegistrygetColorRegistry()The built ColorRegistry.abstract com.google.common.collect.ImmutableSet<java.lang.String>getExternProperties()Returns a list of all known extern properties, including properties that were present in type annotations in source code but not serialized on the ASTabstract com.google.common.collect.ImmutableMap<SourceFile,java.util.function.Supplier<Node>>getFilesystem()Maps from SourceFile to a lazy deserializer of the SCRIPT node for that file
-
-
-
Method Detail
-
getAllFiles
public abstract com.google.common.collect.ImmutableMap<java.lang.String,SourceFile> getAllFiles()
Maps from file name to the canonical SourceFile for all source files referenced on the TypedASTThis will be a superset of
getFilesystem(), but some synthetic files referenced here might not exist in the file system.If any files were passed to
TypedAstDeserializer.deserializeFullAst(com.google.javascript.jscomp.AbstractCompiler, com.google.javascript.jscomp.SourceFile, com.google.common.collect.ImmutableList<com.google.javascript.jscomp.SourceFile>, java.io.InputStream), then those files will also appear in this set.
-
getFilesystem
public abstract com.google.common.collect.ImmutableMap<SourceFile,java.util.function.Supplier<Node>> getFilesystem()
Maps from SourceFile to a lazy deserializer of the SCRIPT node for that fileThe supplier creates a new Node whenever called (but the results should be .equals)
-
getColorRegistry
@Nullable public abstract ColorRegistry getColorRegistry()
The built ColorRegistry.Note that this is null if
TypedAstDeserializer.deserializeRuntimeLibraries(AbstractCompiler, SourceFile, ColorPool.Builder, InputStream)was called, as this sort of deserialization does not build a complete AST + colors, just a shard of it.
-
getExternProperties
@Nullable public abstract com.google.common.collect.ImmutableSet<java.lang.String> getExternProperties()
Returns a list of all known extern properties, including properties that were present in type annotations in source code but not serialized on the AST
-
-