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

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

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

Dom.getProxyType介绍

[英]Returns the proxy type for this configuration object
[中]返回此配置对象的代理类型

代码示例

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

/**
 * Creates a strongly-typed proxy to access values in this {@link Dom} object,
 */
public <T extends ConfigBeanProxy> T createProxy() {
  return createProxy(this.<T>getProxyType());
}

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

/**
 * Another version of the {@link #invoke(Object, Method, Object[])},
 * but instead of {@link Method} object, it takes the method name and argument types.
 */
public Object invoke(Object proxy, String methodName, Class[] argTypes, Object[] args) throws Throwable {
  return invoke( proxy, getProxyType().getMethod(methodName, argTypes), args );
}

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

/**
 * Replaces an existing {@link NodeChild} with another one.
 *
 * @see #insertAfter(Dom, String, Dom)
 */
public synchronized void replaceChild(Dom reference, String name, Dom newNode) {
  ListIterator<Child> itr = children.listIterator();
  while(itr.hasNext()) {
    Child child = itr.next();   
    if (child instanceof NodeChild) {
      NodeChild nc = (NodeChild) child;
      if(nc.dom==reference) {
        reference.release();
        newNode.domDescriptor = addWithAlias(getHabitat(), newNode,newNode.getProxyType(), newNode.getKey());
        
        itr.set(new NodeChild(name,newNode));
        return;
      }
    }
  }
  throw new IllegalArgumentException(reference+" is not a valid child of "+this+". Children="+children);
}

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

newNode.domDescriptor = addWithAlias(getHabitat(), newNode, newNode.getProxyType(), newNode.getKey());
return;
  if(nc.dom==reference) {
    itr.add(newChild);
    newNode.domDescriptor = addWithAlias(getHabitat(), newNode, newNode.getProxyType(), newNode.getKey());

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

Set<ConfigListener> listeners = typeListeners.get(dom.getProxyType());
if (listeners!=null) {
  configListeners.addAll(listeners);
  if (oldValue instanceof ConfigBeanProxy) {
    Dom domOldValue = Dom.unwrap((ConfigBeanProxy) oldValue);
    Set<ConfigListener> typedListeners = typeListeners.get(domOldValue.<ConfigBeanProxy>getProxyType());
    if (typedListeners!=null) {
      configListeners.addAll(typedListeners);

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

throw new IllegalArgumentException("A " + master.getProxyType().getSimpleName() +
    " with the same key \"" + keyValue + "\" already exists in " +
    parent.getProxyType().getSimpleName() + " " + parent.getKey()) ;

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

? parent.domNodeByTypeElements(thisview.getProxyType())
: new ArrayList<Dom>();

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

/**
 * Creates a strongly-typed proxy to access values in this {@link Dom} object,
 */
public <T extends ConfigBeanProxy> T createProxy() {
  return createProxy(this.<T>getProxyType());
}

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

/**
 * Creates a strongly-typed proxy to access values in this {@link Dom} object,
 */
public <T extends ConfigBeanProxy> T createProxy() {
  return createProxy(this.<T>getProxyType());
}

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

/**
 * Another version of the {@link #invoke(Object, Method, Object[])},
 * but instead of {@link Method} object, it takes the method name and argument types.
 */
public Object invoke(Object proxy, String methodName, Class[] argTypes, Object[] args) throws Throwable {
  return invoke( proxy, getProxyType().getMethod(methodName, argTypes), args );
}

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

/**
 * Creates a strongly-typed proxy to access values in this {@link Dom} object,
 */
public <T extends ConfigBeanProxy> T createProxy() {
  return createProxy(this.<T>getProxyType());
}

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

/**
 * Creates a strongly-typed proxy to access values in this {@link Dom} object,
 */
public <T extends ConfigBeanProxy> T createProxy() {
  return createProxy(this.<T>getProxyType());
}

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

/**
 * Another version of the {@link #invoke(Object, Method, Object[])},
 * but instead of {@link Method} object, it takes the method name and argument types.
 */
public Object invoke(Object proxy, String methodName, Class[] argTypes, Object[] args) throws Throwable {
  return invoke( proxy, getProxyType().getMethod(methodName, argTypes), args );
}

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

/**
 * Another version of the {@link #invoke(Object, Method, Object[])},
 * but instead of {@link Method} object, it takes the method name and argument types.
 */
public Object invoke(Object proxy, String methodName, Class[] argTypes, Object[] args) throws Throwable {
  return invoke( proxy, getProxyType().getMethod(methodName, argTypes), args );
}

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

/**
 * Another version of the {@link #invoke(Object, Method, Object[])},
 * but instead of {@link Method} object, it takes the method name and argument types.
 */
public Object invoke(Object proxy, String methodName, Class[] argTypes, Object[] args) throws Throwable {
  return invoke( proxy, getProxyType().getMethod(methodName, argTypes), args );
}

代码示例来源:origin: org.glassfish.main.admin/config-api

public Object run(ConfigBeanProxy param) {
    PropertyBag bag = (PropertyBag) param;
    final List<Property> propertyList = new ArrayList<Property>(bag.getProperty());
    setProperty(target, attribute, getValue(propertyList, property));
    final String message = MessageFormat.format("Moved {0}.property.{1} to {0}.{2}",
      Dom.convertName(Dom.unwrap(target).getProxyType().getSimpleName()),
      property,
      Dom.convertName(attribute));
    report(context, message);
    bag.getProperty().clear();
    bag.getProperty().addAll(propertyList);
    return param;
  }
}, target);

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

public Object run(ConfigBeanProxy param) {
    PropertyBag bag = (PropertyBag) param;
    final List<Property> propertyList = new ArrayList<Property>(bag.getProperty());
    setProperty(target, attribute, getValue(propertyList, property));
    final String message = MessageFormat.format("Moved {0}.property.{1} to {0}.{2}",
      Dom.convertName(Dom.unwrap(target).getProxyType().getSimpleName()),
      property,
      Dom.convertName(attribute));
    report(context, message);
    bag.getProperty().clear();
    bag.getProperty().addAll(propertyList);
    return param;
  }
}, target);

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

