Skip to content

Commit

Permalink
Yet more javadoc'ing
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Jan 5, 2021
1 parent 00a8c72 commit 2493625
Show file tree
Hide file tree
Showing 9 changed files with 156 additions and 50 deletions.
16 changes: 8 additions & 8 deletions src/main/java/com/fasterxml/jackson/core/SerializableString.java
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ public interface SerializableString

/**
* Method for writing JSON-escaped UTF-8 encoded String value using given
* {@link OutputStream}.
* {@link java.io.OutputStream}.
*
* @param out {@link OutputStream} to write String into
* @param out {@link java.io.OutputStream} to write String into
*
* @return Number of bytes written
*
Expand All @@ -169,9 +169,9 @@ public interface SerializableString

/**
* Method for writing unescaped UTF-8 encoded String value using given
* {@link OutputStream}.
* {@link java.io.OutputStream}.
*
* @param out {@link OutputStream} to write String into
* @param out {@link java.io.OutputStream} to write String into
*
* @return Number of bytes written
*
Expand All @@ -181,9 +181,9 @@ public interface SerializableString

/**
* Method for appending JSON-escaped UTF-8 encoded String value into given
* {@link ByteBuffer}, if it fits.
* {@link java.nio.ByteBuffer}, if it fits.
*
* @param buffer {@link ByteBuffer} to append String into
* @param buffer {@link java.nio.ByteBuffer} to append String into
*
* @return Number of bytes put, if contents fit, otherwise -1
*
Expand All @@ -193,9 +193,9 @@ public interface SerializableString

/**
* Method for appending unquoted ('raw') UTF-8 encoded String value into given
* {@link ByteBuffer}, if it fits.
* {@link java.nio.ByteBuffer}, if it fits.
*
* @param buffer {@link ByteBuffer} to append String into
* @param buffer {@link java.nio.ByteBuffer} to append String into
*
* @return Number of bytes put, if contents fit, otherwise -1
*
Expand Down
10 changes: 9 additions & 1 deletion src/main/java/com/fasterxml/jackson/core/io/InputDecorator.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ public abstract class InputDecorator
*
* @return InputStream to use; either 'in' as is, or decorator
* version that typically delogates to 'in'
*
* @throws IOException if construction of {@link InputStream} fails
*/
public abstract InputStream decorate(IOContext ctxt, InputStream in)
throws IOException;
Expand All @@ -46,6 +48,8 @@ public abstract InputStream decorate(IOContext ctxt, InputStream in)
*
* @return Either {@link InputStream} to use as input source; or null to indicate
* that contents are to be processed as-is by caller
*
* @throws IOException if construction of {@link InputStream} fails
*/
public abstract InputStream decorate(IOContext ctxt, byte[] src, int offset, int length)
throws IOException;
Expand All @@ -65,7 +69,9 @@ public abstract InputStream decorate(IOContext ctxt, byte[] src, int offset, int
*
* @return InputStream to use; either 'input' as is, or decorator
* version that typically delogates to 'input'
*
*
* @throws IOException if construction of {@link DataInput} fails
*
* @since 2.8
*/
public DataInput decorate(IOContext ctxt, DataInput input)
Expand All @@ -86,6 +92,8 @@ public DataInput decorate(IOContext ctxt, DataInput input)
*
* @return Reader to use; either passed in argument, or something that
* calls it (for example, a {@link FilterReader})
*
* @throws IOException if construction of {@link Reader} fails
*/
public abstract Reader decorate(IOContext ctxt, Reader r) throws IOException;
}
14 changes: 14 additions & 0 deletions src/main/java/com/fasterxml/jackson/core/json/DupDetector.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,26 @@ public JsonLocation findLocation() {
}

/**
* @return Source object (parser / generator) used to construct this detector
*
* @since 2.7
*/
public Object getSource() {
return _source;
}

/**
* Method called to check whether a newly encountered property name would
* be a duplicate within this context, and if not, update the state to remember
* having seen the property name for checking more property names
*
* @param name Property seen
*
* @return {@code True} if the property had already been seen before in this context
*
* @throws JsonParseException to report possible operation problem (default implementation
* never throws it)
*/
public boolean isDup(String name) throws JsonParseException
{
if (_firstName == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ public enum JsonReadFeature
/**
* Method that calculates bit set (flags) of all features that
* are enabled by default.
*
* @return Bit mask of all features that are enabled by default
*/
public static int collectDefaults()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ public enum JsonWriteFeature
/**
* Method that calculates bit set (flags) of all features that
* are enabled by default.
*
* @return Bit mask of all features that are enabled by default
*/
public static int collectDefaults()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ protected JacksonFeatureSet(int bitmask) {
* "Default" factory which will calculate settings based on default-enabled
* status of all features.
*
* @param <F> Self-reference for convenience
* @param <F> Self-reference type for convenience
*
* @param allFeatures Set of all features (enabled or disabled): usually from {@code Enum.values()}
* @param allFeatures Set of all features (enabled or disabled): usually from
* {@code Enum.values()}
*
* @return Feature set instance constructed
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ public void setRootValueSeparator(String sep) {
/**
* @param separators Separator definitions
*
* @return This pretty-printer instance to allow call chaining
*
* @since 2.9
*/
public MinimalPrettyPrinter setSeparators(Separators separators) {
Expand Down
Loading

0 comments on commit 2493625

Please sign in to comment.