com.jasonclawson.jackson.dataformat.hocon
Class HoconFactory

java.lang.Object
  extended by com.fasterxml.jackson.core.JsonFactory
      extended by com.jasonclawson.jackson.dataformat.hocon.HoconFactory
All Implemented Interfaces:
com.fasterxml.jackson.core.Versioned, Serializable

public class HoconFactory
extends com.fasterxml.jackson.core.JsonFactory

This code was pretty much copied from the jackson YAMLFactory

Author:
jclawson
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.fasterxml.jackson.core.JsonFactory
com.fasterxml.jackson.core.JsonFactory.Feature
 
Field Summary
static String FORMAT_NAME_HOCON
           
 
Fields inherited from class com.fasterxml.jackson.core.JsonFactory
_characterEscapes, _factoryFeatures, _generatorFeatures, _inputDecorator, _objectCodec, _outputDecorator, _parserFeatures, _recyclerRef, _rootByteSymbols, _rootCharSymbols, _rootValueSeparator, DEFAULT_FACTORY_FEATURE_FLAGS, DEFAULT_GENERATOR_FEATURE_FLAGS, DEFAULT_PARSER_FEATURE_FLAGS, FORMAT_NAME_JSON
 
Constructor Summary
HoconFactory()
           
HoconFactory(HoconFactory src, com.fasterxml.jackson.core.ObjectCodec oc)
           
HoconFactory(com.fasterxml.jackson.core.ObjectCodec oc)
           
 
Method Summary
protected  com.fasterxml.jackson.core.JsonGenerator _createGenerator(Writer out, com.fasterxml.jackson.core.io.IOContext ctxt)
           
protected  HoconTreeTraversingParser _createParser(byte[] data, int offset, int len, com.fasterxml.jackson.core.io.IOContext ctxt)
           
protected  HoconTreeTraversingParser _createParser(InputStream in, com.fasterxml.jackson.core.io.IOContext ctxt)
           
protected  HoconTreeTraversingParser _createParser(Reader r, com.fasterxml.jackson.core.io.IOContext ctxt)
           
protected  Reader _createReader(byte[] data, int offset, int len, com.fasterxml.jackson.core.JsonEncoding enc, com.fasterxml.jackson.core.io.IOContext ctxt)
           
protected  Reader _createReader(InputStream in, com.fasterxml.jackson.core.JsonEncoding enc, com.fasterxml.jackson.core.io.IOContext ctxt)
           
protected  com.fasterxml.jackson.core.JsonGenerator _createUTF8Generator(OutputStream out, com.fasterxml.jackson.core.io.IOContext ctxt)
          Deprecated. 
protected  Writer _createWriter(OutputStream out, com.fasterxml.jackson.core.JsonEncoding enc, com.fasterxml.jackson.core.io.IOContext ctxt)
           
 HoconFactory copy()
           
 com.fasterxml.jackson.core.JsonGenerator createGenerator(OutputStream out)
           
 com.fasterxml.jackson.core.JsonGenerator createGenerator(OutputStream out, com.fasterxml.jackson.core.JsonEncoding enc)
           
 com.fasterxml.jackson.core.JsonGenerator createGenerator(Writer out)
           
 com.fasterxml.jackson.core.JsonGenerator createJsonGenerator(OutputStream out)
          Deprecated. 
 com.fasterxml.jackson.core.JsonGenerator createJsonGenerator(OutputStream out, com.fasterxml.jackson.core.JsonEncoding enc)
          Deprecated. 
 com.fasterxml.jackson.core.JsonGenerator createJsonGenerator(Writer out)
          Deprecated. 
 HoconTreeTraversingParser createJsonParser(byte[] data)
          Deprecated. 
 HoconTreeTraversingParser createJsonParser(byte[] data, int offset, int len)
          Deprecated. 
 HoconTreeTraversingParser createJsonParser(File f)
          Deprecated. 
 HoconTreeTraversingParser createJsonParser(InputStream in)
          Deprecated. 
 com.fasterxml.jackson.core.JsonParser createJsonParser(Reader r)
          Deprecated. 
 HoconTreeTraversingParser createJsonParser(String content)
          Deprecated. 
 HoconTreeTraversingParser createJsonParser(URL url)
          Deprecated. 
 HoconTreeTraversingParser createParser(byte[] data)
           
 HoconTreeTraversingParser createParser(byte[] data, int offset, int len)
           
 HoconTreeTraversingParser createParser(File f)
           
 HoconTreeTraversingParser createParser(InputStream in)
           
 com.fasterxml.jackson.core.JsonParser createParser(Reader r)
           
 HoconTreeTraversingParser createParser(String content)
           
 HoconTreeTraversingParser createParser(URL url)
           
 String getFormatName()
           
 com.fasterxml.jackson.core.format.MatchStrength hasFormat(com.fasterxml.jackson.core.format.InputAccessor acc)
          Sub-classes need to override this method (as of 1.8)
