@Test public void testDecodeMultipleStringValues() { Function function = new Function("function", Collections.<Type>emptyList(), Arrays.asList( new TypeReference<Utf8String>() { }, new TypeReference<Utf8String>() { }, new TypeReference<Utf8String>() { }, new TypeReference<Utf8String>() { })); assertThat(FunctionReturnDecoder.decode( "0x0000000000000000000000000000000000000000000000000000000000000080" + "00000000000000000000000000000000000000000000000000000000000000c0" + "0000000000000000000000000000000000000000000000000000000000000100" + "0000000000000000000000000000000000000000000000000000000000000140" + "0000000000000000000000000000000000000000000000000000000000000004" + "6465663100000000000000000000000000000000000000000000000000000000" + "0000000000000000000000000000000000000000000000000000000000000004" + "6768693100000000000000000000000000000000000000000000000000000000" + "0000000000000000000000000000000000000000000000000000000000000004" + "6a6b6c3100000000000000000000000000000000000000000000000000000000" + "0000000000000000000000000000000000000000000000000000000000000004" + "6d6e6f3200000000000000000000000000000000000000000000000000000000", function.getOutputParameters()), equalTo(Arrays.asList( new Utf8String("def1"), new Utf8String("ghi1"), new Utf8String("jkl1"), new Utf8String("mno2")))); }
public static List<Type> decode( String rawInput, List<TypeReference<Type>> outputParameters) { String input = Numeric.cleanHexPrefix(rawInput); if (input.isEmpty()) { return Collections.emptyList(); } else { return build(input, outputParameters); } }
FunctionReturnDecoder { public static List<Type> decode( String rawInput, List<TypeReference<Type>> outputParameters) { String input = Numeric.cleanHexPrefix(rawInput); if (input.isEmpty()) { return Collections.emptyList(); } else { return build(input, outputParameters); } } }
FunctionReturnDecoder { public static List<Type> decode( String rawInput, List<TypeReference<Type>> outputParameters) { String input = Numeric.cleanHexPrefix(rawInput); if (input.isEmpty()) { return Collections.emptyList(); } else { return build(input, outputParameters); } } private  FunctionReturnDecoder(); }
FunctionReturnDecoder { public static List<Type> decode( String rawInput, List<TypeReference<Type>> outputParameters) { String input = Numeric.cleanHexPrefix(rawInput); if (input.isEmpty()) { return Collections.emptyList(); } else { return build(input, outputParameters); } } private  FunctionReturnDecoder(); static List<Type> decode(
            String rawInput, List<TypeReference<Type>> outputParameters); @SuppressWarnings("unchecked") static Type decodeIndexedValue(
            String rawInput, TypeReference<T> typeReference); }
FunctionReturnDecoder { public static List<Type> decode( String rawInput, List<TypeReference<Type>> outputParameters) { String input = Numeric.cleanHexPrefix(rawInput); if (input.isEmpty()) { return Collections.emptyList(); } else { return build(input, outputParameters); } } private  FunctionReturnDecoder(); static List<Type> decode(
            String rawInput, List<TypeReference<Type>> outputParameters); @SuppressWarnings("unchecked") static Type decodeIndexedValue(
            String rawInput, TypeReference<T> typeReference);  }