Package org.geotools.geojson
Class DelegatingHandler<T>
- Object
-
- 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
Fields Modifier and Type Field Description protected ContentHandler
delegate
protected static HashMap<String,Class<? extends IContentHandler>>
handlers
protected static DelegatingHandler.NullHandler
NULL
protected static List<String>
NULL_LIST
protected static DelegatingHandler.NullHandler
UNINITIALIZED
-
Constructor Summary
Constructors Constructor Description DelegatingHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)
-
-
-
Field Detail
-
handlers
protected static HashMap<String,Class<? extends IContentHandler>> handlers
-
NULL
protected static DelegatingHandler.NullHandler NULL
-
UNINITIALIZED
protected static DelegatingHandler.NullHandler UNINITIALIZED
-
delegate
protected ContentHandler delegate
-
-
Method Detail
-
getDelegate
public ContentHandler getDelegate()
-
startJSON
public void startJSON() throws ParseException, IOException
- Specified by:
startJSON
in interfaceContentHandler
- Throws:
ParseException
IOException
-
endJSON
public void endJSON() throws ParseException, IOException
- Specified by:
endJSON
in interfaceContentHandler
- Throws:
ParseException
IOException
-
startObject
public boolean startObject() throws ParseException, IOException
- Specified by:
startObject
in interfaceContentHandler
- Throws:
ParseException
IOException
-
endObject
public boolean endObject() throws ParseException, IOException
- Specified by:
endObject
in interfaceContentHandler
- Throws:
ParseException
IOException
-
startObjectEntry
public boolean startObjectEntry(String key) throws ParseException, IOException
- Specified by:
startObjectEntry
in interfaceContentHandler
- Throws:
ParseException
IOException
-
endObjectEntry
public boolean endObjectEntry() throws ParseException, IOException
- Specified by:
endObjectEntry
in interfaceContentHandler
- Throws:
ParseException
IOException
-
startArray
public boolean startArray() throws ParseException, IOException
- Specified by:
startArray
in interfaceContentHandler
- Throws:
ParseException
IOException
-
endArray
public boolean endArray() throws ParseException, IOException
- Specified by:
endArray
in interfaceContentHandler
- Throws:
ParseException
IOException
-
primitive
public boolean primitive(Object value) throws ParseException, IOException
- Specified by:
primitive
in interfaceContentHandler
- Throws:
ParseException
IOException
-
getValue
public T getValue()
- Specified by:
getValue
in interfaceIContentHandler<T>
-
createDelegate
protected IContentHandler createDelegate(Class clazz, Object[] args)
-
-