org.geotools.geojson
Class DelegatingHandler<T>

Object
  extended by DelegatingHandler<T>
All Implemented Interfaces:
IContentHandler<T>, ContentHandler
Direct Known Subclasses:
FeatureCollectionHandler, FeatureHandler, FeatureTypeHandler, GeometryCollectionHandler, GeometryHandler

public abstract class DelegatingHandler<T>
extends Object
implements IContentHandler<T>


Field Summary
protected  ContentHandler delegate
           
protected static HashMap<String,Class<? extends IContentHandler>> handlers
           
protected static DelegatingHandler.NullHandler NULL
           
protected static List NULL_LIST
           
protected static DelegatingHandler.NullHandler UNINITIALIZED
           
 
Constructor Summary
DelegatingHandler()
           
 
Method Summary
protected  IContentHandler createDelegate(Class clazz, Object[] args)
           
 boolean endArray()
           
 void endJSON()
           
 boolean endObject()
           
 boolean endObjectEntry()
           
 ContentHandler getDelegate()
           
 T getValue()
           
protected  Class<? extends ContentHandler> lookupDelegate(String type)
           
 boolean primitive(Object value)
           
 boolean startArray()
           
 void startJSON()
           
 boolean startObject()
           
 boolean startObjectEntry(String key)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

handlers

protected static HashMap<String,Class<? extends IContentHandler>> handlers

NULL

protected static DelegatingHandler.NullHandler NULL

UNINITIALIZED

protected static DelegatingHandler.NullHandler UNINITIALIZED

NULL_LIST

protected static List NULL_LIST

delegate

protected ContentHandler delegate
Constructor Detail

DelegatingHandler

public DelegatingHandler()
Method Detail

getDelegate

public ContentHandler getDelegate()

startJSON

public void startJSON()
               throws ParseException,
                      IOException
Specified by:
startJSON in interface ContentHandler
Throws:
ParseException
IOException

endJSON

public void endJSON()
             throws ParseException,
                    IOException
Specified by:
endJSON in interface ContentHandler
Throws:
ParseException
IOException

startObject

public boolean startObject()
                    throws ParseException,
                           IOException
Specified by:
startObject in interface ContentHandler
Throws:
ParseException
IOException

endObject

public boolean endObject()
                  throws ParseException,
                         IOException
Specified by:
endObject in interface ContentHandler
Throws:
ParseException
IOException

startObjectEntry

public boolean startObjectEntry(String key)
                         throws ParseException,
                                IOException
Specified by:
startObjectEntry in interface ContentHandler
Throws:
ParseException
IOException

endObjectEntry

public boolean endObjectEntry()
                       throws ParseException,
                              IOException
Specified by:
endObjectEntry in interface ContentHandler
Throws:
ParseException
IOException

startArray

public boolean startArray()
                   throws ParseException,
                          IOException
Specified by:
startArray in interface ContentHandler
Throws:
ParseException
IOException

endArray

public boolean endArray()
                 throws ParseException,
                        IOException
Specified by:
endArray in interface ContentHandler
Throws:
ParseException
IOException

primitive

public boolean primitive(Object value)
                  throws ParseException,
                         IOException
Specified by:
primitive in interface ContentHandler
Throws:
ParseException
IOException

getValue

public T getValue()
Specified by:
getValue in interface IContentHandler<T>

lookupDelegate

protected Class<? extends ContentHandler> lookupDelegate(String type)

createDelegate

protected IContentHandler createDelegate(Class clazz,
                                         Object[] args)


Copyright © 1996-2014 Geotools. All Rights Reserved.