Package org.nekosoft.pdffer.exception
Class InvalidTemplateClassException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.nekosoft.pdffer.exception.PdfferException
org.nekosoft.pdffer.exception.PdfferProducerException
org.nekosoft.pdffer.exception.InvalidTemplateClassException
- All Implemented Interfaces:
Serializable
An exception raised when the producer is given a template that is not the expected class.
This is currently a problem when using any of the JSON or Java map methods in the producer
but the template is not a subclass of AbstractJacksonPdfTemplate
.
- See Also:
- Serialized Form
-
Constructor Summary
ConstructorDescriptionInvalidTemplateClassException(Class<? extends PdfTemplate> actualTemplateClass, Class<? extends PdfTemplate> expectedTemplateClass)
Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionClass<? extends PdfTemplate>
Gets the actual class of the template being used.Class<? extends PdfTemplate>
Gets the expected superclass of templates that can be used.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
InvalidTemplateClassException
public InvalidTemplateClassException(Class<? extends PdfTemplate> actualTemplateClass, Class<? extends PdfTemplate> expectedTemplateClass)Creates a new instance.- Parameters:
actualTemplateClass
- the class of the template being usedexpectedTemplateClass
- the expected superclass of templates that can be used
-
-
Method Details
-
getActualTemplateClass
Gets the actual class of the template being used.- Returns:
- the actual template class
-
getExpectedTemplateClass
Gets the expected superclass of templates that can be used.- Returns:
- the expected template superclass
-