static public List<NetworkListener> findNetworkListeners(ThreadPool threadpool) {
  NetworkConfig config = threadpool.getParent().getParent(NetworkConfig.class);
  if (!Dom.unwrap(config).getProxyType().equals(NetworkConfig.class)) {
    config = Dom.unwrap(config).element("network-config").createProxy();
  }
  List<NetworkListener> listeners = config.getNetworkListeners().getNetworkListener();
  List<NetworkListener> refs = new ArrayList<NetworkListener>();
  for (NetworkListener listener : listeners) {
    if (listener.getThreadPool().equals(threadpool.getName())) {
      refs.add(listener);
    }
  }
  return refs;
}

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

static public List<NetworkListener> findNetworkListeners(ThreadPool threadpool) {
  NetworkConfig config = threadpool.getParent().getParent(NetworkConfig.class);
  if (!Dom.unwrap(config).getProxyType().equals(NetworkConfig.class)) {
    config = Dom.unwrap(config).element("network-config").createProxy();
  }
  List<NetworkListener> listeners = config.getNetworkListeners().getNetworkListener();
  List<NetworkListener> refs = new ArrayList<NetworkListener>();
  for (NetworkListener listener : listeners) {
    if (listener.getThreadPool().equals(threadpool.getName())) {
      refs.add(listener);
    }
  }
  return refs;
}

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

static public List<NetworkListener> findNetworkListeners(ThreadPool threadpool) {
  NetworkConfig config = threadpool.getParent().getParent(NetworkConfig.class);
  if (!Dom.unwrap(config).getProxyType().equals(NetworkConfig.class)) {
    config = Dom.unwrap(config).element("network-config").createProxy();
  }
  List<NetworkListener> listeners = config.getNetworkListeners().getNetworkListener();
  List<NetworkListener> refs = new ArrayList<NetworkListener>();
  for (NetworkListener listener : listeners) {
    if (listener.getThreadPool().equals(threadpool.getName())) {
      refs.add(listener);
    }
  }
  return refs;
}

相关文章