KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > cli > jmx > support > StringifierRegistryIniter


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  
24 /*
25  * $Header: /cvs/glassfish/admin-cli/cli-api/src/java/com/sun/cli/jmx/support/StringifierRegistryIniter.java,v 1.3 2005/12/25 03:45:51 tcfujii Exp $
26  * $Revision: 1.3 $
27  * $Date: 2005/12/25 03:45:51 $
28  */

29  
30 package com.sun.cli.jmx.support;
31
32 import javax.management.*;
33 import javax.management.modelmbean.*;
34 import java.util.Iterator JavaDoc;
35 import java.util.Collection JavaDoc;
36
37 import com.sun.cli.jmx.support.ResultsForGetSetStringifier;
38 import com.sun.cli.util.stringifier.*;
39
40
41 /*
42     Registers all included stringifiers with the default registry.
43  */

44 public final class StringifierRegistryIniter
45 {
46         private static void
47     add( Class JavaDoc theClass, Stringifier theStringifier )
48     {
49         StringifierRegistry.DEFAULT.add( theClass, theStringifier );
50     }
51     
52         public
53     StringifierRegistryIniter( )
54     {
55         add( Iterator JavaDoc.class, IteratorStringifier.DEFAULT );
56         add( Collection JavaDoc.class, CollectionStringifier.DEFAULT );
57         add( Object JavaDoc.class, SmartStringifier.DEFAULT );
58         
59         add( MBeanInfo.class, MBeanInfoStringifier.DEFAULT );
60         add( ModelMBeanInfo.class, ModelMBeanInfoStringifier.DEFAULT );
61         
62         add( MBeanOperationInfo.class, MBeanOperationInfoStringifier.DEFAULT );
63         add( ModelMBeanOperationInfo.class, ModelMBeanOperationInfoStringifier.DEFAULT );
64         
65         add( MBeanAttributeInfo.class, MBeanAttributeInfoStringifier.DEFAULT );
66         add( ModelMBeanAttributeInfo.class, ModelMBeanAttributeInfoStringifier.DEFAULT );
67         
68         add( MBeanParameterInfo.class, MBeanParameterInfoStringifier.DEFAULT );
69         
70         add( MBeanNotificationInfo.class, MBeanNotificationInfoStringifier.DEFAULT );
71         add( ModelMBeanNotificationInfo.class, ModelMBeanNotificationInfoStringifier.DEFAULT );
72         
73         add( MBeanConstructorInfo.class, MBeanConstructorInfoStringifier.DEFAULT );
74         add( ModelMBeanConstructorInfo.class, ModelMBeanConstructorInfoStringifier.DEFAULT );
75         
76         add( Attribute.class, AttributeStringifier.DEFAULT );
77         add( AttributeList.class, AttributeListStringifier.DEFAULT );
78         
79         add( Notification.class, NotificationStringifier.DEFAULT );
80         add( AttributeChangeNotification.class, AttributeChangeNotificationStringifier.DEFAULT );
81         add( MBeanServerNotification.class, MBeanServerNotificationStringifier.DEFAULT );
82         
83         add( ResultsForGetSet.class, new ResultsForGetSetStringifier( ) );
84         add( InspectResult.class, new InspectResultStringifier( ) );
85         add( InvokeResult.class, new InvokeResultStringifier( ) );
86     }
87     
88 }
89
90
91
92
Popular Tags