Class OperatorProcessor
- java.lang.Object
-
- org.apache.pdfbox.contentstream.operator.OperatorProcessor
-
- Direct Known Subclasses:
BeginMarkedContentSequence
,BeginMarkedContentSequenceWithProperties
,BeginText
,Concatenate
,DrawObject
,DrawObject
,EndMarkedContentSequence
,EndText
,GraphicsOperatorProcessor
,MoveText
,MoveTextSetLeading
,NextLine
,Restore
,Save
,SetCharSpacing
,SetColor
,SetFlatness
,SetFontAndSize
,SetGraphicsStateParameters
,SetLineCapStyle
,SetLineDashPattern
,SetLineJoinStyle
,SetLineMiterLimit
,SetLineWidth
,SetMatrix
,SetNonStrokingColorSpace
,SetRenderingIntent
,SetStrokingColorSpace
,SetTextHorizontalScaling
,SetTextLeading
,SetTextRenderingMode
,SetTextRise
,SetWordSpacing
,ShowText
,ShowTextAdjusted
,ShowTextLine
,ShowTextLineAndSpace
,StubOperator
public abstract class OperatorProcessor extends java.lang.Object
Processes a PDF operator.
-
-
Field Summary
Fields Modifier and Type Field Description protected PDFStreamEngine
context
The processing context.
-
Constructor Summary
Constructors Modifier Constructor Description protected
OperatorProcessor()
Creates a new OperatorProcessor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
checkArrayTypesClass(java.util.List<COSBase> operands, java.lang.Class<?> clazz)
Check whether all operands list elements are an instance of a specific class.protected PDFStreamEngine
getContext()
Returns the processing context.abstract java.lang.String
getName()
Returns the name of this operator, e.g.abstract void
process(Operator operator, java.util.List<COSBase> operands)
Process the operator.void
setContext(PDFStreamEngine context)
Sets the processing context.
-
-
-
Field Detail
-
context
protected PDFStreamEngine context
The processing context.
-
-
Method Detail
-
getContext
protected final PDFStreamEngine getContext()
Returns the processing context.- Returns:
- the processing context
-
setContext
public void setContext(PDFStreamEngine context)
Sets the processing context.- Parameters:
context
- the processing context.
-
process
public abstract void process(Operator operator, java.util.List<COSBase> operands) throws java.io.IOException
Process the operator.- Parameters:
operator
- the operator to processoperands
- the operands to use when processing- Throws:
java.io.IOException
- if the operator cannot be processed
-
getName
public abstract java.lang.String getName()
Returns the name of this operator, e.g. "BI".
-
checkArrayTypesClass
public boolean checkArrayTypesClass(java.util.List<COSBase> operands, java.lang.Class<?> clazz)
Check whether all operands list elements are an instance of a specific class.- Parameters:
operands
- The operands list.clazz
- The expected class.- Returns:
- the boolean
-
-