Class Serializer

  • All Implemented Interfaces:
    ISerializer

    public class Serializer
    extends java.lang.Object
    implements ISerializer
    • Constructor Detail

      • Serializer

        public Serializer()
    • Method Detail

      • serialize

        public java.lang.String serialize​(org.eclipse.emf.ecore.EObject obj)
        Specified by:
        serialize in interface ISerializer
      • serialize

        protected void serialize​(org.eclipse.emf.ecore.EObject obj,
                                 ITokenStream tokenStream,
                                 SaveOptions options)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • serializeToRegions

        public ITextRegionAccess serializeToRegions​(org.eclipse.emf.ecore.EObject obj)
      • serialize

        protected void serialize​(org.eclipse.emf.ecore.EObject obj,
                                 java.lang.Appendable appendable,
                                 SaveOptions options)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • getContext

        @Deprecated
        protected org.eclipse.emf.ecore.EObject getContext​(org.eclipse.emf.ecore.EObject semanticObject)
        Deprecated.
      • getIContext

        protected ISerializationContext getIContext​(org.eclipse.emf.ecore.EObject semanticObject)
      • serialize

        public java.lang.String serialize​(org.eclipse.emf.ecore.EObject obj,
                                          SaveOptions options)
        Specified by:
        serialize in interface ISerializer
      • serialize

        public void serialize​(org.eclipse.emf.ecore.EObject obj,
                              java.io.Writer writer,
                              SaveOptions options)
                       throws java.io.IOException
        Specified by:
        serialize in interface ISerializer
        Throws:
        java.io.IOException
      • serializeReplacement

        public org.eclipse.xtext.util.ReplaceRegion serializeReplacement​(org.eclipse.emf.ecore.EObject obj,
                                                                         SaveOptions options)
        Specified by:
        serializeReplacement in interface ISerializer
      • calculateReplaceRegionLength

        protected int calculateReplaceRegionLength​(ICompositeNode node,
                                                   java.lang.String text)
        Since:
        2.22
      • hiddenNodeFollows

        protected boolean hiddenNodeFollows​(ICompositeNode node)
        Since:
        2.22
      • getFollowingNode

        protected INode getFollowingNode​(ICompositeNode node)
        Returns the node that follows the node, independently, if they have the same parent.
        Since:
        2.22
      • isWhitespace

        protected boolean isWhitespace​(java.lang.String text)
        Since:
        2.22