Class Null2DefaultResolver

java.lang.Object
pro.verron.docxstamper.preset.resolver.Null2DefaultResolver
All Implemented Interfaces:
ObjectResolver

public class Null2DefaultResolver extends Object implements 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 Details

    • canResolve

      public boolean canResolve(Object object)
      Description copied from interface: ObjectResolver
      Checks if the given object can be resolved.
      Specified by:
      canResolve in interface ObjectResolver
      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: ObjectResolver
      Resolves the placeholder in the given document with the provided object.
      Specified by:
      resolve in interface ObjectResolver
      Parameters:
      document - the WordprocessingMLPackage document in which to resolve the placeholder
      placeholder - the placeholder value to be replaced
      object - the object to be used for resolving the placeholder
      Returns:
      the resolved value for the placeholder
    • defaultValue

      public String defaultValue()
      Retrieves the default value of the Null2DefaultResolver object.
      Returns:
      the default value of the Null2DefaultResolver object as a String