Skip to content

Commit 40cdc89

Browse files
committed
Improve documentation
1 parent 75ff468 commit 40cdc89

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

src/main/java/com/marcospassos/phpserializer/Writer.java

+15
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ public class Writer
2828
*/
2929
private WriterState state;
3030

31+
/**
32+
* The current sub writer.
33+
*/
3134
private Writer subWriter;
3235

3336
/**
@@ -66,6 +69,15 @@ public String getResult()
6669
*
6770
* @return A writer to be used to custom write the serializable object.
6871
*/
72+
73+
/**
74+
* Writes the start of an object to the buffer and returns an object-level
75+
* sub writer.
76+
*
77+
* @param className The fully-qualified name of the class.
78+
*
79+
* @return An object-level sub writer to write the object's data.
80+
*/
6981
public Writer writeSerializableObjectStart(String className)
7082
{
7183
setState(state.serializableBegin());
@@ -81,6 +93,9 @@ public Writer writeSerializableObjectStart(String className)
8193
return subWriter;
8294
}
8395

96+
/**
97+
* Writes the end of a serializable object to the buffer.
98+
*/
8499
void writeSerializableObjectEnd() {
85100
setState(state.serializableEnd());
86101

src/main/java/com/marcospassos/phpserializer/state/WritingSerializableObjectState.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import com.marcospassos.phpserializer.WriterState;
55

66
/**
7-
* Represents the state of the writer while writing an object.
7+
* Represents the state of the writer while writing a serializable object.
88
*
99
* @author Marcos Passos
1010
* @since 1.0

0 commit comments

Comments
 (0)