本文整理汇总了Java中argo.jdom.JsonNode.isArrayNode方法的典型用法代码示例。如果您正苦于以下问题:Java JsonNode.isArrayNode方法的具体用法?Java JsonNode.isArrayNode怎么用?Java JsonNode.isArrayNode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类argo.jdom.JsonNode
的用法示例。
在下文中一共展示了JsonNode.isArrayNode方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parseCompilerSpecificArgs
import argo.jdom.JsonNode; //导入方法依赖的package包/类
@Override
public boolean parseCompilerSpecificArgs(JsonNode node) {
if (!node.isArrayNode("classpath")) {
return false;
}
List<String> paths = new ArrayList<>();
JSONUtility.addAllJson(node.getArrayNode("classpath"), new Function<JsonNode, String>(){
@Override
public String apply(JsonNode d) {
return d.getStringValue().toString();
}
}, paths);
// Override current class paths
classPaths = paths.toArray(classPaths);
try {
applyClassPath();
} catch (MalformedURLException | NoSuchMethodException | SecurityException |
IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
getLogger().log(Level.WARNING, "Unable to apply class path.", e);
return false;
}
return true;
}
示例2: func_98163_a
import argo.jdom.JsonNode; //导入方法依赖的package包/类
public static McoServer func_98163_a(JsonNode p_98163_0_) {
McoServer var1 = new McoServer();
try {
var1.field_96408_a = Long.parseLong(p_98163_0_.getNumberValue(new Object[]{"id"}));
var1.field_96406_b = p_98163_0_.getStringValue(new Object[]{"name"});
var1.field_96407_c = p_98163_0_.getStringValue(new Object[]{"motd"});
var1.field_96404_d = p_98163_0_.getStringValue(new Object[]{"state"});
var1.field_96405_e = p_98163_0_.getStringValue(new Object[]{"owner"});
if(p_98163_0_.isArrayNode(new Object[]{"invited"})) {
var1.field_96402_f = func_98164_a(p_98163_0_.getArrayNode(new Object[]{"invited"}));
} else {
var1.field_96402_f = new ArrayList();
}
var1.field_104063_i = Integer.parseInt(p_98163_0_.getNumberValue(new Object[]{"daysLeft"}));
var1.field_96403_g = p_98163_0_.getStringValue(new Object[]{"ip"});
var1.field_98166_h = p_98163_0_.getBooleanValue(new Object[]{"expired"}).booleanValue();
var1.field_110729_i = Integer.parseInt(p_98163_0_.getNumberValue(new Object[]{"difficulty"}));
var1.field_110728_j = Integer.parseInt(p_98163_0_.getNumberValue(new Object[]{"gameMode"}));
} catch (IllegalArgumentException var3) {
;
}
return var1;
}
示例3: verifyMessageContent
import argo.jdom.JsonNode; //导入方法依赖的package包/类
@Override
protected boolean verifyMessageContent(JsonNode content) {
return content.isStringValue("device") &&
content.isStringValue("action") &&
content.isArrayNode("parameters") &&
content.getStringValue("device").equals(DEVICE_NAME);
}
示例4: verifyMessageContent
import argo.jdom.JsonNode; //导入方法依赖的package包/类
@Override
protected boolean verifyMessageContent(JsonNode content) {
return content.isStringValue("device") &&
content.getStringValue("device").startsWith("system") &&
content.isStringValue("action") &&
content.isArrayNode("parameters");
}
示例5: verifyMessageContent
import argo.jdom.JsonNode; //导入方法依赖的package包/类
@Override
protected boolean verifyMessageContent(JsonNode content) {
return content.isStringValue("device") &&
(content.getStringValue("device").equals("mouse") ||
content.getStringValue("device").equals("keyboard")) &&
content.isStringValue("action") &&
content.isArrayNode("parameters");
}
示例6: func_98163_a
import argo.jdom.JsonNode; //导入方法依赖的package包/类
public static McoServer func_98163_a(JsonNode par0JsonNode)
{
McoServer mcoserver = new McoServer();
try
{
mcoserver.field_96408_a = Long.parseLong(par0JsonNode.getNumberValue(new Object[] {"id"}));
mcoserver.field_96406_b = par0JsonNode.getStringValue(new Object[] {"name"});
mcoserver.field_96407_c = par0JsonNode.getStringValue(new Object[] {"motd"});
mcoserver.field_96404_d = par0JsonNode.getStringValue(new Object[] {"state"});
mcoserver.field_96405_e = par0JsonNode.getStringValue(new Object[] {"owner"});
if (par0JsonNode.isArrayNode(new Object[] {"invited"}))
{
mcoserver.field_96402_f = func_98164_a(par0JsonNode.getArrayNode(new Object[] {"invited"}));
}
else
{
mcoserver.field_96402_f = new ArrayList();
}
mcoserver.field_104063_i = Integer.parseInt(par0JsonNode.getNumberValue(new Object[] {"daysLeft"}));
mcoserver.field_96403_g = par0JsonNode.getStringValue(new Object[] {"ip"});
mcoserver.field_98166_h = par0JsonNode.getBooleanValue(new Object[] {"expired"}).booleanValue();
mcoserver.field_110729_i = Integer.parseInt(par0JsonNode.getNumberValue(new Object[] {"difficulty"}));
mcoserver.field_110728_j = Integer.parseInt(par0JsonNode.getNumberValue(new Object[] {"gameMode"}));
}
catch (IllegalArgumentException illegalargumentexception)
{
;
}
return mcoserver;
}
示例7: verifyMessageContent
import argo.jdom.JsonNode; //导入方法依赖的package包/类
@Override
protected boolean verifyMessageContent(JsonNode content) {
return content.isStringValue("task_action") &&
content.isArrayNode("parameters");
}