protected  Object readResolve()
          Method that we need to override to actually make restoration go through constructors etc.
 
Methods inherited from class com.fasterxml.jackson.core.JsonFactory
_checkInvalidCopy, _createContext, _createParser, _decorate, _decorate, _decorate, _decorate, _getBufferRecycler, _optimizedStreamFromURL, canHandleBinaryNatively, canUseCharArrays, canUseSchema, configure, configure, configure, createGenerator, createJsonGenerator, createParser, createParser, disable, disable, disable, enable, enable, enable, getCharacterEscapes, getCodec, getInputDecorator, getOutputDecorator, getRootValueSeparator, hasJSONFormat, isEnabled, isEnabled, isEnabled, requiresCustomCodec, requiresPropertyOrdering, setCharacterEscapes, setCodec, setInputDecorator, setOutputDecorator, setRootValueSeparator, version
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FORMAT_NAME_HOCON

public static final String FORMAT_NAME_HOCON
See Also:
Constant Field Values
Constructor Detail

HoconFactory

public HoconFactory()

HoconFactory

public HoconFactory(com.fasterxml.jackson.core.ObjectCodec oc)

HoconFactory

public HoconFactory(HoconFactory src,
                    com.fasterxml.jackson.core.ObjectCodec oc)
Method Detail

copy

public HoconFactory copy()
Overrides:
copy in class com.fasterxml.jackson.core.JsonFactory

readResolve

protected Object readResolve()
Method that we need to override to actually make restoration go through constructors etc. Also: must be overridden by sub-classes as well.

Overrides:
readResolve in class com.fasterxml.jackson.core.JsonFactory

getFormatName

public String getFormatName()
Overrides:
getFormatName in class com.fasterxml.jackson.core.JsonFactory

hasFormat

public com.fasterxml.jackson.core.format.MatchStrength hasFormat(com.fasterxml.jackson.core.format.InputAccessor acc)
                                                          throws IOException
Sub-classes need to override this method (as of 1.8)

Overrides:
hasFormat in class com.fasterxml.jackson.core.JsonFactory
Throws:
IOException

createParser

public HoconTreeTraversingParser createParser(String content)
                                       throws IOException,
                                              com.fasterxml.jackson.core.JsonParseException
Overrides:
createParser in class com.fasterxml.jackson.core.JsonFactory
Throws:
IOException
com.fasterxml.jackson.core.JsonParseException

createParser

public HoconTreeTraversingParser createParser(File f)
                                       throws IOException,
                                              com.fasterxml.jackson.core.JsonParseException
Overrides:
createParser in class com.fasterxml.jackson.core.JsonFactory
Throws:
IOException
com.fasterxml.jackson.core.JsonParseException

createParser

public HoconTreeTraversingParser createParser(URL url)
                                       throws IOException,
                                              com.fasterxml.jackson.core.JsonParseException
Overrides:
createParser in class com.fasterxml.jackson.core.JsonFactory
Throws:
IOException
com.fasterxml.jackson.core.JsonParseException

createParser

public HoconTreeTraversingParser createParser(InputStream in)
                                       throws IOException,
                                              com.fasterxml.jackson.core.JsonParseException
Overrides:
createParser in class com.fasterxml.jackson.core.JsonFactory
Throws:
IOException
com.fasterxml.jackson.core.JsonParseException

