tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1222797 - in /tomcat/trunk/java/org/apache/tomcat/util/modeler: ManagedBean.java modules/MbeansDescriptorsDOMSource.java modules/MbeansDescriptorsDigesterSource.java modules/MbeansDescriptorsIntrospectionSource.java
Date Fri, 23 Dec 2011 19:03:08 GMT
Author: markt
Date: Fri Dec 23 19:03:08 2011
New Revision: 1222797

URL: http://svn.apache.org/viewvc?rev=1222797&view=rev
Log:
Remove commented out code

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/modeler/ManagedBean.java
    tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDOMSource.java
    tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDigesterSource.java
    tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/modeler/ManagedBean.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/modeler/ManagedBean.java?rev=1222797&r1=1222796&r2=1222797&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/modeler/ManagedBean.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/modeler/ManagedBean.java Fri Dec 23 19:03:08
2011
@@ -68,13 +68,11 @@ public class ManagedBean implements java
         new HashMap<String,OperationInfo>();
 
     protected String className = BASE_MBEAN;
-    //protected ConstructorInfo constructors[] = new ConstructorInfo[0];
     protected String description = null;
     protected String domain = null;
     protected String group = null;
     protected String name = null;
 
-    //protected List fields = new ArrayList();
     protected NotificationInfo notifications[] = new NotificationInfo[0];
     protected String type = null;
 
@@ -119,14 +117,6 @@ public class ManagedBean implements java
     }
 
 
-//    /**
-//     * The collection of constructors for this MBean.
-//     */
-//    public ConstructorInfo[] getConstructors() {
-//        return (this.constructors);
-//    }
-
-
     /**
      * The human-readable description of this MBean.
      */
