org.apache.pdfbox.pdmodel.common.function.type4
Class ExecutionContext

java.lang.Object
  extended by org.apache.pdfbox.pdmodel.common.function.type4.ExecutionContext

public class ExecutionContext
extends Object

Makes up the execution context, holding the available operators and the execution stack.

Version:
$Revision$

Constructor Summary
ExecutionContext(Operators operatorSet)
          Creates a new execution context.
 
Method Summary
 Operators getOperators()
          Returns the operator set used by this execution context.
 Stack<Object> getStack()
          Returns the stack used by this execution context.
 int popInt()
          Pops a value of type int from the stack.
 Number popNumber()
          Pops a number (int or real) from the stack.
 float popReal()
          Pops a number from the stack and returns it as a real value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecutionContext

public ExecutionContext(Operators operatorSet)
Creates a new execution context.

Parameters:
operatorSet - the operator set
Method Detail

getStack

public Stack<Object> getStack()
Returns the stack used by this execution context.

Returns:
the stack

getOperators

public Operators getOperators()
Returns the operator set used by this execution context.

Returns:
the operator set

popNumber

public Number popNumber()
Pops a number (int or real) from the stack. If it's neither data type, a ClassCastException is thrown.

Returns:
the number

popInt

public int popInt()
Pops a value of type int from the stack. If the value is not of type int, a ClassCastException is thrown.

Returns:
the int value

popReal

public float popReal()
Pops a number from the stack and returns it as a real value. If the value is not of a numeric type, a ClassCastException is thrown.

Returns:
the real value


Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.