From 04ac958649f134cbc595c0f8c6086efa998edd4f Mon Sep 17 00:00:00 2001 From: srowen Date: Tue, 6 Nov 2007 19:07:08 +0000 Subject: [PATCH] More javadoc git-svn-id: http://zxing.googlecode.com/svn/trunk@10 59b500cc-1b3d-0410-9834-0bbf25fbcc57 --- core/src/com/google/zxing/BarcodeFormat.java | 5 +++++ core/src/com/google/zxing/DecodeHintType.java | 2 +- core/src/com/google/zxing/MultiFormatReader.java | 8 +++++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/core/src/com/google/zxing/BarcodeFormat.java b/core/src/com/google/zxing/BarcodeFormat.java index d7a1c906..66c3e078 100644 --- a/core/src/com/google/zxing/BarcodeFormat.java +++ b/core/src/com/google/zxing/BarcodeFormat.java @@ -25,8 +25,13 @@ public final class BarcodeFormat { // No, we can't use an enum here. J2ME doesn't support it. + /** UPC 1D barcode format family. */ public static final BarcodeFormat UPC = new BarcodeFormat(); + /** QR Code 2D barcode format */ public static final BarcodeFormat QR_CODE = new BarcodeFormat(); + /** DataMatrix 2D barcode format */ public static final BarcodeFormat DATAMATRIX = new BarcodeFormat(); + + private BarcodeFormat() {} } \ No newline at end of file diff --git a/core/src/com/google/zxing/DecodeHintType.java b/core/src/com/google/zxing/DecodeHintType.java index 9c7755ab..c4bfe5d9 100644 --- a/core/src/com/google/zxing/DecodeHintType.java +++ b/core/src/com/google/zxing/DecodeHintType.java @@ -22,7 +22,7 @@ package com.google.zxing; * if anything, to do with the information that is supplied. * * @author srowen@google.com (Sean Owen), dswitkin@google.com (Daniel Switkin) - * @see Reader#decode(MonochromeBitmapSource, java.util.Map) + * @see Reader#decode(MonochromeBitmapSource, java.util.Hashtable) */ public final class DecodeHintType { diff --git a/core/src/com/google/zxing/MultiFormatReader.java b/core/src/com/google/zxing/MultiFormatReader.java index d19cc941..1f78c869 100644 --- a/core/src/com/google/zxing/MultiFormatReader.java +++ b/core/src/com/google/zxing/MultiFormatReader.java @@ -21,7 +21,11 @@ import com.google.zxing.qrcode.QRCodeReader; import java.util.Hashtable; /** - * For now, only delegates to {@link QRCodeReader}. + *

This implementation can detect barcodes in one of several formats within + * an image, and then decode what it finds. This implementation supports all + * barcode formats that this library supports.

+ * + *

For now, only delegates to {@link QRCodeReader}.

* * @author srowen@google.com (Sean Owen), dswitkin@google.com (Daniel Switkin) */ @@ -35,6 +39,8 @@ public final class MultiFormatReader implements Reader { throws ReaderException { Hashtable possibleFormats = hints == null ? null : (Hashtable) hints.get(DecodeHintType.POSSIBLE_FORMATS); + // TODO for now we are only support QR Code so this behaves accordingly. This needs to + // become more sophisticated if (possibleFormats == null || possibleFormats.contains(BarcodeFormat.QR_CODE)) { return new QRCodeReader().decode(image, hints); } else { -- 2.20.1