From e37c89850dcd18557d6370347b534ed24f096fc4 Mon Sep 17 00:00:00 2001 From: Evan Saulpaugh Date: Sat, 14 Sep 2024 00:19:09 -0500 Subject: [PATCH] add examples to javadoc comments --- .../java/com/esaulpaugh/headlong/abi/TupleType.java | 11 ++++++++++- .../java/com/esaulpaugh/headlong/abi/TypeFactory.java | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/esaulpaugh/headlong/abi/TupleType.java b/src/main/java/com/esaulpaugh/headlong/abi/TupleType.java index bf213ee4..c0161e68 100644 --- a/src/main/java/com/esaulpaugh/headlong/abi/TupleType.java +++ b/src/main/java/com/esaulpaugh/headlong/abi/TupleType.java @@ -77,7 +77,16 @@ public String getElementInternalType(int index) { /** * If the compiler can't infer the return type, use a type witness. - * + *

+ * From Java: + *

+     *     {@code TypeFactory.>>create("(int8)").>get(0).encode(12)}
+     * 

+ *

+ * From Kotlin: + *

+     *     {@code TypeFactory.create>>("(int8)").get>(0).encode(12)}
+     * 

* @param index * @return * @param diff --git a/src/main/java/com/esaulpaugh/headlong/abi/TypeFactory.java b/src/main/java/com/esaulpaugh/headlong/abi/TypeFactory.java index 127665b8..09145858 100644 --- a/src/main/java/com/esaulpaugh/headlong/abi/TypeFactory.java +++ b/src/main/java/com/esaulpaugh/headlong/abi/TypeFactory.java @@ -107,7 +107,16 @@ private static void mapByteArray(Map> map, String type, int a /** * If the compiler can't infer the return type, use a type witness. - * + *

+ * From Java: + *

+     *     {@code TypeFactory.>>create("(int8)").>get(0).encode(12)}
+     * 

+ *

+ * From Kotlin: + *

+     *     {@code TypeFactory.create>>("(int8)").get>(0).encode(12)}
+     * 

* @param rawType * @return * @param