| Modifier and Type | Field and Description |
|---|---|
| private Map | |
| public static final String | |
| private static AstCache | |
| private static final Logger |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public boolean | Returns: true if all cached AST files were removedRemoves all serialized ASTs from the on-disk cache. |
| pack-priv NModule | |
| private NModule | |
| private void | |
| private void | |
| private NModule | |
| public static AstCache | |
| public NModule | |
| public NModule | |
| public String | getCachePath(File sourcePath)
Each source file's AST is saved in an object file named for the MD5 checksum of the source file. |
| public String | |
| pack-priv NModule | |
| private void | |
| private mod | |
| private mod | |
| private mod | |
| private void | |
| private NModule | |
| private NModule | |
| private void | |
| pack-priv void | |
| private void | |
| private void |
| cache | back to summary |
|---|---|
| private Map<String, NModule> cache | |
| CACHE_DIR | back to summary |
|---|---|
| public static final String CACHE_DIR | |
| INSTANCE | back to summary |
|---|---|
| private static AstCache INSTANCE | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| AstCache | back to summary |
|---|---|
| private AstCache() throws Exception | |
| clear | back to summary |
|---|---|
| public void clear() Clears the memory cache. | |
| clearDiskCache | back to summary |
|---|---|
| public boolean clearDiskCache() Removes all serialized ASTs from the on-disk cache.
| |
| deserialize | back to summary |
|---|---|
| pack-priv NModule deserialize(File sourcePath) throws Exception | |
| fetch | back to summary |
|---|---|
| private NModule fetch(String path) throws Exception Get or create an AST for
| |
| fine | back to summary |
|---|---|
| private void fine(String msg) | |
| finer | back to summary |
|---|---|
| private void finer(String msg) | |
| generateAST | back to summary |
|---|---|
| private NModule generateAST(mod ast, String path) throws Exception | |
| get | back to summary |
|---|---|
| public static AstCache get() throws Exception | |
| getAST | back to summary |
|---|---|
| public NModule getAST(String path) throws Exception Returns the syntax tree for | |
| getAST | back to summary |
|---|---|
| public NModule getAST(String path, String contents) throws Exception Returns the syntax tree for | |
| getCachePath | back to summary |
|---|---|
| public String getCachePath(File sourcePath) throws Exception Each source file's AST is saved in an object file named for the MD5 checksum of the source file. All that is needed is the MD5, but the file's base name is included for ease of debugging. | |
| getCachePath | back to summary |
|---|---|
| public String getCachePath(String md5, String name) | |
| getSerializedModule | back to summary |
|---|---|
| pack-priv NModule getSerializedModule(String sourcePath) | |
| info | back to summary |
|---|---|
| private void info(String msg) | |
| invokeANTLR | back to summary |
|---|---|
| private mod invokeANTLR(String filename) | |
| invokeANTLR | back to summary |
|---|---|
| private mod invokeANTLR(String filename, String contents) | |
| invokeANTLR | back to summary |
|---|---|
| private mod invokeANTLR(CharStream text, String filename) | |
| log | back to summary |
|---|---|
| private void log(Level level, String msg) | |
| parse | back to summary |
|---|---|
| private NModule parse(String path) throws Exception Parse a file. Does not look in the cache or cache the result. | |
| parse | back to summary |
|---|---|
| private NModule parse(String path, String contents) throws Exception Parse a string. Does not look in the cache or cache the result. | |
| recordParseErrors | back to summary |
|---|---|
| private void recordParseErrors(String path, List<RecognitionException> errs) | |
| serialize | back to summary |
|---|---|
| pack-priv void serialize(NModule ast) throws Exception | |
| severe | back to summary |
|---|---|
| private void severe(String msg) | |
| warn | back to summary |
|---|---|
| private void warn(String msg) | |