Fix some Java 8 javadoc warnings

This commit is contained in:
Sean Owen 2014-04-13 13:11:00 +01:00
parent 8ab6a1b902
commit c2b7384286
6 changed files with 65 additions and 3 deletions

View file

@ -250,6 +250,9 @@ public class IntentIntegrator {
/**
* Initiates a scan for all known barcode types.
*
* @return the {@link AlertDialog} that was shown to the user prompting them to download the app
* if a prompt was needed, or null otherwiseo
*/
public final AlertDialog initiateScan() {
return initiateScan(ALL_CODE_TYPES);
@ -260,6 +263,7 @@ public class IntentIntegrator {
* to their names in ZXing's {@code BarcodeFormat} class like "UPC_A". You can supply constants
* like {@link #PRODUCT_CODE_TYPES} for example.
*
* @param desiredBarcodeFormats names of {@code BarcodeFormat}s to scan for
* @return the {@link AlertDialog} that was shown to the user prompting them to download the app
* if a prompt was needed, or null otherwise
*/
@ -371,6 +375,9 @@ public class IntentIntegrator {
* <p>Call this from your {@link Activity}'s
* {@link Activity#onActivityResult(int, int, Intent)} method.</p>
*
* @param requestCode request code from {@code onActivityResult()}
* @param resultCode result code from {@code onActivityResult()}
* @param intent {@link Intent} from {@code onActivityResult()}
* @return null if the event handled here was not related to this class, or
* else an {@link IntentResult} containing the result of the scan. If the user cancelled scanning,
* the fields will be null.
@ -398,6 +405,10 @@ public class IntentIntegrator {
/**
* Defaults to type "TEXT_TYPE".
*
* @param text the text string to encode as a barcode
* @return the {@link AlertDialog} that was shown to the user prompting them to download the app
* if a prompt was needed, or null otherwise
* @see #shareText(CharSequence, CharSequence)
*/
public final AlertDialog shareText(CharSequence text) {

View file

@ -60,6 +60,10 @@ public final class HttpHelper {
/**
* Downloads the entire resource instead of part.
*
* @param uri URI to retrieve
* @param type expected text-like MIME type of that content
* @return content as a {@code String}
* @throws IOException if the content can't be retrieved because of a bad URI, network problem, etc.
* @see #downloadViaHttp(String, HttpHelper.ContentType, int)
*/
public static CharSequence downloadViaHttp(String uri, ContentType type) throws IOException {

View file

@ -109,6 +109,7 @@ public final class LocaleManager {
private LocaleManager() {}
/**
* @param context application's {@link Context}
* @return country-specific TLD suffix appropriate for the current default locale
* (e.g. "co.uk" for the United Kingdom)
*/
@ -118,6 +119,8 @@ public final class LocaleManager {
/**
* The same as above, but specifically for Google Product Search.
*
* @param context application's {@link Context}
* @return The top-level domain to use.
*/
public static String getProductSearchCountryTLD(Context context) {
@ -126,6 +129,8 @@ public final class LocaleManager {
/**
* The same as above, but specifically for Google Book Search.
*
* @param context application's {@link Context}
* @return The top-level domain to use.
*/
public static String getBookSearchCountryTLD(Context context) {

View file

@ -164,6 +164,8 @@ public final class CameraManager {
/**
* Convenience method for {@link com.google.zxing.client.android.CaptureActivity}
*
* @param newSetting if {@code true}, light should be turned on if currently off. And vice versa.
*/
public synchronized void setTorch(boolean newSetting) {
if (newSetting != configManager.getTorchState(camera)) {
@ -238,6 +240,8 @@ public final class CameraManager {
/**
* Like {@link #getFramingRect} but coordinates are in terms of the preview frame,
* not UI / screen.
*
* @return {@link Rect} expressing barcode scan area in terms of the preview size
*/
public synchronized Rect getFramingRectInPreview() {
if (framingRectInPreview == null) {

View file

@ -28,6 +28,8 @@ public final class OpenCameraInterface {
/**
* Opens a rear-facing camera with {@link Camera#open(int)}, if one exists, or opens camera 0.
*
* @return handle to {@link Camera} that was opened
*/
public static Camera open() {

View file

@ -40,7 +40,10 @@ public final class MatrixToImageWriter {
/**
* Renders a {@link BitMatrix} as an image, where "false" bits are rendered
* as white, and "true" bits are rendered as black.
* as white, and "true" bits are rendered as black. Uses default configuration.
*
* @param matrix {@link BitMatrix} to write
* @return {@link BufferedImage} representation of the input
*/
public static BufferedImage toBufferedImage(BitMatrix matrix) {
return toBufferedImage(matrix, DEFAULT_CONFIG);
@ -48,6 +51,10 @@ public final class MatrixToImageWriter {
/**
* As {@link #toBufferedImage(BitMatrix)}, but allows customization of the output.
*
* @param matrix {@link BitMatrix} to write
* @param config output configuration
* @return {@link BufferedImage} representation of the input
*/
public static BufferedImage toBufferedImage(BitMatrix matrix, MatrixToImageConfig config) {
int width = matrix.getWidth();
@ -64,6 +71,10 @@ public final class MatrixToImageWriter {
}
/**
* @param matrix {@link BitMatrix} to write
* @param format image format
* @param file file {@link File} to write image to
* @throws IOException if writes to the file fail
* @deprecated use {@link #writeToPath(BitMatrix, String, Path)}
*/
@Deprecated
@ -72,8 +83,12 @@ public final class MatrixToImageWriter {
}
/**
* Writes a {@link BitMatrix} to a file.
* Writes a {@link BitMatrix} to a file with default configuration.
*
* @param matrix {@link BitMatrix} to write
* @param format image format
* @param file file {@link Path} to write image to
* @throws IOException if writes to the stream fail
* @see #toBufferedImage(BitMatrix)
*/
public static void writeToPath(BitMatrix matrix, String format, Path file) throws IOException {
@ -81,6 +96,11 @@ public final class MatrixToImageWriter {
}
/**
* @param matrix {@link BitMatrix} to write
* @param format image format
* @param file file {@link File} to write image to
* @param config output configuration
* @throws IOException if writes to the file fail
* @deprecated use {@link #writeToPath(BitMatrix, String, Path, MatrixToImageConfig)}
*/
@Deprecated
@ -91,6 +111,12 @@ public final class MatrixToImageWriter {
/**
* As {@link #writeToFile(BitMatrix, String, File)}, but allows customization of the output.
*
* @param matrix {@link BitMatrix} to write
* @param format image format
* @param file file {@link Path} to write image to
* @param config output configuration
* @throws IOException if writes to the file fail
*/
public static void writeToPath(BitMatrix matrix, String format, Path file, MatrixToImageConfig config)
throws IOException {
@ -101,8 +127,12 @@ public final class MatrixToImageWriter {
}
/**
* Writes a {@link BitMatrix} to a stream.
* Writes a {@link BitMatrix} to a stream with default configuration.
*
* @param matrix {@link BitMatrix} to write
* @param format image format
* @param stream {@link OutputStream} to write image to
* @throws IOException if writes to the stream fail
* @see #toBufferedImage(BitMatrix)
*/
public static void writeToStream(BitMatrix matrix, String format, OutputStream stream) throws IOException {
@ -111,6 +141,12 @@ public final class MatrixToImageWriter {
/**
* As {@link #writeToStream(BitMatrix, String, OutputStream)}, but allows customization of the output.
*
* @param matrix {@link BitMatrix} to write
* @param format image format
* @param stream {@link OutputStream} to write image to
* @param config output configuration
* @throws IOException if writes to the stream fail
*/
public static void writeToStream(BitMatrix matrix, String format, OutputStream stream, MatrixToImageConfig config)
throws IOException {