本文整理了Java中org.raml.model.Action.getIs()
方法的一些代码示例,展示了Action.getIs()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Action.getIs()
方法的具体详情如下:
包路径:org.raml.model.Action
类名称:Action
方法名:getIs
暂无
代码示例来源:origin: com.sap.cloud.yaas.service-generator/service-generator-model-raml
private Map<String, Template> getAllTemplatesForMethod(final Raml raml, final Action source)
{
final Map<String, Template> result = new LinkedHashMap<>();
if (source.getIs() != null)
{
for (final String traitName : source.getIs())
{
final Map.Entry<String, Template> templateEntry = getTemplate(raml, traitName);
result.put(templateEntry.getKey(), templateEntry.getValue());
}
}
return result;
}
代码示例来源:origin: versly/wsdoc
Action act = res.getAction(ActionType.GET);
AssertJUnit.assertNotNull("method GET /stable1 not found", act);
List<String> is = act.getIs();
AssertJUnit.assertNotNull("resource /stable1 has no \'is\'", is);
AssertJUnit.assertEquals("resource /stable1 should have empty \'is\'", 0, is.size());
act = res.getAction(ActionType.GET);
AssertJUnit.assertNotNull("method GET /deprecated2 not found", act);
is = act.getIs();
AssertJUnit.assertNotNull("resource /deprecated2 has no \'is\'", is);
AssertJUnit.assertEquals("resource /deprecated2 should have one \'is\'", 1, is.size());
act = res.getAction(ActionType.GET);
AssertJUnit.assertNotNull("method GET /stable3 not found", act);
is = act.getIs();
AssertJUnit.assertNotNull("resource /stable3 has no \'is\'", is);
AssertJUnit.assertEquals("resource /stable3 should have empty \'is\'", 0, is.size());
act = res.getAction(ActionType.GET);
AssertJUnit.assertNotNull("method GET /deprecated3 not found", act);
is = act.getIs();
AssertJUnit.assertNotNull("resource /deprecated3 has no \'is\'", is);
AssertJUnit.assertEquals("resource /deprecated3 should have one \'is\'", 1, is.size());
act = res.getAction(ActionType.GET);
AssertJUnit.assertNotNull("method GET /experimentaldeprecated3 not found", act);
is = act.getIs();
AssertJUnit.assertNotNull("resource /experimentaldeprecated3 has no \'is\'", is);
AssertJUnit.assertEquals("resource /experimentaldeprecated3 should have one \'is\'", 2, is.size());
代码示例来源:origin: org.raml/raml-jaxrs-codegen-core
boolean asyncMethod = isNotBlank(asyncResourceTrait) && action.getIs().contains(asyncResourceTrait);
内容来源于网络,如有侵权,请联系作者删除!