- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.jetbrains.yaml.psi.YAMLKeyValue.getName()
方法的一些代码示例,展示了YAMLKeyValue.getName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YAMLKeyValue.getName()
方法的具体详情如下:
包路径:org.jetbrains.yaml.psi.YAMLKeyValue
类名称:YAMLKeyValue
方法名:getName
暂无
代码示例来源:origin: zalando/intellij-swagger
private boolean hasRootKey(final String keyName, final PsiFile psiFile) {
return getRootChildrenOfType(psiFile, YAMLKeyValue.class)
.stream()
.anyMatch(yamlKeyValue -> keyName.equals(yamlKeyValue.getName()));
}
代码示例来源:origin: zalando/intellij-swagger
public Optional<? extends PsiElement> getRootChildByName(
final String keyName, final PsiFile psiFile) {
return getRootChildrenOfType(psiFile, YAMLKeyValue.class)
.stream()
.filter(yamlKeyValue -> keyName.equals(yamlKeyValue.getName()))
.findFirst();
}
代码示例来源:origin: zalando/intellij-swagger
@Override
public List<PsiElement> getTags(final PsiFile psiFile) {
return getRootChildrenOfType(psiFile, YAMLKeyValue.class)
.stream()
.filter(yamlKeyValue -> "tags".equals(yamlKeyValue.getName()))
.map(YAMLKeyValue::getValue)
.map(YAMLPsiElement::getYAMLElements)
.flatMap(Collection::stream)
.filter(el -> el instanceof YAMLSequenceItem)
.map(YAMLSequenceItem.class::cast)
.map(YAMLSequenceItem::getYAMLElements)
.flatMap(Collection::stream)
.filter(el -> el instanceof YAMLMapping)
.map(YAMLMapping.class::cast)
.map(yamlMapping -> yamlMapping.getKeyValueByKey("name"))
.map(YAMLKeyValue::getValue)
.filter(Objects::nonNull)
.collect(Collectors.toList());
}
代码示例来源:origin: zalando/intellij-swagger
@Override
public List<String> getSecurityScopesIfOAuth2(final PsiElement securityDefinitionItem) {
final List<YAMLKeyValue> properties = getChildProperties(securityDefinitionItem);
final boolean isOAuth2 =
properties
.stream()
.anyMatch(
prop -> {
final Optional<String> value =
Optional.ofNullable(prop.getValue())
.map(YAMLValue::getText)
.map(StringUtils::removeAllQuotes);
return "type".equals(prop.getName()) && Optional.of("oauth2").equals(value);
});
if (isOAuth2) {
return properties
.stream()
.filter(prop -> "scopes".equals(prop.getName()))
.map(this::getChildProperties)
.flatMap(Collection::stream)
.map(YAMLKeyValue::getName)
.collect(Collectors.toList());
}
return ImmutableList.of();
}
代码示例来源:origin: Haehnchen/idea-php-symfony2-plugin
/**
* acme_demo.form.type.gender:
* class: espend\Form\TypeBundle\Form\FooType
* tags:
* - { name: form.type, alias: foo_type_alias }
* - { name: foo }
*/
@NotNull
public static Map<String, Set<String>> getTags(@NotNull YAMLFile yamlFile) {
Map<String, Set<String>> map = new HashMap<>();
for(YAMLKeyValue yamlServiceKeyValue : YamlHelper.getQualifiedKeyValuesInFile(yamlFile, "services")) {
String serviceName = yamlServiceKeyValue.getName();
Set<String> serviceTagMap = YamlHelper.collectServiceTags(yamlServiceKeyValue);
if(serviceTagMap != null && serviceTagMap.size() > 0) {
map.put(serviceName, serviceTagMap);
}
}
return map;
}
本文整理了Java中org.jetbrains.yaml.psi.YAMLKeyValue.getName()方法的一些代码示例,展示了YAMLKeyValue.getName()的具体用法。这些代码
本文整理了Java中org.jetbrains.yaml.psi.YAMLKeyValue.getValueText()方法的一些代码示例,展示了YAMLKeyValue.getValueText()
本文整理了Java中org.jetbrains.yaml.psi.YAMLKeyValue.getKeyText()方法的一些代码示例,展示了YAMLKeyValue.getKeyText()的具体用
本文整理了Java中org.jetbrains.yaml.psi.YAMLKeyValue.getKey()方法的一些代码示例,展示了YAMLKeyValue.getKey()的具体用法。这些代码示例
我是一名优秀的程序员,十分优秀!