Class
DefaultTypeAdapter
lucee.Component
cfboom.lang.Object
cfboom.gson.TypeAdapter
cfboom.gson.DefaultTypeAdapter
All Implemented Interfaces:
Default implementation of TypeAdapter.
Class Attributes:
singleton
: true
output
: false
displayname
: Class DefaultTypeAdapter
synchronized
: false
accessors
: false
persistent
: false
author
: Joel Tobey
Property Summary
|
type
|
property
|
default
|
serializable
|
required
|
any
|
log
- access = public
- returntype = any
- inject = logbox:logger:{this}
|
|
true
|
false
|
any
|
wirebox
- access = public
- returntype = any
- inject = wirebox
|
|
true
|
false
|
Constructor Summary
|
init()
Constructor.
|
Method Summary
|
any
|
createInstance(string class)
Default implementation returns wirebox.
|
any
|
serialize(any src, [string typeOfSrc])
Super basic implementation.
|
Methods inherited from class lucee.Component
|
None
|
init
public init()
Constructor.
log
property any
log
- Attributes:
access
- public
required
- false
returntype
- any
inject
- logbox:logger:{this}
serializable
- true
wirebox
property any
wirebox
- Attributes:
access
- public
required
- false
returntype
- any
inject
- wirebox
serializable
- true
createInstance
public any createInstance(string class)
Default implementation returns wirebox.getInstance( class );
- Overrides:
-
createInstance
in class
TypeAdapter
- Parameters:
class
- Returns:
- a wired up class from wirebox.
serialize
public any serialize(any src, [string typeOfSrc])
Super basic implementation. Looks for toGson() method on src. Otherwise, it uses serializeJson().
- Overrides:
-
serialize
in class
TypeAdapter
- Parameters:
src
typeOfSrc