Skip to content

Commit b62a9ee

Browse files
introfogiText-CI
authored andcommitted
Improve several kernel JavaDocs
DEVSIX-4121
1 parent f23924f commit b62a9ee

File tree

10 files changed

+39
-20
lines changed

10 files changed

+39
-20
lines changed

kernel/src/main/java/com/itextpdf/kernel/numbering/RomanNumbering.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ public class RomanNumbering {
6666
/**
6767
* Returns a lower case roman representation of an integer.
6868
*
69-
* @param number a number to be converted to roman notation.
69+
* @param number a number to be converted to roman notation
70+
* @return a lower case roman representation of an integer
7071
*/
7172
public static String toRomanLowerCase(int number) {
7273
return convert(number);
@@ -75,7 +76,8 @@ public static String toRomanLowerCase(int number) {
7576
/**
7677
* Returns an upper case roman representation of an integer.
7778
*
78-
* @param number a number to be converted to roman notation.
79+
* @param number a number to be converted to roman notation
80+
* @return an upper case roman representation of an integer
7981
*/
8082
public static String toRomanUpperCase(int number) {
8183
return convert(number).toUpperCase();
@@ -84,9 +86,10 @@ public static String toRomanUpperCase(int number) {
8486
/**
8587
* Returns a roman representation of an integer.
8688
*
87-
* @param number a number to be converted to roman notation.
89+
* @param number a number to be converted to roman notation
8890
* @param upperCase <code>true</code> for upper case representation,
89-
* <code>false</code> for lower case one.
91+
* <code>false</code> for lower case one
92+
* @return a roman representation of an integer
9093
*/
9194
public static String toRoman(int number, boolean upperCase) {
9295
return upperCase ? toRomanUpperCase(number) : toRomanLowerCase(number);

kernel/src/main/java/com/itextpdf/kernel/pdf/PdfPage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,8 +1194,8 @@ public void addAssociatedFile(PdfFileSpec fs) {
11941194
/**
11951195
* Returns files associated with PDF page.
11961196
*
1197-
* @param create iText will create AF array if it doesn't exist and create value is true
1198-
* @return associated files array.
1197+
* @param create defines whether AF arrays will be created if it doesn't exist
1198+
* @return associated files array
11991199
*/
12001200
public PdfArray getAssociatedFiles(boolean create) {
12011201
PdfArray afArray = getPdfObject().getAsArray(PdfName.AF);

kernel/src/main/java/com/itextpdf/kernel/pdf/annot/PdfAnnotation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,8 +1094,8 @@ public void addAssociatedFile(PdfFileSpec fs) {
10941094
/**
10951095
* Returns files associated with PDF annotation.
10961096
*
1097-
* @param create iText will create AF array if it doesn't exist and create value is true
1098-
* @return associated files array.
1097+
* @param create defines whether AF arrays will be created if it doesn't exist
1098+
* @return associated files array
10991099
*/
11001100
public PdfArray getAssociatedFiles(boolean create) {
11011101
PdfArray afArray = getPdfObject().getAsArray(PdfName.AF);

kernel/src/main/java/com/itextpdf/kernel/pdf/canvas/CanvasGraphicsState.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,14 @@ public Matrix getCtm() {
164164

165165
/**
166166
* Updates current transformation matrix.
167+
* The third column will always be [0 0 1]
168+
*
169+
* @param a element at (1,1) of the transformation matrix
170+
* @param b element at (1,2) of the transformation matrix
171+
* @param c element at (2,1) of the transformation matrix
172+
* @param d element at (2,2) of the transformation matrix
173+
* @param e element at (3,1) of the transformation matrix
174+
* @param f element at (3,2) of the transformation matrix
167175
*/
168176
public void updateCtm(float a, float b, float c, float d, float e, float f) {
169177
updateCtm(new Matrix(a, b, c, d, e, f));

kernel/src/main/java/com/itextpdf/kernel/pdf/tagging/PdfStructElem.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,8 +475,8 @@ public void addAssociatedFile(PdfFileSpec fs) {
475475
/**
476476
* Returns files associated with structure element.
477477
*
478-
* @param create iText will create AF array if it doesn't exist and create value is true
479-
* @return associated files array.
478+
* @param create defines whether AF arrays will be created if it doesn't exist
479+
* @return associated files array
480480
*/
481481
public PdfArray getAssociatedFiles(boolean create) {
482482
PdfArray afArray = getPdfObject().getAsArray(PdfName.AF);

kernel/src/main/java/com/itextpdf/kernel/pdf/tagging/PdfStructTreeRoot.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,8 +440,8 @@ public void addAssociatedFile(PdfFileSpec fs) {
440440
/**
441441
* Returns files associated with structure tree root.
442442
*
443-
* @param create iText will create AF array if it doesn't exist and create value is true
444-
* @return associated files array.
443+
* @param create defines whether AF arrays will be created if it doesn't exist
444+
* @return associated files array
445445
*/
446446
public PdfArray getAssociatedFiles(boolean create) {
447447
PdfArray afArray = getPdfObject().getAsArray(PdfName.AF);

kernel/src/main/java/com/itextpdf/kernel/pdf/tagutils/TagStructureContext.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,10 @@ public IRoleMappingResolver resolveMappingToStandardOrDomainSpecificRole(String
316316
/**
317317
* Removes annotation content item from the tag structure.
318318
* If annotation is not added to the document or is not tagged, nothing will happen.
319+
*
320+
* @param annotation the {@link PdfAnnotation} that will be removed from the tag structure
319321
* @return {@link TagTreePointer} instance which points at annotation tag parent if annotation was removed,
320-
* otherwise returns null.
322+
* otherwise returns null
321323
*/
322324
public TagTreePointer removeAnnotationTag(PdfAnnotation annotation) {
323325
PdfStructElem structElem = null;
@@ -365,8 +367,9 @@ public TagTreePointer removeContentItem(PdfPage page, int mcid) {
365367
/**
366368
* Removes all tags that belong only to this page. The logic which defines if tag belongs to the page is described
367369
* at {@link #flushPageTags(PdfPage)}.
370+
*
368371
* @param page page that defines which tags are to be removed
369-
* @return current {@link TagStructureContext} instance.
372+
* @return current {@link TagStructureContext} instance
370373
*/
371374
public TagStructureContext removePageTags(PdfPage page) {
372375
PdfStructTreeRoot structTreeRoot = document.getStructTreeRoot();
@@ -392,7 +395,9 @@ public TagStructureContext removePageTags(PdfPage page) {
392395
* <br><br>
393396
* If some of the page's tags have waiting state (see {@link WaitingTagsManager} these tags are considered
394397
* as not yet finished ones, and they and their children won't be flushed.
395-
* @param page a page which tags will be flushed.
398+
*
399+
* @param page a page which tags will be flushed
400+
* @return current {@link TagStructureContext} instance
396401
*/
397402
public TagStructureContext flushPageTags(PdfPage page) {
398403
PdfStructTreeRoot structTreeRoot = document.getStructTreeRoot();

kernel/src/main/java/com/itextpdf/kernel/pdf/tagutils/TagTreePointer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ public PdfPage getCurrentPage() {
168168
* NOTE: It's important to set a {@code null} for this value, when tagging of this stream content is finished.
169169
*
170170
* @param contentStream the content stream which content will be tagged with this instance of {@code TagTreePointer}
171-
* or {@code null} if content stream tagging is finished.
171+
* or {@code null} if content stream tagging is finished
172+
* @return current {@link TagTreePointer} instance
172173
*/
173174
public TagTreePointer setContentStreamForTagging(PdfStream contentStream) {
174175
this.contentStream = contentStream;

kernel/src/main/java/com/itextpdf/kernel/pdf/xobject/PdfTransparencyGroup.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ public PdfTransparencyGroup() {
6161

6262
/**
6363
* Determining the initial backdrop against which its stack is composited.
64-
* @param isolated
64+
*
65+
* @param isolated defines whether the {@link PdfName#I} flag will be set or removed
6566
*/
6667
public void setIsolated(boolean isolated) {
6768
if (isolated) {
@@ -73,7 +74,8 @@ public void setIsolated(boolean isolated) {
7374

7475
/**
7576
* Determining whether the objects within the stack are composited with one another or only with the group's backdrop.
76-
* @param knockout
77+
*
78+
* @param knockout defines whether the {@link PdfName#K} flag will be set or removed
7779
*/
7880
public void setKnockout(boolean knockout) {
7981
if (knockout) {

kernel/src/main/java/com/itextpdf/kernel/pdf/xobject/PdfXObject.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,9 @@ public void addAssociatedFile(PdfFileSpec fs) {
138138
/**
139139
* Returns files associated with XObject.
140140
*
141-
* @return associated files array.
141+
* @param create defines whether AF arrays will be created if it doesn't exist
142+
* @return associated files array
142143
*/
143-
144144
public PdfArray getAssociatedFiles(boolean create) {
145145
PdfArray afArray = getPdfObject().getAsArray(PdfName.AF);
146146
if (afArray == null && create) {

0 commit comments

Comments
 (0)