Class Null2DefaultResolver
java.lang.Object
pro.verron.docxstamper.preset.resolver.Null2DefaultResolver
- All Implemented Interfaces:
ObjectResolver
The Null2DefaultResolver class is an implementation of the ObjectResolver interface
that resolves null objects by creating a run with a default text value.
- Since:
- 1.6.7
- Version:
- ${version}
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanResolve(Object object) Checks if the given object can be resolved.Retrieves the default value of the Null2DefaultResolver object.org.docx4j.wml.Rresolve(org.docx4j.openpackaging.packages.WordprocessingMLPackage document, String placeholder, Object object) Resolves the placeholder in the given document with the provided object.
-
Method Details
-
canResolve
Description copied from interface:ObjectResolverChecks if the given object can be resolved.- Specified by:
canResolvein interfaceObjectResolver- Parameters:
object- the object to be resolved- Returns:
- true if the object can be resolved, false otherwise
-
resolve
public org.docx4j.wml.R resolve(org.docx4j.openpackaging.packages.WordprocessingMLPackage document, String placeholder, Object object) Description copied from interface:ObjectResolverResolves the placeholder in the given document with the provided object.- Specified by:
resolvein interfaceObjectResolver- Parameters:
document- theWordprocessingMLPackagedocument in which to resolve the placeholderplaceholder- the placeholder value to be replacedobject- the object to be used for resolving the placeholder- Returns:
- the resolved value for the placeholder
-
defaultValue
Retrieves the default value of the Null2DefaultResolver object.- Returns:
- the default value of the Null2DefaultResolver object as a String
-