createParser

public com.fasterxml.jackson.core.JsonParser createParser(Reader r)
                                                   throws IOException,
                                                          com.fasterxml.jackson.core.JsonParseException
Overrides:
createParser in class com.fasterxml.jackson.core.JsonFactory
Throws:
IOException
com.fasterxml.jackson.core.JsonParseException

createParser

public HoconTreeTraversingParser createParser(byte[] data)
                                       throws IOException,
                                              com.fasterxml.jackson.core.JsonParseException
Overrides:
createParser in class com.fasterxml.jackson.core.JsonFactory
Throws:
IOException
com.fasterxml.jackson.core.JsonParseException

createParser

public HoconTreeTraversingParser createParser(byte[] data,
                                              int offset,
                                              int len)
                                       throws IOException,
                                              com.fasterxml.jackson.core.JsonParseException
Overrides:
createParser in class com.fasterxml.jackson.core.JsonFactory
Throws:
IOException
com.fasterxml.jackson.core.JsonParseException

createJsonParser

@Deprecated
public HoconTreeTraversingParser createJsonParser(String content)
                                           throws IOException,
                                                  com.fasterxml.jackson.core.JsonParseException
Deprecated. 

Overrides:
createJsonParser in class com.fasterxml.jackson.core.JsonFactory
Throws:
IOException
com.fasterxml.jackson.core.JsonParseException

createJsonParser

@Deprecated
public HoconTreeTraversingParser createJsonParser(File f)
                                           throws IOException,
                                                  com.fasterxml.jackson.core.JsonParseException
Deprecated. 

Overrides:
createJsonParser in class com.fasterxml.jackson.core.JsonFactory
Throws:
IOException
com.fasterxml.jackson.core.JsonParseException

createJsonParser

@Deprecated
public HoconTreeTraversingParser createJsonParser(URL url)
                                           throws IOException,
                                                  com.fasterxml.jackson.core.JsonParseException
Deprecated. 

Overrides:
createJsonParser in class com.fasterxml.jackson.core.JsonFactory
Throws:
IOException
com.fasterxml.jackson.core.JsonParseException

createJsonParser

@Deprecated
public HoconTreeTraversingParser createJsonParser(InputStream in)
                                           throws IOException,
                                                  com.fasterxml.jackson.core.JsonParseException
Deprecated. 

Overrides:
createJsonParser in class com.fasterxml.jackson.core.JsonFactory
Throws:
IOException
com.fasterxml.jackson.core.JsonParseException

createJsonParser

@Deprecated
public com.fasterxml.jackson.core.JsonParser createJsonParser(Reader r)
                                                       throws IOException,
                                                              com.fasterxml.jackson.core.JsonParseException
Deprecated. 

Overrides:
createJsonParser in class com.fasterxml.jackson.core.JsonFactory
Throws:
IOException
com.fasterxml.jackson.core.JsonParseException

createJsonParser

@Deprecated
public HoconTreeTraversingParser createJsonParser(byte[] data)
                                           throws IOException,
                                                  com.fasterxml.jackson.core.JsonParseException
Deprecated. 

Overrides:
createJsonParser in class com.fasterxml.jackson.core.JsonFactory
Throws:
IOException
com.fasterxml.jackson.core.JsonParseException

createJsonParser

@Deprecated
public HoconTreeTraversingParser createJsonParser(byte[] data,
                                                             int offset,
                                                             int len)
                                           throws IOException,
                                                  com.fasterxml.jackson.core.JsonParseException
Deprecated. 

Overrides:
createJsonParser in class com.fasterxml.jackson.core.JsonFactory
Throws:
IOException
com.fasterxml.jackson.core.JsonParseException

createGenerator

public com.fasterxml.jackson.core.JsonGenerator createGenerator(OutputStream out,
                                                                com.fasterxml.jackson.core.JsonEncoding enc)
                                                         throws IOException
Overrides:
createGenerator in class com.fasterxml.jackson.core.JsonFactory
Throws:
IOException

createGenerator

public com.fasterxml.jackson.core.JsonGenerator createGenerator(OutputStream out)
                                                         throws IOException
