FileDocCategorySizeDatePackage
AllTypesMapper.javaAPI DocGlassfish v2 API3391Fri May 04 22:30:30 BST 2007com.sun.appserv.management.base

AllTypesMapper

public final class AllTypesMapper extends TypesMapper
Map all types (XTypes and J2EETypes) to their respective interfaces.
see
XTypesMapper
see
com.sun.appserv.management.j2ee.J2EETypesMapper

Fields Summary
private static AllTypesMapper
INSTANCE
Constructors Summary
private AllTypesMapper()

		super( new Class[ 0 ] );
	
Methods Summary
public static synchronized com.sun.appserv.management.base.AllTypesMappergetInstance()
Get the singleton instance.

	
	
			   	 
		   
	
	
		if ( INSTANCE == null )
		{
			INSTANCE	= new AllTypesMapper();
		}
		
		return( INSTANCE );
	
public java.lang.ClassgetInterfaceForType(java.lang.String type)

param
type the j2eeType
return
the interface class associated with a given j2eeType.

		Class<?> theClass	= XTypesMapper.getInstance().getInterfaceForType( type );
		 
		if ( theClass == null )
		{
			theClass	= J2EETypesMapper.getInstance().getInterfaceForType( type );
		}

		if ( theClass == null )
		{
			throw new IllegalArgumentException( "Can't find interface for: " + type );
		}
		
		assert( AMX.class.isAssignableFrom( theClass ) ):
			"WARNING: mbean does not implement AMX: " + theClass.getName();

		return( theClass );