prompto.remoting.RemoteArgumentList Maven / Gradle / Ivy
The newest version!
package prompto.remoting;
import java.io.IOException;
import java.io.StringWriter;
import java.io.Writer;
import java.net.URLEncoder;
import java.security.InvalidParameterException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.fasterxml.jackson.core.JsonFactory;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import prompto.error.PromptoError;
import prompto.grammar.ArgumentList;
import prompto.runtime.Context;
@SuppressWarnings("serial")
public class RemoteArgumentList extends ArrayList {
public ArgumentList toArguments(Context context) {
return new ArgumentList(
this.stream()
.map((param)->
param.toAssignment(context))
.collect(Collectors.toList()));
}
public Class>[] toJavaTypes(Context context, ClassLoader classLoader) {
List> list = this.stream()
.map((param)->
param.toJavaType(context, classLoader))
.collect(Collectors.toList());
return list.toArray(new Class>[list.size()]);
}
public Object[] toJavaValues(Context context) {
List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy