public class AstExternalizble extends java.lang.Object implements CustomExternalizable
Only the AST ID will be stored.
| Modifier and Type | Field and Description |
|---|---|
private Aast |
ast
The associated AST node.
|
private java.lang.Long |
astId
The AST ID.
|
private boolean |
special
Flag indicating if this serialized instance requires special processing.
|
| Constructor and Description |
|---|
AstExternalizble()
Default c'tor, for deserialization purposes.
|
AstExternalizble(java.lang.Object value)
Create a new instance and map it to the specified AST.
|
| Modifier and Type | Method and Description |
|---|---|
void |
compact(long fileId)
Compact this instance.
|
java.lang.Long |
getAstId()
Get the
astId. |
java.lang.Object |
getValue()
Get the value to be stored in a collection, after it was deserialized from the database.
|
boolean |
isSpecial()
Get the state of the
special flag. |
void |
readExternal(java.io.ObjectInput in)
Restore this instance by re-loading the AST with the given ID.
|
void |
writeExternal(java.io.ObjectOutput out)
Write this instance to stream.
|
private Aast ast
null and resolved by getValue(),
if the AST is loaded from disk.private java.lang.Long astId
private boolean special
WARNING: AstExternalizble is used only by 'tmpTabNodes', which sets the special flag
only for ASTs with authoritative annotation.
public AstExternalizble()
public AstExternalizble(java.lang.Object value)
This c'tor is used via reflection.
value - The AST instance.public java.lang.Long getAstId()
astId.public void compact(long fileId)
compact in interface CustomExternalizablefileId - The AST file ID which has finished processing.public java.lang.Object getValue()
getValue in interface CustomExternalizablepublic void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizableout - The object output stream.java.io.IOExceptionpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablein - The object input stream.java.io.IOExceptionjava.lang.ClassNotFoundExceptionpublic boolean isSpecial()
special flag.