本文整理汇总了Java中org.jdom.Attribute.getParent方法的典型用法代码示例。如果您正苦于以下问题:Java Attribute.getParent方法的具体用法?Java Attribute.getParent怎么用?Java Attribute.getParent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jdom.Attribute
的用法示例。
在下文中一共展示了Attribute.getParent方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: skipPathMacros
import org.jdom.Attribute; //导入方法依赖的package包/类
@Override
public boolean skipPathMacros(Attribute attribute) {
final Element parent = attribute.getParent();
final String attrName = attribute.getName();
String tagName = parent.getName();
if (tagName.equals(EnvironmentVariablesComponent.ENV) &&
(attrName.equals(EnvironmentVariablesComponent.NAME) || attrName.equals(EnvironmentVariablesComponent.VALUE))) {
return true;
}
if (tagName.equals("configuration") && attrName.equals("name")) {
return true;
}
return false;
}
示例2: skipPathMacros
import org.jdom.Attribute; //导入方法依赖的package包/类
@Override
public boolean skipPathMacros(Attribute attribute) {
final Element parent = attribute.getParent();
if (parent.getName().equals("option")) {
String optionName = parent.getAttributeValue("name");
if ("MAIN_CLASS_NAME".equals(optionName) || "METHOD_NAME".equals(optionName)) {
return true;
}
}
return false;
}
示例3: recursePathMacros
import org.jdom.Attribute; //导入方法依赖的package包/类
@Override
public boolean recursePathMacros(Attribute attribute) {
if (attribute.getName().equals("value")) {
Element parent = attribute.getParent();
if (parent != null && "option".equals(parent.getName()) && "ADDITIONAL_OPTIONS_STRING".equals(parent.getAttributeValue("name"))) {
Element grandParent = parent.getParentElement();
return grandParent != null && grandParent.getName().equals("component")
&& "JavacSettings".equals(grandParent.getAttributeValue("name"));
}
}
return false;
}
示例4: skipPathMacros
import org.jdom.Attribute; //导入方法依赖的package包/类
@Override
public boolean skipPathMacros(Attribute attribute) {
final Element parent = attribute.getParent();
final String parentName = parent.getName();
if (VcsConfiguration.MESSAGE_ELEMENT_NAME.equals(parentName) && VcsConfiguration.VALUE_ATTR.equals(attribute.getName())) {
return true;
}
if ("option".equals(parentName) && "LAST_COMMIT_MESSAGE".equals(parent.getAttributeValue("name"))) {
return true;
}
return false;
}
示例5: skipPathMacros
import org.jdom.Attribute; //导入方法依赖的package包/类
@Override
public boolean skipPathMacros(Attribute attribute) {
final Element parent = attribute.getParent();
if ("mapping".equals(parent.getName()) && "remote-root".equals(attribute.getName())) {
return true;
}
return false;
}
示例6: recursePathMacros
import org.jdom.Attribute; //导入方法依赖的package包/类
@Override
public boolean recursePathMacros(Attribute attribute) {
final Element parent = attribute.getParent();
if (parent != null && "option".equals(parent.getName())) {
final Element grandParent = parent.getParentElement();
return grandParent != null && "configuration".equals(grandParent.getName());
}
return false;
}
示例7: recursePathMacros
import org.jdom.Attribute; //导入方法依赖的package包/类
@Override
public boolean recursePathMacros(Attribute attribute) {
if (attribute.getName().equals("value")) {
Element parent = attribute.getParent();
if (parent != null && "option".equals(parent.getName()) && "ADDITIONAL_OPTIONS_STRING".equals(parent.getAttributeValue("name"))) {
Element grandParent = parent.getParentElement();
return grandParent != null && grandParent.getName().equals("component")
&& grandParent.getAttributeValue("name").equals("JavacSettings");
}
}
return false;
}
示例8: skipPathMacros
import org.jdom.Attribute; //导入方法依赖的package包/类
@Override
public boolean skipPathMacros(Attribute attribute) {
final Element parent = attribute.getParent();
final String attrName = attribute.getName();
if (parent.getName().equals(EnvironmentVariablesComponent.ENV) &&
(attrName.equals(EnvironmentVariablesComponent.NAME) || attrName.equals(EnvironmentVariablesComponent.VALUE))) {
return true;
}
return false;
}