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.
|
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.
|
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
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 CustomExternalizable
fileId
- The AST file ID which has finished processing.public java.lang.Object getValue()
getValue
in interface CustomExternalizable
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
out
- The object output stream.java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
in
- The object input stream.java.io.IOException
java.lang.ClassNotFoundException