Package javax.management.openmbean

Examples of javax.management.openmbean.SimpleType


         oos.writeObject(types[i]);
   
         // Deserialize it
         ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
         ObjectInputStream ois = new ObjectInputStream(bais);
         SimpleType result = (SimpleType) ois.readObject();

         assertTrue("Should resolve to same object after serialization " + types[i], types[i] == result);
      }
   }
View Full Code Here


         oos.writeObject(types[i]);
   
         // Deserialize it
         ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
         ObjectInputStream ois = new ObjectInputStream(bais);
         SimpleType result = (SimpleType) ois.readObject();

         assertTrue("Should resolve to same object after serialization " + types[i], types[i] == result);
      }
   }
View Full Code Here

      {
        final int    length    = Array.getLength( o );
        final int    dimensions  = getArrayDimensions( theClass );
        final Class    elementClass  = theClass.getComponentType();
       
        final SimpleType  simpleType  = getSimpleType( elementClass );
        if ( simpleType != null )
        {
          type  = new ArrayType( dimensions, simpleType );
        }
        else
View Full Code Here

    /**
    Get the SimpleType for a class which can be so-represented.
     */
    static public SimpleType getSimpleType(final Class<?> c)
    {
        final SimpleType type = getSimpleTypesMap().get(c);

        return (type);

    }
View Full Code Here

            {
                final int length = Array.getLength(o);
                final int dimensions = getArrayDimensions(theClass);
                final Class<?> elementClass = theClass.getComponentType();

                final SimpleType simpleType = getSimpleType(elementClass);
                if (simpleType != null)
                {
                    type = newArrayType(dimensions, simpleType);
                }
                else
View Full Code Here

    /**
    Get the SimpleType for a class which can be so-represented.
     */
    static public SimpleType getSimpleType(final Class<?> c)
    {
        final SimpleType type = getSimpleTypesMap().get(c);

        return (type);

    }
View Full Code Here

            if (theClass.isArray())
            {
                final int dimensions = getArrayDimensions(theClass);
                final Class<?> elementClass = theClass.getComponentType();

                final SimpleType simpleType = getSimpleType(elementClass);
                if (simpleType != null)
                {
                    type = newArrayType(dimensions, simpleType);
                }
                else
View Full Code Here

    * @return the open type
    * @throws Exception for any error
    */
   public static SimpleType getSimpleType(Class type) throws Exception
   {
      SimpleType simpleType = checkSimpleType(type);
      if (simpleType == null)
         throw new IllegalArgumentException("Not a SimpleType: " + type.getName());
      return simpleType;
   }
View Full Code Here

/*      */   }
/*      */
/*      */   public static SimpleType getSimpleType(Class type)
/*      */     throws Exception
/*      */   {
/*  111 */     SimpleType simpleType = checkSimpleType(type);
/*  112 */     if (simpleType == null)
/*  113 */       throw new IllegalArgumentException("Not a SimpleType: " + type.getName());
/*  114 */     return simpleType;
/*      */   }
View Full Code Here

  initMaps( SimpleType.BIGINTEGER, EBIG_INTEGER ) ;
    }

    public static Class getJavaClass( final OpenType ot ) {
  if (ot instanceof SimpleType) {
      final SimpleType st = (SimpleType)ot ;
      return simpleOpenTypeMap.get( st ).cls() ;
  } else if (ot instanceof ArrayType) {
      // This code is rather odd.  We need to get the opentype of the
            // array components, convert that to a java type, and then
            // construct a Java type (Class) that has that java type as its
View Full Code Here

TOP

Related Classes of javax.management.openmbean.SimpleType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.