Overrides:
createGenerator in class com.fasterxml.jackson.core.JsonFactory
Throws:
IOException

createGenerator

public com.fasterxml.jackson.core.JsonGenerator createGenerator(Writer out)
                                                         throws IOException
Overrides:
createGenerator in class com.fasterxml.jackson.core.JsonFactory
Throws:
IOException

createJsonGenerator

@Deprecated
public com.fasterxml.jackson.core.JsonGenerator createJsonGenerator(OutputStream out,
                                                                               com.fasterxml.jackson.core.JsonEncoding enc)
                                                             throws IOException
Deprecated. 

Overrides:
createJsonGenerator in class com.fasterxml.jackson.core.JsonFactory
Throws:
IOException

createJsonGenerator

@Deprecated
public com.fasterxml.jackson.core.JsonGenerator createJsonGenerator(OutputStream out)
                                                             throws IOException
Deprecated. 

Overrides:
createJsonGenerator in class com.fasterxml.jackson.core.JsonFactory
Throws:
IOException

createJsonGenerator

@Deprecated
public com.fasterxml.jackson.core.JsonGenerator createJsonGenerator(Writer out)
                                                             throws IOException
Deprecated. 

Overrides:
createJsonGenerator in class com.fasterxml.jackson.core.JsonFactory
Throws:
IOException

_createParser

protected HoconTreeTraversingParser _createParser(InputStream in,
                                                  com.fasterxml.jackson.core.io.IOContext ctxt)
                                           throws IOException,
                                                  com.fasterxml.jackson.core.JsonParseException
Overrides:
_createParser in class com.fasterxml.jackson.core.JsonFactory
Throws:
IOException
com.fasterxml.jackson.core.JsonParseException

_createParser

protected HoconTreeTraversingParser _createParser(Reader r,
                                                  com.fasterxml.jackson.core.io.IOContext ctxt)
                                           throws IOException,
                                                  com.fasterxml.jackson.core.JsonParseException
Overrides:
_createParser in class com.fasterxml.jackson.core.JsonFactory
Throws:
IOException
com.fasterxml.jackson.core.JsonParseException

_createParser

protected HoconTreeTraversingParser _createParser(byte[] data,
                                                  int offset,
                                                  int len,
                                                  com.fasterxml.jackson.core.io.IOContext ctxt)
                                           throws IOException,
                                                  com.fasterxml.jackson.core.JsonParseException
Overrides:
_createParser in class com.fasterxml.jackson.core.JsonFactory
Throws:
IOException
com.fasterxml.jackson.core.JsonParseException

_createGenerator

protected com.fasterxml.jackson.core.JsonGenerator _createGenerator(Writer out,
                                                                    com.fasterxml.jackson.core.io.IOContext ctxt)
                                                             throws IOException
Overrides:
_createGenerator in class com.fasterxml.jackson.core.JsonFactory
Throws:
IOException

_createUTF8Generator

@Deprecated
protected com.fasterxml.jackson.core.JsonGenerator _createUTF8Generator(OutputStream out,
                                                                                   com.fasterxml.jackson.core.io.IOContext ctxt)
                                                                 throws IOException
Deprecated. 

Overrides:
_createUTF8Generator in class com.fasterxml.jackson.core.JsonFactory
Throws:
IOException

_createWriter

protected Writer _createWriter(OutputStream out,
                               com.fasterxml.jackson.core.JsonEncoding enc,
                               com.fasterxml.jackson.core.io.IOContext ctxt)
                        throws IOException
Overrides:
_createWriter in class com.fasterxml.jackson.core.JsonFactory
Throws:
IOException

_createReader

protected Reader _createReader(InputStream in,
                               com.fasterxml.jackson.core.JsonEncoding enc,
                               com.fasterxml.jackson.core.io.IOContext ctxt)
                        throws IOException
Throws:
IOException

_createReader

protected Reader _createReader(byte[] data,
                               int offset,
                               int len,
                               com.fasterxml.jackson.core.JsonEncoding enc,
                               com.fasterxml.jackson.core.io.IOContext ctxt)
                        throws IOException
Throws:
IOException


Copyright © 2015. All Rights Reserved.