Package jetbrains.mps.persistence.binary
Class BareNodeReader
- java.lang.Object
 - 
- jetbrains.mps.persistence.binary.BareNodeReader
 
 
- 
- Direct Known Subclasses:
 NodesReader
public class BareNodeReader extends Object
Lightweight, straightforward binary serialization of individualSNodes.- See Also:
 BareNodeWriter
 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected ModelInputStreammyInprotected SModelReferencemyModelReference 
- 
Constructor Summary
Constructors Constructor Description BareNodeReader(SModelReference modelReference, ModelInputStream is) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidexternalNodeReferenceRead(SModelReference targetModel, SNodeId nodeId)protected SNodeinstantiate(SNode parent)protected voidlocalNodeReferenceRead(SNodeId nodeId)List<SNode>readChildren(SNode parent)Read nodes and register them as children into supplied parent SNode (if any)SNodereadNode(SNode parent)Read a single node and register it with optional parentvoidreadNodesInto(SModelData modelData)Read nodes and register them as roots into supplied ModelDataprotected voidreadProperties(SNode node)protected SReferencereadReference(SReferenceLink sref, SNode node)protected voidreadReferences(SNode node)protected voidreadUserObjects(SNode node) 
 - 
 
- 
- 
Field Detail
- 
myModelReference
protected final SModelReference myModelReference
 
- 
myIn
protected final ModelInputStream myIn
 
 - 
 
- 
Constructor Detail
- 
BareNodeReader
public BareNodeReader(@NotNull SModelReference modelReference, @NotNull ModelInputStream is)
 
 - 
 
- 
Method Detail
- 
readNodesInto
public void readNodesInto(SModelData modelData) throws IOException
Read nodes and register them as roots into supplied ModelData- Throws:
 IOException
 
- 
readChildren
public List<SNode> readChildren(@Nullable SNode parent) throws IOException
Read nodes and register them as children into supplied parent SNode (if any)- Returns:
 - list of nodes read
 - Throws:
 IOException
 
- 
readNode
public final SNode readNode(@Nullable SNode parent) throws IOException
Read a single node and register it with optional parent- Throws:
 IOException
 
- 
instantiate
protected SNode instantiate(@Nullable SNode parent) throws IOException
- Throws:
 IOException
 
- 
readProperties
protected void readProperties(SNode node) throws IOException
- Throws:
 IOException
 
- 
readReferences
protected void readReferences(SNode node) throws IOException
- Throws:
 IOException
 
- 
readReference
protected SReference readReference(SReferenceLink sref, SNode node) throws IOException
- Throws:
 IOException
 
- 
localNodeReferenceRead
protected void localNodeReferenceRead(SNodeId nodeId)
 
- 
externalNodeReferenceRead
protected void externalNodeReferenceRead(SModelReference targetModel, SNodeId nodeId)
 
- 
readUserObjects
protected void readUserObjects(SNode node) throws IOException
- Throws:
 IOException
 
 - 
 
 -