Package jetbrains.mps.persistence.binary
Class BareNodeWriter
- java.lang.Object
 - 
- jetbrains.mps.persistence.binary.BareNodeWriter
 
 
- 
- Direct Known Subclasses:
 NodesWriter
public class BareNodeWriter extends Object
Minimalistic binary persistence, straightforward, to serialize nodes individually. Extracted as part of binary persistence refactoring, with the latter becoming full-fledged persistence mechanism 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected SModelReferencemyModelReferenceprotected ModelOutputStreammyOut 
- 
Constructor Summary
Constructors Constructor Description BareNodeWriter(SModelReference modelReference, ModelOutputStream os) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanisKnownUserObject(Object object)voidwriteNode(SNode node)protected voidwriteNodePrim(SNode node)voidwriteNodes(Collection<SNode> nodes)protected voidwriteProperties(SNode node)protected voidwriteReferences(SNode node)protected voidwriteReferenceTarget(SReference reference)protected voidwriteUserObject(Object object)protected voidwriteUserObjects(SNode node) 
 - 
 
- 
- 
Field Detail
- 
myModelReference
protected final SModelReference myModelReference
 
- 
myOut
protected final ModelOutputStream myOut
 
 - 
 
- 
Constructor Detail
- 
BareNodeWriter
public BareNodeWriter(@NotNull SModelReference modelReference, @NotNull ModelOutputStream os)
 
 - 
 
- 
Method Detail
- 
writeNodes
public void writeNodes(Collection<SNode> nodes) throws IOException
- Throws:
 IOException
 
- 
writeNode
public final void writeNode(SNode node) throws IOException
- Throws:
 IOException
 
- 
writeNodePrim
protected void writeNodePrim(SNode node) throws IOException
- Throws:
 IOException
 
- 
writeReferences
protected void writeReferences(SNode node) throws IOException
- Throws:
 IOException
 
- 
writeReferenceTarget
protected void writeReferenceTarget(SReference reference) throws IOException
- Throws:
 IOException
 
- 
writeProperties
protected void writeProperties(SNode node) throws IOException
- Throws:
 IOException
 
- 
writeUserObjects
protected void writeUserObjects(SNode node) throws IOException
- Throws:
 IOException
 
- 
writeUserObject
protected void writeUserObject(Object object) throws IOException
- Throws:
 IOException
 
- 
isKnownUserObject
protected boolean isKnownUserObject(Object object)
 
 - 
 
 -