• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java GenericAttributeValue类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.intellij.util.xml.GenericAttributeValue的典型用法代码示例。如果您正苦于以下问题:Java GenericAttributeValue类的具体用法?Java GenericAttributeValue怎么用?Java GenericAttributeValue使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



GenericAttributeValue类属于com.intellij.util.xml包,在下文中一共展示了GenericAttributeValue类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: expectDomAttributeValue

import com.intellij.util.xml.GenericAttributeValue; //导入依赖的package包/类
public static <T extends DomElement, V> GenericAttributeValue<V> expectDomAttributeValue(
    @NotNull final PsiElement element,
    @NotNull final Class<? extends T> domTagClass,
    @NotNull final Function<T, GenericAttributeValue<V>> domGetter
) {
    final DomManager domManager = DomManager.getDomManager(element.getProject());

    if (!(element instanceof XmlElement)) {
        return null;
    }

    final XmlAttribute xmlAttribute = PsiTreeUtil.getParentOfType(element, XmlAttribute.class, false);
    if (xmlAttribute == null) {
        return null;
    }

    final XmlTag xmlParentTag = PsiTreeUtil.getParentOfType(element, XmlTag.class, false);
    DomElement domParentTag = domManager.getDomElement(xmlParentTag);

    return Optional.ofNullable(domParentTag)
                   .map(o -> ObjectUtils.tryCast(o, domTagClass))
                   .map(domGetter)
                   .filter(val -> val == domManager.getDomElement(xmlAttribute))
                   .orElse(null);
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:26,代码来源:BeansUtils.java


示例2: resolveModifier

import com.intellij.util.xml.GenericAttributeValue; //导入依赖的package包/类
private void resolveModifier(
    final GenericAttributeValue<Boolean> attribute,
    final String methodName,
    final List<String> resultList
) {
    if (attribute == null) {
        return;
    }
    final Boolean value = BooleanUtils.toBooleanObject(attribute.getStringValue());
    if (value == null) {
        return;
    }
    if (value) {
        resultList.add(methodName);
    } else {
        resultList.add(methodName + "(false)");
    }

}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:20,代码来源:TSStructureTreeElement.java


示例3: findAlternativeDoms

import com.intellij.util.xml.GenericAttributeValue; //导入依赖的package包/类
private static Collection<XmlAttributeValue> findAlternativeDoms(@NotNull final ItemType source) {
    final String code = source.getCode().getStringValue();

    if (StringUtil.isEmpty(code)) {
        return Collections.emptyList();
    }
    final XmlElement element = source.getXmlElement();
    final PsiFile psiFile = element == null ? null : element.getContainingFile();

    if (psiFile == null) {
        return Collections.emptyList();
    }
    final TSMetaModel externalModel = TSMetaModelAccess.getInstance(psiFile.getProject()).
        getExternalTypeSystemMeta(psiFile);

    return Optional.ofNullable(externalModel.findMetaClassForDom(source))
                   .map(TSMetaClass::retrieveAllDomsStream)
                   .orElse(Stream.empty())
                   .filter(dom -> !dom.equals(source))
                   .map(ItemType::getCode)
                   .map(GenericAttributeValue::getXmlAttributeValue)
                   .collect(Collectors.toList());
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:24,代码来源:TypeSystemGutterAnnotator.java


示例4: getName

import com.intellij.util.xml.GenericAttributeValue; //导入依赖的package包/类
/**
 * Returns the value of the name child.
 *
 * @return the value of the name child.
 */
@NotNull
@Required
//NOTE: We have to avoid @Convert since PsiField is in the read-only file and thus can't be renamed by platform
//NOTE: Instead we are renaming the attribute value itself, see BeansRenamePsiElementProcessor
//@Convert(soft = true, value = BeansPropertyNameConverter.class)
GenericAttributeValue<String> getName();
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:12,代码来源:Property.java


示例5: resolveToPsiField

import com.intellij.util.xml.GenericAttributeValue; //导入依赖的package包/类
public static PsiField resolveToPsiField(@NotNull final Property property, @Nullable final String name) {
    if (StringUtil.isEmptyOrSpaces(name)) {
        return null;
    }

    if (!(property.getParent() instanceof Bean)) {
        return null;
    }
    final Bean bean = (Bean) property.getParent();
    final GenericAttributeValue<String> clazz = bean.getClazz();
    if (!clazz.exists()) {
        return null;
    }

    final XmlAttributeValue xmlValue = clazz.getXmlAttributeValue();
    if (xmlValue == null) {
        return null;
    }
    return Arrays.stream(xmlValue.getReferences())
                 .map(PsiReference::resolve)
                 .map(o -> ObjectUtils.tryCast(o, PsiClass.class))
                 .filter(Objects::nonNull)
                 .map(nextClass -> nextClass.findFieldByName(name, false))
                 .filter(Objects::nonNull)
                 .findAny()
                 .orElse(null);
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:28,代码来源:BeansUtils.java


示例6: useAttributeValue

import com.intellij.util.xml.GenericAttributeValue; //导入依赖的package包/类
protected static <D extends DomElement, R> R useAttributeValue(
    @Nullable final D dom,
    @NotNull final Function<? super D, GenericAttributeValue<R>> attribute
) {

    return
        Optional.ofNullable(dom)
                .map(attribute)
                .map(GenericAttributeValue::getValue)
                .orElse(null);

}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:13,代码来源:TypeSystemConverterBase.java


示例7: navigateToValue

import com.intellij.util.xml.GenericAttributeValue; //导入依赖的package包/类
protected static <D extends DomElement> XmlAttributeValue navigateToValue(
    @Nullable final D dom,
    @NotNull final Function<? super D, GenericAttributeValue<?>> attribute
) {

    return
        Optional.ofNullable(dom)
                .map(attribute)
                .map(GenericAttributeValue::getXmlAttributeValue)
                .orElse(null);

}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:13,代码来源:TypeSystemConverterBase.java


示例8: findAllExtendingXmlAttributes

import com.intellij.util.xml.GenericAttributeValue; //导入依赖的package包/类
private static Collection<PsiElement> findAllExtendingXmlAttributes(@NotNull final ItemType source) {
    return getExtendingMetaClassNamesStream(source)
        .flatMap(TSMetaClass::retrieveAllDomsStream)
        .map(ItemType::getCode)
        .map(GenericAttributeValue::getXmlAttributeValue)
        .filter(Objects::nonNull)
        .collect(Collectors.toList());
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:9,代码来源:TypeSystemGutterAnnotator.java


示例9: getElement

import com.intellij.util.xml.GenericAttributeValue; //导入依赖的package包/类
@Nullable
@Override
public PsiElement getElement() {
    final GenericAttributeValue<String> codeAttr = myDomItemType.getCode();
    return codeAttr == null ? null : codeAttr.getXmlAttributeValue();
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:7,代码来源:TypeSystemItemReference.java


示例10: resolveValue

import com.intellij.util.xml.GenericAttributeValue; //导入依赖的package包/类
private String resolveValue(final GenericAttributeValue<String> attributeValue) {
    if (attributeValue != null) {
        return attributeValue.getStringValue();
    }
    return null;
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:7,代码来源:TSStructureTreeElement.java


示例11: getExtends

import com.intellij.util.xml.GenericAttributeValue; //导入依赖的package包/类
/**
 * Returns the value of the extends child.
 * <pre>
 * <h3>Attribute null:extends documentation</h3>
 * Defines the class which will be extended. Default is 'java.lang.Object'.
 * </pre>
 *
 * @return the value of the extends child.
 */
@NotNull
@com.intellij.util.xml.Attribute("extends")
GenericAttributeValue<String> getExtends();
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:13,代码来源:AtomicType.java


示例12: getScope

import com.intellij.util.xml.GenericAttributeValue; //导入依赖的package包/类
/**
 * Returns the value of the scope child.
 *
 * @return the value of the scope child.
 */
@NotNull
GenericAttributeValue<Scope> getScope();
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:8,代码来源:Annotations.java


示例13: getExtends

import com.intellij.util.xml.GenericAttributeValue; //导入依赖的package包/类
/**
 * Returns the value of the extends child.
 *
 * @return the value of the extends child.
 */
@NotNull
GenericAttributeValue<String> getExtends();
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:8,代码来源:Bean.java


示例14: getType

import com.intellij.util.xml.GenericAttributeValue; //导入依赖的package包/类
/**
 * Returns the value of the type child.
 * <pre>
 * <h3>Attribute null:type documentation</h3>
 * Defines the type of bean. Allowed are 'bean' or 'event'.
 * </pre>
 *
 * @return the value of the type child.
 */
@NotNull
GenericAttributeValue<String> getType();
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:12,代码来源:Bean.java


示例15: getDeprecated

import com.intellij.util.xml.GenericAttributeValue; //导入依赖的package包/类
/**
 * Returns the value of the deprecated child.
 * <pre>
 * <h3>Attribute null:deprecated documentation</h3>
 * Marks bean as deprecated. Allows defining a message.
 * </pre>
 *
 * @return the value of the deprecated child.
 */
@NotNull
GenericAttributeValue<String> getDeprecated();
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:12,代码来源:Bean.java


示例16: getAbstract

import com.intellij.util.xml.GenericAttributeValue; //导入依赖的package包/类
/**
 * Returns the value of the abstract child.
 *
 * @return the value of the abstract child.
 */
@NotNull
GenericAttributeValue<Boolean> getAbstract();
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:8,代码来源:Bean.java


示例17: getSuperEquals

import com.intellij.util.xml.GenericAttributeValue; //导入依赖的package包/类
/**
 * Returns the value of the superEquals child.
 *
 * @return the value of the superEquals child.
 */
@NotNull
GenericAttributeValue<Boolean> getSuperEquals();
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:8,代码来源:Bean.java


示例18: getClazz

import com.intellij.util.xml.GenericAttributeValue; //导入依赖的package包/类
/**
 * Returns the value of the class child.
 *
 * @return the value of the class child.
 */
@NotNull
@Attribute("class")
@Required
GenericAttributeValue<String> getClazz();
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:10,代码来源:Bean.java


示例19: getTemplate

import com.intellij.util.xml.GenericAttributeValue; //导入依赖的package包/类
/**
 * Returns the value of the template child.
 *
 * @return the value of the template child.
 */
@NotNull
GenericAttributeValue<String> getTemplate();
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:8,代码来源:Bean.java


示例20: getType

import com.intellij.util.xml.GenericAttributeValue; //导入依赖的package包/类
/**
 * Returns the value of the type child.
 *
 * @return the value of the type child.
 */
@NotNull
@Required
GenericAttributeValue<String> getType();
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:9,代码来源:Property.java



注:本文中的com.intellij.util.xml.GenericAttributeValue类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ICsvMapWriter类代码示例发布时间:2022-05-22
下一篇:
Java VuforiaLocalizer类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap