XObjectValidator validator = null;
switch (ptype) {
case DICTIONARY_PATTERN_TILING:
validator = new TilingPattern(handler, (COSStream) cosPattern);
break;
case DICTIONARY_PATTERN_SHADING:
validator = new ShadingPattern(handler, cosPattern);
break;
default: