Class Null2PlaceholderResolver
java.lang.Object
pro.verron.docxstamper.preset.resolver.Null2PlaceholderResolver
- All Implemented Interfaces:
ObjectResolver
The Null2PlaceholderResolver class is an implementation of the ObjectResolver interface.
It provides a way to resolve null objects by not replacing their placeholder string.
- Since:
- 1.6.7
- Version:
- ${version}
- Author:
- Joseph Verron
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanResolve(Object object) Checks if the given object can be resolved.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
-