本文整理了Java中org.jboss.shrinkwrap.descriptor.spi.node.Node.get()
方法的一些代码示例,展示了Node.get()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.get()
方法的具体详情如下:
包路径:org.jboss.shrinkwrap.descriptor.spi.node.Node
类名称:Node
方法名:get
[英]Get all children with a specific name.
[中]让所有孩子都有一个特定的名字。
代码示例来源:origin: org.jboss.arquillian.config/arquillian-config-impl-base
@Override
public List<String> getDependencies() {
List<String> dependencies = new ArrayList<String>();
if (container.getSingle("dependencies") != null) {
for (Node dep : container.getSingle("dependencies").get("dependency")) {
dependencies.add(dep.getText());
}
}
return dependencies;
}
代码示例来源:origin: org.jboss.forge/forge-javaee-impl
@Override
public List<String> getConstraintMappings()
{
List<String> mappings = new ArrayList<String>();
for (Node oneNode : model.get("constraint-mapping"))
{
mappings.add(oneNode.getText());
}
return mappings;
}
代码示例来源:origin: arquillian/arquillian-core
@Override
public List<GroupDef> getGroups() {
List<GroupDef> groups = new ArrayList<GroupDef>();
for (Node group : model.get("group")) {
groups.add(new GroupDefImpl(getDescriptorName(), model, group));
}
return groups;
}
代码示例来源:origin: org.jboss.shrinkwrap.descriptors/shrinkwrap-descriptors-impl-javaee
/**
* If not already created, a new <code>icon</code> element will be created and returned.
* Otherwise, the first existing <code>icon</code> element will be returned.
* @return the instance defined for the element <code>icon</code>
*/
public IconType<FaceletTaglibTagAttributeType<T>> getOrCreateIcon()
{
List<Node> nodeList = childNode.get("icon");
if (nodeList != null && nodeList.size() > 0)
{
return new IconTypeImpl<FaceletTaglibTagAttributeType<T>>(this, "icon", childNode, nodeList.get(0));
}
return createIcon();
}
代码示例来源:origin: org.jboss.shrinkwrap.descriptors/shrinkwrap-descriptors-impl-javaee
/**
* If not already created, a new <code>property</code> element will be created and returned.
* Otherwise, the first existing <code>property</code> element will be returned.
* @return the instance defined for the element <code>property</code>
*/
public FacesConfigPropertyType<FacesConfigValidatorType<T>> getOrCreateProperty()
{
List<Node> nodeList = childNode.get("property");
if (nodeList != null && nodeList.size() > 0)
{
return new FacesConfigPropertyTypeImpl<FacesConfigValidatorType<T>>(this, "property", childNode, nodeList.get(0));
}
return createProperty();
}
代码示例来源:origin: arquillian/arquillian-core
@Override
public List<ExtensionDef> getExtensions() {
List<ExtensionDef> extensions = new ArrayList<ExtensionDef>();
for (Node extension : model.get("extension")) {
extensions.add(new ExtensionDefImpl(getDescriptorName(), model, extension));
}
return extensions;
}
代码示例来源:origin: arquillian/arquillian-core
@Override
public List<String> getDependencies() {
List<String> dependencies = new ArrayList<String>();
if (container.getSingle("dependencies") != null) {
for (Node dep : container.getSingle("dependencies").get("dependency")) {
dependencies.add(dep.getText());
}
}
return dependencies;
}
代码示例来源:origin: org.jboss.shrinkwrap.descriptors/shrinkwrap-descriptors-impl-javaee
/**
* If not already created, a new <code>icon</code> element will be created and returned.
* Otherwise, the first existing <code>icon</code> element will be returned.
* @return the instance defined for the element <code>icon</code>
*/
public IconType<SessionBeanType<T>> getOrCreateIcon()
{
List<Node> nodeList = childNode.get("icon");
if (nodeList != null && nodeList.size() > 0)
{
return new IconTypeImpl<SessionBeanType<T>>(this, "icon", childNode, nodeList.get(0));
}
return createIcon();
}
代码示例来源:origin: org.jboss.arquillian.config/arquillian-config-impl-base
@Override
public List<ExtensionDef> getExtensions() {
List<ExtensionDef> extensions = new ArrayList<ExtensionDef>();
for (Node extension : model.get("extension")) {
extensions.add(new ExtensionDefImpl(getDescriptorName(), model, extension));
}
return extensions;
}
代码示例来源:origin: org.jboss.shrinkwrap.descriptors/shrinkwrap-descriptors-impl-javaee
/**
* If not already created, a new <code>pre-destroy</code> element will be created and returned.
* Otherwise, the first existing <code>pre-destroy</code> element will be returned.
* @return the instance defined for the element <code>pre-destroy</code>
*/
public LifecycleCallbackType<SessionBeanType<T>> getOrCreatePreDestroy()
{
List<Node> nodeList = childNode.get("pre-destroy");
if (nodeList != null && nodeList.size() > 0)
{
return new LifecycleCallbackTypeImpl<SessionBeanType<T>>(this, "pre-destroy", childNode, nodeList.get(0));
}
return createPreDestroy();
}
代码示例来源:origin: org.jboss.arquillian.config/arquillian-config-impl-base
@Override
public List<GroupDef> getGroups() {
List<GroupDef> groups = new ArrayList<GroupDef>();
for (Node group : model.get("group")) {
groups.add(new GroupDefImpl(getDescriptorName(), model, group));
}
return groups;
}
代码示例来源:origin: org.jboss.shrinkwrap.descriptors/shrinkwrap-descriptors-impl-javaee
/**
* If not already created, a new <code>service-ref</code> element will be created and returned.
* Otherwise, the first existing <code>service-ref</code> element will be returned.
* @return the instance defined for the element <code>service-ref</code>
*/
public ServiceRefType<SessionBeanType<T>> getOrCreateServiceRef()
{
List<Node> nodeList = childNode.get("service-ref");
if (nodeList != null && nodeList.size() > 0)
{
return new ServiceRefTypeImpl<SessionBeanType<T>>(this, "service-ref", childNode, nodeList.get(0));
}
return createServiceRef();
}
代码示例来源:origin: arquillian/arquillian-core
@Override
public List<ContainerDef> getContainers() {
List<ContainerDef> containers = new ArrayList<ContainerDef>();
for (Node container : model.get("container")) {
containers.add(new ContainerDefImpl(getDescriptorName(), model, container));
}
return containers;
}
代码示例来源:origin: org.jboss.shrinkwrap.descriptors/shrinkwrap-descriptors-impl-javaee
/**
* If not already created, a new <code>injection-target</code> element will be created and returned.
* Otherwise, the first existing <code>injection-target</code> element will be returned.
* @return the instance defined for the element <code>injection-target</code>
*/
public InjectionTargetType<ResourceEnvRefType<T>> getOrCreateInjectionTarget()
{
List<Node> nodeList = childNode.get("injection-target");
if (nodeList != null && nodeList.size() > 0)
{
return new InjectionTargetTypeImpl<ResourceEnvRefType<T>>(this, "injection-target", childNode, nodeList.get(0));
}
return createInjectionTarget();
}
代码示例来源:origin: org.jboss.arquillian.config/arquillian-config-impl-base
@Override
public List<ContainerDef> getContainers() {
List<ContainerDef> containers = new ArrayList<ContainerDef>();
for (Node container : model.get("container")) {
containers.add(new ContainerDefImpl(getDescriptorName(), model, container));
}
return containers;
}
代码示例来源:origin: org.jboss.shrinkwrap.descriptors/shrinkwrap-descriptors-impl-javaee
/**
* If not already created, a new <code>init-param</code> element will be created and returned.
* Otherwise, the first existing <code>init-param</code> element will be returned.
* @return the instance defined for the element <code>init-param</code>
*/
public ParamValueType<ValidatorType<T>> getOrCreateInitParam()
{
List<Node> nodeList = childNode.get("init-param");
if (nodeList != null && nodeList.size() > 0)
{
return new ParamValueTypeImpl<ValidatorType<T>>(this, "init-param", childNode, nodeList.get(0));
}
return createInitParam();
}
代码示例来源:origin: arquillian/arquillian-core
@Override
public List<ProtocolDef> getProtocols() {
List<ProtocolDef> protocols = new ArrayList<ProtocolDef>();
for (Node proto : container.get("protocol")) {
protocols.add(new ProtocolDefImpl(getDescriptorName(), getRootNode(), container, proto));
}
return protocols;
}
代码示例来源:origin: org.jboss.shrinkwrap.descriptors/shrinkwrap-descriptors-impl-javaee
/**
* If not already created, a new <code>ordering</code> element will be created and returned.
* Otherwise, the first existing <code>ordering</code> element will be returned.
* @return the instance defined for the element <code>ordering</code>
*/
public FacesConfigOrderingType<WebFacesConfigDescriptor> getOrCreateOrdering()
{
List<Node> nodeList = model.get("ordering");
if (nodeList != null && nodeList.size() > 0)
{
return new FacesConfigOrderingTypeImpl<WebFacesConfigDescriptor>(this, "ordering", model, nodeList.get(0));
}
return createOrdering();
}
代码示例来源:origin: arquillian/arquillian-core
@Override
public List<ContainerDef> getGroupContainers() {
List<ContainerDef> containers = new ArrayList<ContainerDef>();
for (Node container : group.get("container")) {
containers.add(new GroupContainerDefImpl(getDescriptorName(), getRootNode(), group, container));
}
return containers;
}
代码示例来源:origin: org.jboss.shrinkwrap.descriptors/shrinkwrap-descriptors-impl-javaee
/**
* If not already created, a new <code>icon</code> element will be created and returned.
* Otherwise, the first existing <code>icon</code> element will be returned.
* @return the instance defined for the element <code>icon</code>
*/
public IconType<FaceletTaglibTagValidatorType<T>> getOrCreateIcon()
{
List<Node> nodeList = childNode.get("icon");
if (nodeList != null && nodeList.size() > 0)
{
return new IconTypeImpl<FaceletTaglibTagValidatorType<T>>(this, "icon", childNode, nodeList.get(0));
}
return createIcon();
}
内容来源于网络,如有侵权,请联系作者删除!