Skip to content

Commit

Permalink
Improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
marcospassos committed Jul 9, 2017
1 parent 75ff468 commit 40cdc89
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions src/main/java/com/marcospassos/phpserializer/Writer.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ public class Writer
*/
private WriterState state;

/**
* The current sub writer.
*/
private Writer subWriter;

/**
Expand Down Expand Up @@ -66,6 +69,15 @@ public String getResult()
*
* @return A writer to be used to custom write the serializable object.
*/

/**
* Writes the start of an object to the buffer and returns an object-level
* sub writer.
*
* @param className The fully-qualified name of the class.
*
* @return An object-level sub writer to write the object's data.
*/
public Writer writeSerializableObjectStart(String className)
{
setState(state.serializableBegin());
Expand All @@ -81,6 +93,9 @@ public Writer writeSerializableObjectStart(String className)
return subWriter;
}

/**
* Writes the end of a serializable object to the buffer.
*/
void writeSerializableObjectEnd() {
setState(state.serializableEnd());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import com.marcospassos.phpserializer.WriterState;

/**
* Represents the state of the writer while writing an object.
* Represents the state of the writer while writing a serializable object.
*
* @author Marcos Passos
* @since 1.0
Expand Down

0 comments on commit 40cdc89

Please sign in to comment.