/** * Creates clone of the object which belongs to the same document as original object. * New object shall not be used in other documents. * * @return cloned object. */ @SuppressWarnings("CloneDoesntCallSuperClone") @Override public PdfObject clone() { PdfObject newObject = newInstance(); if (indirectReference != null || checkState(MUST_BE_INDIRECT)) { newObject.setState(MUST_BE_INDIRECT); } newObject.copyContent(this, null); return newObject; }
PdfObject newObject = obj.newInstance(); if (indirectReference != null) { if (copiedObjectKey == null) {