Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   * JBoss, Home of Professional Open Source.
   * Copyright 2011, Red Hat, Inc., and individual contributors
   * as indicated by the @author tags. See the copyright.txt file in the
   * distribution for a full listing of individual contributors.
   * This is free software; you can redistribute it and/or modify it
   * under the terms of the GNU Lesser General Public License as
   * published by the Free Software Foundation; either version 2.1 of
  * the License, or (at your option) any later version.
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * Lesser General Public License for more details.
  * You should have received a copy of the GNU Lesser General Public
  * License along with this software; if not, write to the Free
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site:
 import static;
 import static;
 import static;
 import static;
 import static;
 import static;
 import static;
 import static;
 import java.util.List;
 import java.util.Map; or for a resource whose contents include attributes provided by a list of org.jboss.jca.core.spi.statistics.StatisticsPlugins. Use the API if the resource only includes the statistics attributes; use if the resource is an override resource that adds resource-specific statistics to a generic resource.

must be replaced with RD
Brian Stansberry (c) 2011 Red Hat Inc.
 public class StatisticsDescriptionProvider implements DescriptionProvider {
     private final String bundleName;
     private final String resourceDescriptionKey;
     private final List<StatisticsPluginplugins;

Constructor for the case. Internationalization support is not provided.

plugins the statistics plugins
     public StatisticsDescriptionProvider(final StatisticsPlugin... plugins) {

Constructor for the case.

bundleName name to pass to java.util.ResourceBundle.getBundle(java.lang.String)
resourceDescriptionKey key to use for looking up the resource's description in the bundle
plugins the statistics plugins
     public StatisticsDescriptionProvider(final String bundleNamefinal String resourceDescriptionKeyfinal StatisticsPlugin... plugins) {
         this. = bundleName;
         this. = resourceDescriptionKey;
         this. = Arrays.asList(plugins);
     public ModelNode getModelDescription(Locale locale) {
         final ResourceBundle bundle = getResourceBundle(locale);
         final ModelNode subsystem = new ModelNode();
         ModelNode attrs = subsystem.get();
         final Map<StringModelNodeattributeDescriptions = getAttributeOverrideDescriptions(locale);
         for (Map.Entry<StringModelNodeentry : attributeDescriptions.entrySet()) {
         subsystem.get(); // placeholder
        subsystem.get().setEmptyObject(); // no children
        return subsystem;
        Map<StringModelNodeattributes = new HashMap<StringModelNode>();
        for (StatisticsPlugin plugin : ) {
            for (String name : plugin.getNames()) {
                ModelNode node = new ModelNode();
                ModelType modelType = .;
                if (plugin.getType(name) == int.class) {
                    modelType = .;
                if (plugin.getType(name) == long.class) {
                    modelType = .;
        return attributes;
    private ResourceBundle getResourceBundle(Locale locale) {
        if (locale == null) {
            locale = Locale.getDefault();
        return ResourceBundle.getBundle(locale);
New to GrepCode? Check out our FAQ X