if (type == null)
{
verifier.addBrokenRule("No barcode type set", barcode);
}
JRExpression codeExpression = barcode.getCodeExpression();
if (codeExpression == null)
{
verifier.addBrokenRule("Barcode expression is null", barcode);
}
else
{
String valueClass = codeExpression.getValueClassName();
if (valueClass == null)
{
verifier.addBrokenRule("Barcode expression value class not set", codeExpression);
}
else if (!"java.lang.String".equals(valueClass))
{
verifier.addBrokenRule("Class " + valueClass
+ " not supported for barcode expression. Use java.lang.String instead.",
codeExpression);
}
}
JRExpression applicationIdentifierExpression =
barcode.getApplicationIdentifierExpression();
if (applicationIdentifierExpression != null)
{
String valueClass = applicationIdentifierExpression.getValueClassName();
if (valueClass == null)
{
verifier.addBrokenRule("Barcode application identifier expression value class not set",
applicationIdentifierExpression);
}