public final class PBCosVisitor extends Object
ICOSVisitor which realize Visitor pattern.
Current implementation create objects of abstract model implementation for corresponding objects
of pdf box. Methods call from <? extends COSBase> objects using accept() method.| Modifier and Type | Method and Description |
|---|---|
static PBCosVisitor |
getInstance(PDDocument document,
PDFAFlavour flavour) |
Object |
visitFromArray(COSArray obj)
Create a PBCosArray for corresponding COSArray.
|
Object |
visitFromBoolean(COSBoolean obj)
Create a PBCosBool for corresponding COSBoolean.
|
Object |
visitFromDictionary(COSDictionary obj)
Create a PBCosFileSpecification COSDictionary if
value of type key of
obj is file specification. |
Object |
visitFromDocument(COSDocument obj)
Create a PBCosDocument for corresponding COSDocument.
|
Object |
visitFromFloat(COSFloat obj)
Create a PBCosReal for corresponding COSFloat.
|
Object |
visitFromInt(COSInteger obj)
Create a PBCosInteger for corresponding COSInteger.
|
Object |
visitFromName(COSName obj)
Create a PBCosName for corresponding COSName.
|
Object |
visitFromNull(COSNull obj)
Create a PBCosNull for corresponding COSNull.
|
static Object |
visitFromObject(COSObject obj,
PDDocument document,
PDFAFlavour flavour)
Notification of visiting in indirect object.
|
Object |
visitFromStream(COSStream obj)
Create a PBCosStream for corresponding COSStream.
|
Object |
visitFromString(COSString obj)
Create a PBCosString for corresponding COSString.
|
public static PBCosVisitor getInstance(PDDocument document, PDFAFlavour flavour)
public Object visitFromArray(COSArray obj) throws IOException
IOExceptionPBCosArraypublic Object visitFromBoolean(COSBoolean obj) throws IOException
IOExceptionPBCosBoolpublic Object visitFromDictionary(COSDictionary obj) throws IOException
obj is file specification. Otherwise
create PBCosDictIOExceptionPBCosDict,
PBCosFileSpecificationpublic Object visitFromDocument(COSDocument obj) throws IOException
IOExceptionPBCosDocumentpublic Object visitFromFloat(COSFloat obj) throws IOException
IOExceptionPBCosRealpublic Object visitFromInt(COSInteger obj) throws IOException
IOExceptionPBCosIntegerpublic Object visitFromName(COSName obj) throws IOException
IOExceptionPBCosNamepublic Object visitFromNull(COSNull obj) throws IOException
IOExceptionPBCosNullpublic Object visitFromStream(COSStream obj) throws IOException
IOExceptionPBCosStreampublic Object visitFromString(COSString obj) throws IOException
IOExceptionPBCosStringpublic static Object visitFromObject(COSObject obj, PDDocument document, PDFAFlavour flavour)
COSObject#accept(ICOSVisitor) not accept indirect objects - its get
direct content and accepting it.PBCosIndirect objectPBCosIndirect,
COSObject#accept(ICOSVisitor)Copyright © 2015–2016 The veraPDF Consortium. All rights reserved.