Package org.apache.pdfbox.preflight
Class PreflightPath
java.lang.Object
org.apache.pdfbox.preflight.PreflightPath
Contains a stack of objects to follow the validation path. Examples:
- If the ValidationProcess computes a Type1Font, this object could contain a path like PDPage|PDResources|PDFont.
- If the ValidationProcess computes an XObject, this object could contain a path like PDPage|PDResources|PDFontType3|PDResource|PDXObject.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()<T> TgetClosestPathElement(Class<T> type) <T> intgetClosestTypePosition(Class<T> type) Return the index of the first object that have the given type.<T> TgetPathElement(int position, Class<T> expectedType) Return the object at the given position.booleanisEmpty()booleanisExpectedType(Class<?> type) peek()Looks at the object at the top of this stack without removing it from the stack.pop()booleanpushObject(Object pathElement) intsize()
-
Field Details
-
objectPath
-
classObjPath
-
-
Constructor Details
-
PreflightPath
public PreflightPath()
-
-
Method Details
-
pushObject
-
getPathElement
Return the object at the given position. The object must be an instance of the given class.- Parameters:
position-expectedType-- Returns:
- the object at the given position.
-
getClosestTypePosition
Return the index of the first object that have the given type.- Parameters:
type-- Returns:
- the object position, -1 if the type doesn't exist in the stack.
-
getClosestPathElement
-
peek
Looks at the object at the top of this stack without removing it from the stack.- Returns:
- the object at the top of the stack.
-
pop
-
clear
public void clear() -
size
public int size() -
isEmpty
public boolean isEmpty() -
isExpectedType
-