Class StringResolver<T>
java.lang.Object
pro.verron.officestamper.api.StringResolver<T>
- Type Parameters:
T- the type of the object to resolve
- All Implemented Interfaces:
ObjectResolver
This is an abstract class that provides a generic implementation for
resolving objects to strings. It is used in conjunction with
ObjectResolver interface to provide a flexible way to
resolve different types of objects to strings.- Since:
- 1.6.7
- Version:
- ${version}
- Author:
- Joseph Verron
-
Field Summary
Fields inherited from interface ObjectResolver
LOGGER -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedStringResolver(Class<T> type) Creates a new StringResolver with the given type. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleancanResolve(Object object) Determines if the given object can be resolved by the StringResolver.final org.docx4j.wml.RResolves an object to a string and creates a new run with the resolved string as content.protected abstract StringResolves an object to a string.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ObjectResolver
resolve, resolve
-
Constructor Details
-
StringResolver
-
-
Method Details
-
resolve
Resolves an object to a string and creates a new run with the resolved string as content.- Specified by:
resolvein interfaceObjectResolver- Parameters:
document- the WordprocessingMLPackage documentexpression- the expression stringobject- the object to be resolved- Returns:
- the newly created run with the resolved string as content
-
canResolve
Determines if the given object can be resolved by the StringResolver.- Specified by:
canResolvein interfaceObjectResolver- Parameters:
object- the object to be resolved- Returns:
- true if the object can be resolved, false otherwise
-
resolve
-