public class DefaultSerializerFactory extends Object implements SerializerFactory
SerializerFactory
.
A bean of this class should be injected with the physical HtmlCleaner
Serializer
class and object argument array.
Then this will find and invoke the constructor of the specified class
with the specified object argument array to create a Serializer
instance.
Constructor and Description |
---|
DefaultSerializerFactory()
Zero-argument default constructor.
|
Modifier and Type | Method and Description |
---|---|
Serializer |
createSerializer(HtmlCleaner cleaner)
Creates a
Serializer instance by finding and invoking the constructor
of the injected HtmlCleaner Serializer class with the given
object argument array. |
Object[] |
getArguments()
Returns the object argument array to be used when invoking the constructor
of the physical
Serializer class. |
Class<? extends Serializer> |
getSerializerClass()
Returns the class of the physical HtmlCleaner
Serializer
such as SimpleHtmlSerializer . |
void |
setArguments(Object[] arguments)
Sets the object argument array to be used when invoking the constructor
of the physical
Serializer class. |
void |
setSerializerClass(Class<? extends Serializer> serializerClass)
Sets the class of the physical HtmlCleaner
Serializer
such as SimpleHtmlSerializer . |
public DefaultSerializerFactory()
public Class<? extends Serializer> getSerializerClass()
Serializer
such as SimpleHtmlSerializer
.public void setSerializerClass(Class<? extends Serializer> serializerClass)
Serializer
such as SimpleHtmlSerializer
.serializerClass
- public Object[] getArguments()
Serializer
class.public void setArguments(Object[] arguments)
Serializer
class.arguments
- public Serializer createSerializer(HtmlCleaner cleaner) throws Exception
Serializer
instance by finding and invoking the constructor
of the injected HtmlCleaner Serializer
class with the given
object argument array.createSerializer
in interface SerializerFactory
Exception
Copyright © 2008–2015 The Apache Software Foundation. All rights reserved.