KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > appserv > management > util > jmx > stringifier > ModelMBeanInfoStringifier


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23 package com.sun.appserv.management.util.jmx.stringifier;
24
25
26 import com.sun.appserv.management.util.stringifier.Stringifier;
27 import com.sun.appserv.management.util.stringifier.ArrayStringifier;
28
29
30 public class ModelMBeanInfoStringifier extends MBeanInfoStringifier implements Stringifier
31 {
32     public static final ModelMBeanInfoStringifier DEFAULT = new ModelMBeanInfoStringifier();
33     
34         public
35     ModelMBeanInfoStringifier()
36     {
37         super();
38     }
39     
40         public
41     ModelMBeanInfoStringifier( MBeanFeatureInfoStringifierOptions options )
42     {
43         super( options );
44     }
45     
46         private String JavaDoc
47     stringifyArray( Object JavaDoc [] a, Stringifier stringifier)
48     {
49         String JavaDoc temp = "";
50         
51         if ( a.length != 0 )
52         {
53             temp = "\n" + ArrayStringifier.stringify( a, "\n", stringifier);
54         }
55         return( temp );
56     }
57     
58         
59     // subclass may override
60
MBeanAttributeInfoStringifier
61     getMBeanAttributeInfoStringifier( MBeanFeatureInfoStringifierOptions options )
62     {
63         return( new ModelMBeanAttributeInfoStringifier(options) );
64     }
65     
66     // subclass may override
67
MBeanOperationInfoStringifier
68     getMBeanOperationInfoStringifier( MBeanFeatureInfoStringifierOptions options )
69     {
70         return( new ModelMBeanOperationInfoStringifier(options) );
71     }
72     
73     // subclass may override
74
MBeanConstructorInfoStringifier
75     getMBeanConstructorInfoStringifier( MBeanFeatureInfoStringifierOptions options )
76     {
77         return( new ModelMBeanConstructorInfoStringifier(options) );
78     }
79     
80     // subclass may override
81
MBeanNotificationInfoStringifier
82     getMBeanNotificationInfoStringifier( MBeanFeatureInfoStringifierOptions options )
83     {
84         return( new ModelMBeanNotificationInfoStringifier(options) );
85     }
86 }
87
88
89
90
91
92
Popular Tags