org.jvnet.hk2.config.DomDocument.getModelByElementName()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(5.2k)|赞(0)|评价(0)|浏览(120)

本文整理了Java中org.jvnet.hk2.config.DomDocument.getModelByElementName()方法的一些代码示例,展示了DomDocument.getModelByElementName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DomDocument.getModelByElementName()方法的具体详情如下:
包路径:org.jvnet.hk2.config.DomDocument
类名称:DomDocument
方法名:getModelByElementName

DomDocument.getModelByElementName介绍

[英]Obtains the ConfigModel from the "global" element name.

This method uses #buildModel to lazily build models if necessary.
[中]从“全局”元素名称获取ConfigModel。
如果需要,此方法使用#buildModel惰性地构建模型。

代码示例

代码示例来源:origin: javaee/glassfish

ConfigModel model = document.getModelByElementName(in.getLocalName());
if(model==null) {
  String localName = in.getLocalName();

代码示例来源:origin: javaee/glassfish

public static Class<? extends ConfigBeanProxy> getElementTypeByName(ConfigBeanProxy parent, String elementName)
  throws ClassNotFoundException {
  final Dom parentDom = Dom.unwrap(parent);
  DomDocument document = parentDom.document;
  ConfigModel.Property a = parentDom.model.elements.get(elementName);
  if (a!=null) {
    if (a.isLeaf()) {
      // dochez : I am not too sure, but that should be a String @Element
      return null;
    } else {
      ConfigModel childModel = ((ConfigModel.Node) a).model;
      return (Class<? extends ConfigBeanProxy>) childModel.classLoaderHolder.loadClass(childModel.targetTypeName);
    }
  }
  // global lookup
  ConfigModel model = document.getModelByElementName(elementName);
  if (model!=null) {
    return (Class<? extends ConfigBeanProxy>) model.classLoaderHolder.loadClass(model.targetTypeName);
  }
  return null;
}

代码示例来源:origin: com.sun.enterprise/config

ConfigModel model = document.getModelByElementName(in.getLocalName());
if(model==null) {
  String localName = in.getLocalName();

代码示例来源:origin: org.glassfish.hk2/config

ConfigModel model = document.getModelByElementName(in.getLocalName());
if(model==null) {
  String localName = in.getLocalName();

代码示例来源:origin: eclipse-ee4j/glassfish

ConfigModel model = document.getModelByElementName(in.getLocalName());
if(model==null) {
  String localName = in.getLocalName();

代码示例来源:origin: org.glassfish.hk2/hk2-config

ConfigModel model = document.getModelByElementName(in.getLocalName());
if(model==null) {
  String localName = in.getLocalName();

代码示例来源:origin: org.glassfish.hk2/config

public static Class<? extends ConfigBeanProxy> getElementTypeByName(ConfigBeanProxy parent, String elementName)
   throws ClassNotFoundException {
   final Dom parentDom = Dom.unwrap(parent);
   DomDocument document = parentDom.document;
   ConfigModel.Property a = parentDom.model.elements.get(elementName);
   if (a!=null) {
     if (a.isLeaf()) {
       // dochez : I am not too sure, but that should be a String @Element
       return null;
     } else {
       ConfigModel childModel = ((ConfigModel.Node) a).model;
       return (Class<? extends ConfigBeanProxy>) childModel.classLoaderHolder.get().loadClass(childModel.targetTypeName);
     }
   }
   // global lookup
   ConfigModel model = document.getModelByElementName(elementName);
   if (model!=null) {
     return (Class<? extends ConfigBeanProxy>) model.classLoaderHolder.get().loadClass(model.targetTypeName);
   }
   return null;
 }
}

代码示例来源:origin: com.sun.enterprise/config

public static Class<? extends ConfigBeanProxy> getElementTypeByName(ConfigBeanProxy parent, String elementName)
   throws ClassNotFoundException {
   final Dom parentDom = Dom.unwrap(parent);
   DomDocument document = parentDom.document;
   ConfigModel.Property a = parentDom.model.elements.get(elementName);
   if (a!=null) {
     if (a.isLeaf()) {
       // dochez : I am not too sure, but that should be a String @Element
       return null;
     } else {
       ConfigModel childModel = ((ConfigModel.Node) a).model;
       return (Class<? extends ConfigBeanProxy>) childModel.classLoaderHolder.get().loadClass(childModel.targetTypeName);
     }
   }
   // global lookup
   ConfigModel model = document.getModelByElementName(elementName);
   if (model!=null) {
     return (Class<? extends ConfigBeanProxy>) model.classLoaderHolder.get().loadClass(model.targetTypeName);
   }
   return null;
 }
}

代码示例来源:origin: org.glassfish.hk2/hk2-config

public static Class<? extends ConfigBeanProxy> getElementTypeByName(ConfigBeanProxy parent, String elementName)
  throws ClassNotFoundException {
  final Dom parentDom = Dom.unwrap(parent);
  DomDocument document = parentDom.document;
  ConfigModel.Property a = parentDom.model.elements.get(elementName);
  if (a!=null) {
    if (a.isLeaf()) {
      // dochez : I am not too sure, but that should be a String @Element
      return null;
    } else {
      ConfigModel childModel = ((ConfigModel.Node) a).model;
      return (Class<? extends ConfigBeanProxy>) childModel.classLoaderHolder.loadClass(childModel.targetTypeName);
    }
  }
  // global lookup
  ConfigModel model = document.getModelByElementName(elementName);
  if (model!=null) {
    return (Class<? extends ConfigBeanProxy>) model.classLoaderHolder.loadClass(model.targetTypeName);
  }
  return null;
}

代码示例来源:origin: eclipse-ee4j/glassfish

public static Class<? extends ConfigBeanProxy> getElementTypeByName(ConfigBeanProxy parent, String elementName)
  throws ClassNotFoundException {
  final Dom parentDom = Dom.unwrap(parent);
  DomDocument document = parentDom.document;
  ConfigModel.Property a = parentDom.model.elements.get(elementName);
  if (a!=null) {
    if (a.isLeaf()) {
      // dochez : I am not too sure, but that should be a String @Element
      return null;
    } else {
      ConfigModel childModel = ((ConfigModel.Node) a).model;
      return (Class<? extends ConfigBeanProxy>) childModel.classLoaderHolder.loadClass(childModel.targetTypeName);
    }
  }
  // global lookup
  ConfigModel model = document.getModelByElementName(elementName);
  if (model!=null) {
    return (Class<? extends ConfigBeanProxy>) model.classLoaderHolder.loadClass(model.targetTypeName);
  }
  return null;
}

相关文章