当前位置: 首页>>代码示例>>Java>>正文


Java AntIntrospector类代码示例

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


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

示例1: processNestedElements

import com.intellij.lang.ant.AntIntrospector; //导入依赖的package包/类
public boolean processNestedElements(PsiScopeProcessor processor) {
  final AntIntrospector introspector = AntDomExtender.getIntrospector(myAntClass);
  if (introspector != null) {
    String expectedName = ResolveUtil.getNameHint(processor);
    final PsiType stringType = getParameterList().getParameters()[1].getType();
    final PsiType closureType = getParameterList().getParameters()[2].getType();

    for (String name : Collections.list(introspector.getNestedElements())) {
      if (expectedName == null || expectedName.equals(name)) {
        final AntBuilderMethod method = new AntBuilderMethod(myPlace, name, closureType, introspector.getElementType(name),
                                                             stringType);
        if (!processor.execute(method, ResolveState.initial())) return false;
      }
    }
  }
  return true;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:AntBuilderMethod.java

示例2: getIntrospector

import com.intellij.lang.ant.AntIntrospector; //导入依赖的package包/类
@Nullable
public static AntIntrospector getIntrospector(Class c) {
  try {
    return AntIntrospector.getInstance(c);
  }
  catch (Throwable ignored) {
  }
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:AntDomExtender.java

示例3: getContexts

import com.intellij.lang.ant.AntIntrospector; //导入依赖的package包/类
private List<AbstractIntrospector> getContexts() {
  if (myContexts != null) {
    return myContexts;
  }
  final List<AbstractIntrospector> parents = new ArrayList<AbstractIntrospector>();
  final AntDomMacroDef macroDef = myElement.getParentOfType(AntDomMacroDef.class, true);
  if (macroDef != null) {
    final AntDomSequentialTask body = macroDef.getMacroBody();
    if (body != null) {
      body.accept(new AntDomRecursiveVisitor() {
        public void visitAntDomCustomElement(AntDomCustomElement custom) {
          if (myElement.equals(custom.getDeclaringElement())) {
            final AntDomElement parent = custom.getParentOfType(AntDomElement.class, true);
            if (parent != null) {
              final Class type = parent.getChildDescription().getUserData(ELEMENT_IMPL_CLASS_KEY);
              if (type != null) {
                final AntIntrospector antIntrospector = AntIntrospector.getInstance(type);
                if (antIntrospector != null) {
                  parents.add(new ClassIntrospectorAdapter(antIntrospector));
                }
              }
            }
          }
        }
      });
    }
  }
  return myContexts = parents;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:30,代码来源:AntDomExtender.java

示例4: ClassIntrospectorAdapter

import com.intellij.lang.ant.AntIntrospector; //导入依赖的package包/类
private ClassIntrospectorAdapter(AntIntrospector introspector) {
  this(introspector, null, null);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:AntDomExtender.java


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