public abstract class OperatorProcessor
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected PDFStreamEngine |
context
The processing context.
|
Modifier | Constructor and Description |
---|---|
protected |
OperatorProcessor()
Creates a new OperatorProcessor.
|
Modifier and Type | Method and 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.
|
protected PDFStreamEngine context
protected final PDFStreamEngine getContext()
public void setContext(PDFStreamEngine context)
context
- the processing context.public abstract void process(Operator operator, java.util.List<COSBase> operands) throws java.io.IOException
operator
- the operator to processoperands
- the operands to use when processingjava.io.IOException
- if the operator cannot be processedpublic abstract java.lang.String getName()
public boolean checkArrayTypesClass(java.util.List<COSBase> operands, java.lang.Class<?> clazz)
operands
- The operands list.clazz
- The expected class.