summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorBill Yi <byi@google.com>2015-02-19 14:31:25 -0800
committerBill Yi <byi@google.com>2015-02-19 14:31:25 -0800
commitba4c97c2d3811c60ad95627927ad2fc72406fb27 (patch)
tree34f42e05de89c57c8dd268f329e3ecb6625b2161 /java
parent72b0f4cfbb910909f953c52ba7d097a6b3904cbb (diff)
parent7304898f86cd6b2e525772e9cda4ba686b7d3fd2 (diff)
downloadexternal_protobuf-ba4c97c2d3811c60ad95627927ad2fc72406fb27.zip
external_protobuf-ba4c97c2d3811c60ad95627927ad2fc72406fb27.tar.gz
external_protobuf-ba4c97c2d3811c60ad95627927ad2fc72406fb27.tar.bz2
Merge commit '7304898f86cd6b2e525772e9cda4ba686b7d3fd2' into HEAD
Diffstat (limited to 'java')
-rw-r--r--java/src/main/java/com/google/protobuf/nano/Extension.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/java/src/main/java/com/google/protobuf/nano/Extension.java b/java/src/main/java/com/google/protobuf/nano/Extension.java
index b4d3eb0..6e2202e 100644
--- a/java/src/main/java/com/google/protobuf/nano/Extension.java
+++ b/java/src/main/java/com/google/protobuf/nano/Extension.java
@@ -74,6 +74,19 @@ public class Extension<M extends ExtendableMessageNano<M>, T> {
public static final int TYPE_SINT32 = 17;
public static final int TYPE_SINT64 = 18;
+ /**
+ * Creates an {@code Extension} of the given message type and tag number.
+ * Should be used by the generated code only.
+ *
+ * @param type {@link #TYPE_MESSAGE} or {@link #TYPE_GROUP}
+ * @deprecated use {@link #createMessageTyped(int, Class, long)} instead.
+ */
+ @Deprecated
+ public static <M extends ExtendableMessageNano<M>, T extends MessageNano>
+ Extension<M, T> createMessageTyped(int type, Class<T> clazz, int tag) {
+ return new Extension<M, T>(type, clazz, tag, false);
+ }
+
// Note: these create...() methods take a long for the tag parameter,
// because tags are represented as unsigned ints, and these values exist
// in generated code as long values. However, they can fit in 32-bits, so