Skip to content

Commit

Permalink
add examples to javadoc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
esaulpaugh committed Sep 14, 2024
1 parent a81ccf5 commit e37c898
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
11 changes: 10 additions & 1 deletion src/main/java/com/esaulpaugh/headlong/abi/TupleType.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,16 @@ public String getElementInternalType(int index) {

/**
* If the compiler can't infer the return type, use a type witness.
*
* <p>
* From Java:
* <blockquote><pre>
* {@code TypeFactory.<TupleType<Single<Integer>>>create("(int8)").<ABIType<Integer>>get(0).encode(12)}
* </pre></blockquote><p>
* <p>
* From Kotlin:
* <blockquote><pre>
* {@code TypeFactory.create<TupleType<Single<Int>>>("(int8)").get<ABIType<Int>>(0).encode(12)}
* </pre></blockquote><p>
* @param index
* @return
* @param <T>
Expand Down
11 changes: 10 additions & 1 deletion src/main/java/com/esaulpaugh/headlong/abi/TypeFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,16 @@ private static void mapByteArray(Map<String, ABIType<?>> map, String type, int a

/**
* If the compiler can't infer the return type, use a type witness.
*
* <p>
* From Java:
* <blockquote><pre>
* {@code TypeFactory.<TupleType<Single<Integer>>>create("(int8)").<ABIType<Integer>>get(0).encode(12)}
* </pre></blockquote><p>
* <p>
* From Kotlin:
* <blockquote><pre>
* {@code TypeFactory.create<TupleType<Single<Int>>>("(int8)").get<ABIType<Int>>(0).encode(12)}
* </pre></blockquote><p>
* @param rawType
* @return
* @param <T>
Expand Down

0 comments on commit e37c898

Please sign in to comment.