org.apache.pdfbox.contentstream.operator

## Class OperatorProcessor

- java.lang.Object
- - org.apache.pdfbox.contentstream.operator.OperatorProcessor

Direct Known Subclasses:
  BeginMarkedContentSequence, BeginMarkedContentSequenceWithProperties, BeginText, Concatenate, DrawObject, DrawObject, EndMarkedContentSequence, EndText, GraphicsOperatorProcessor, MarkedContentPoint, MarkedContentPointWithProperties, 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

    public abstract class OperatorProcessor
    extends Object

Processes a PDF operator.

Author:
  Laurent Huault

### Constructor Summary

Constructors
`protected` `OperatorProcessor(PDFStreamEngine context)` Creates a new OperatorProcessor.

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`boolean` `checkArrayTypesClass(List<COSBase> operands, Class<?> clazz)` Check whether all operands list elements are an instance of a specific class.
`protected PDFStreamEngine` `getContext()` Returns the processing context.
`abstract String` `getName()` Returns the name of this operator, e.g.
`abstract void` `process(Operator operator, List<COSBase> operands)` Process the operator.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### OperatorProcessor

    protected OperatorProcessor(PDFStreamEngine context)

Creates a new OperatorProcessor.

Parameters:
  `context` - the processing context to be used

### Method Detail

#### getContext

    protected final PDFStreamEngine getContext()

Returns the processing context.

Returns:
  the processing context

#### process

    public abstract void process(Operator operator,
                                 List<COSBase> operands)
                          throws IOException

Process the operator.

Parameters:
  `operator` - the operator to process
  `operands` - the operands to use when processing
Throws:
  `IOException` - if the operator cannot be processed

#### getName

    public abstract String getName()

Returns the name of this operator, e.g. "BI".

Returns:
  the name of the operator

#### checkArrayTypesClass

    public boolean checkArrayTypesClass(List<COSBase> operands,
                                        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:
  true if all operands list elements are an instance of the given class