@@ -154,16 +144,6 @@ public class ManagedBean implements java
 
 
     /**
-     * <p>Return a <code>List</code> of the {@link FieldInfo} objects for
-     * the name/value pairs that should be
-     * added to the Descriptor created from this metadata.</p>
-     */
-//    public List getFields() {
-//        return (this.fields);
-//    }
-//
-
-    /**
      * The (optional) group to which this MBean belongs.
      */
     public String getGroup() {
@@ -236,36 +216,6 @@ public class ManagedBean implements java
 
 
     /**
-     * Add a new constructor to the set of constructors for this MBean.
-     *
-     * @param constructor The new constructor descriptor
-     */
-//    public void addConstructor(ConstructorInfo constructor) {
-//
-//        synchronized (constructors) {
-//            ConstructorInfo results[] =
-//                new ConstructorInfo[constructors.length + 1];
-//            System.arraycopy(constructors, 0, results, 0, constructors.length);
-//            results[constructors.length] = constructor;
-//            constructors = results;
-//            this.info = null;
-//        }
-//
-//    }
-
-
-    /**
-     * <p>Add a new field to the fields associated with the
-     * Descriptor that will be created from this metadata.</p>
-     *
-     * @param field The field to be added
-     */
-//    public void addField(FieldInfo field) {
-//        fields.add(field);
-//    }
-
-
-    /**
      * Add a new notification to the set of notifications for this MBean.
      *
      * @param notification The new notification descriptor
@@ -421,12 +371,6 @@ public class ManagedBean implements java
             operations[i] = opers[i].createOperationInfo();
 
 
-//        ConstructorInfo consts[] = getConstructors();
-//        ModelMBeanConstructorInfo constructors[] =
-//            new ModelMBeanConstructorInfo[consts.length];
-//        for (int i = 0; i < consts.length; i++)
-//            constructors[i] = consts[i].createConstructorInfo();
-
         NotificationInfo notifs[] = getNotifications();
         MBeanNotificationInfo notifications[] =
             new MBeanNotificationInfo[notifs.length];
@@ -441,17 +385,6 @@ public class ManagedBean implements java
                              new MBeanConstructorInfo[] {},
                              operations,
                              notifications);
-//        try {
-//            Descriptor descriptor = info.getMBeanDescriptor();
-//            Iterator fields = getFields().iterator();
-//            while (fields.hasNext()) {
-//                FieldInfo field = (FieldInfo) fields.next();
-//                descriptor.setField(field.getName(), field.getValue());
-//            }
-//            info.setMBeanDescriptor(descriptor);
-//        } catch (MBeanException e) {
-//            ;
-//        }
 
         return (info);
 

Modified: tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDOMSource.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDOMSource.java?rev=1222797&r1=1222796&r2=1222797&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDOMSource.java
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDOMSource.java
Fri Dec 23 19:03:08 2011
@@ -117,20 +117,6 @@ public class MbeansDescriptorsDOMSource 
                 DomUtil.setAttributes(managed, mbeanN);
                 Node firstN;
 
-                // Process descriptor subnode
-                /*Node mbeanDescriptorN =
-                    DomUtil.getChild(mbeanN, "descriptor");
-                if (mbeanDescriptorN != null) {
-                    Node firstFieldN =
-                        DomUtil.getChild(mbeanDescriptorN, "field");
-                    for (Node fieldN = firstFieldN; fieldN != null;
-                         fieldN = DomUtil.getNext(fieldN)) {
-                        FieldInfo fi = new FieldInfo();
-                        DomUtil.setAttributes(fi, fieldN);
-                        managed.addField(fi);
-                    }
-                }*/
-
                 // process attribute nodes
                 firstN=DomUtil.getChild( mbeanN, "attribute");
                 for (Node descN = firstN; descN != null;
@@ -141,21 +127,6 @@ public class MbeansDescriptorsDOMSource 
                     AttributeInfo ai=new AttributeInfo();
                     DomUtil.setAttributes(ai, descN);
 
-                    // Process descriptor subnode
-                    /*Node descriptorN =
-                        DomUtil.getChild(descN, "descriptor");
-                    if (descriptorN != null) {
-                        Node firstFieldN =
-                            DomUtil.getChild(descriptorN, "field");
-                        for (Node fieldN = firstFieldN; fieldN != null;
-                             fieldN = DomUtil.getNext(fieldN)) {
-                            FieldInfo fi = new FieldInfo();
-                            DomUtil.setAttributes(fi, fieldN);
-                            ai.addField(fi);
-                        }
-                    }
-                    */
-
                     // Add this info to our managed bean info
                     managed.addAttribute( ai );
                     if (log.isTraceEnabled()) {
@@ -164,48 +135,6 @@ public class MbeansDescriptorsDOMSource 
 
                 }
 
-                // process constructor nodes
-                /*
-                firstN=DomUtil.getChild( mbeanN, "constructor");
-                for (Node descN = firstN; descN != null;
-                     descN = DomUtil.getNext( descN )) {
-
-                    // Create new constructor info
-                    ConstructorInfo ci=new ConstructorInfo();
-                    DomUtil.setAttributes(ci, descN);
-
-                    // Process descriptor subnode
-                    Node firstDescriptorN =
-                        DomUtil.getChild(descN, "descriptor");
-                    if (firstDescriptorN != null) {
-                        Node firstFieldN =
-                            DomUtil.getChild(firstDescriptorN, "field");
-                        for (Node fieldN = firstFieldN; fieldN != null;
-                             fieldN = DomUtil.getNext(fieldN)) {
-                            FieldInfo fi = new FieldInfo();
-                            DomUtil.setAttributes(fi, fieldN);
-                            ci.addField(fi);
-                        }
-                    }
-
-                    // Process parameter subnodes
-                    Node firstParamN=DomUtil.getChild( descN, "parameter");
-                    for (Node paramN = firstParamN;  paramN != null;
-                         paramN = DomUtil.getNext(paramN))
-                    {
-                        ParameterInfo pi=new ParameterInfo();
-                        DomUtil.setAttributes(pi, paramN);
-                        ci.addParameter( pi );
-                    }
-
-                    // Add this info to our managed bean info
-                    managed.addConstructor( ci );
-                    if (log.isTraceEnabled()) {
-                        log.trace("Create constructor " + ci);
-                    }
-
-                }*/
-
                 // process notification nodes
                 firstN=DomUtil.getChild( mbeanN, "notification");
                 for (Node descN = firstN; descN != null;
@@ -216,20 +145,6 @@ public class MbeansDescriptorsDOMSource 
                     NotificationInfo ni=new NotificationInfo();
                     DomUtil.setAttributes(ni, descN);
 
-                    // Process descriptor subnode
-                    /*Node firstDescriptorN =
-                        DomUtil.getChild(descN, "descriptor");
-                    if (firstDescriptorN != null) {
-                        Node firstFieldN =
-                            DomUtil.getChild(firstDescriptorN, "field");
-                        for (Node fieldN = firstFieldN; fieldN != null;
-                             fieldN = DomUtil.getNext(fieldN)) {
-                            FieldInfo fi = new FieldInfo();
-                            DomUtil.setAttributes(fi, fieldN);
-                            ni.addField(fi);
-                        }
-                    }*/
-
                     // Process notification-type subnodes
                     Node firstParamN=DomUtil.getChild( descN, "notification-type");
                     for (Node paramN = firstParamN;  paramN != null;
@@ -257,20 +172,6 @@ public class MbeansDescriptorsDOMSource 
                     OperationInfo oi=new OperationInfo();
                     DomUtil.setAttributes(oi, descN);
 
-                    // Process descriptor subnode
-                    /*Node firstDescriptorN =
-                        DomUtil.getChild(descN, "descriptor");
-                    if (firstDescriptorN != null) {
-                        Node firstFieldN =
-                            DomUtil.getChild(firstDescriptorN, "field");
-                        for (Node fieldN = firstFieldN; fieldN != null;
-                             fieldN = DomUtil.getNext(fieldN)) {
-                            FieldInfo fi = new FieldInfo();
-                            DomUtil.setAttributes(fi, fieldN);
-                            oi.addField(fi);
-                        }
-                    }*/
-
                     // Process parameter subnodes
                     Node firstParamN=DomUtil.getChild( descN, "parameter");
                     for (Node paramN = firstParamN;  paramN != null;

Modified: tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDigesterSource.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDigesterSource.java?rev=1222797&r1=1222796&r2=1222797&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDigesterSource.java
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDigesterSource.java
Fri Dec 23 19:03:08 2011
@@ -76,56 +76,6 @@ public class MbeansDescriptorsDigesterSo
                 "addAttribute",
             "org.apache.tomcat.util.modeler.AttributeInfo");
 
-        /*digester.addObjectCreate
-            ("mbeans-descriptors/mbean/attribute/descriptor/field",
-            "org.apache.tomcat.util.modeler.FieldInfo");
-        digester.addSetProperties
-            ("mbeans-descriptors/mbean/attribute/descriptor/field");
-        digester.addSetNext
-            ("mbeans-descriptors/mbean/attribute/descriptor/field",
-                "addField",
-            "org.apache.tomcat.util.modeler.FieldInfo");
-
-        digester.addObjectCreate
-            ("mbeans-descriptors/mbean/constructor",
-            "org.apache.tomcat.util.modeler.ConstructorInfo");
-        digester.addSetProperties
-            ("mbeans-descriptors/mbean/constructor");
-        digester.addSetNext
-            ("mbeans-descriptors/mbean/constructor",
-                "addConstructor",
-            "org.apache.tomcat.util.modeler.ConstructorInfo");
-
-        digester.addObjectCreate
-            ("mbeans-descriptors/mbean/constructor/descriptor/field",
-            "org.apache.tomcat.util.modeler.FieldInfo");
-        digester.addSetProperties
-            ("mbeans-descriptors/mbean/constructor/descriptor/field");
-        digester.addSetNext
-            ("mbeans-descriptors/mbean/constructor/descriptor/field",
-                "addField",
-            "org.apache.tomcat.util.modeler.FieldInfo");
-
-        digester.addObjectCreate
-            ("mbeans-descriptors/mbean/constructor/parameter",
-            "org.apache.tomcat.util.modeler.ParameterInfo");
-        digester.addSetProperties
-            ("mbeans-descriptors/mbean/constructor/parameter");
-        digester.addSetNext
-            ("mbeans-descriptors/mbean/constructor/parameter",
-                "addParameter",
-            "org.apache.tomcat.util.modeler.ParameterInfo");
-
-        digester.addObjectCreate
-            ("mbeans-descriptors/mbean/descriptor/field",
-            "org.apache.tomcat.util.modeler.FieldInfo");
-        digester.addSetProperties
-            ("mbeans-descriptors/mbean/descriptor/field");
-        digester.addSetNext
-            ("mbeans-descriptors/mbean/descriptor/field",
-                "addField",
-            "org.apache.tomcat.util.modeler.FieldInfo");
-        */
         digester.addObjectCreate
             ("mbeans-descriptors/mbean/notification",
             "org.apache.tomcat.util.modeler.NotificationInfo");

Modified: tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java?rev=1222797&r1=1222796&r2=1222797&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
Fri Dec 23 19:03:08 2011
@@ -365,28 +365,6 @@ public class MbeansDescriptorsIntrospect
                 }
             }
 
-            /*Constructor[] constructors = realClass.getConstructors();
-            for(int i=0;i<constructors.length;i++) {
-                ConstructorInfo info = new ConstructorInfo();
-                String className = realClass.getName();
-                int nIndex = -1;
-                if((nIndex = className.lastIndexOf('.'))!=-1) {
-                    className = className.substring(nIndex+1);
-                }
-                info.setName(className);
-                info.setDescription(constructors[i].getName());
-                Class classes[] = constructors[i].getParameterTypes();
-                for(int j=0;j<classes.length;j++) {
-                    ParameterInfo pi = new ParameterInfo();
-                    pi.setType(classes[j].getName());
-                    pi.setName("param" + j);
-                    pi.setDescription("Introspected parameter param" + j);
-                    info.addParameter(pi);
-                }
-                mbean.addConstructor(info);
-            }
-            */
-
             if( log.isDebugEnabled())
                 log.debug("Setting name: " + type );
             mbean.setName( type );
@@ -418,4 +396,3 @@ public class MbeansDescriptorsIntrospect
 
 }
 
-// End of class: MbeanDescriptorsIntrospectionSource



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message