Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.remoting.loading
Class ClassUtil

    java.lang.Object
      org.jboss.remoting.loading.ClassUtil

    public class ClassUtil

extends java.lang.Object

ClassUtil is a set of generic class utlities.

Version:
  $Revision: 566 $
Author:
  Jeff Haynie, Tom Elrod

Field Summary
`protected static org.jboss.logging.Logger` | `log`

Constructor Summary
`ClassUtil()`

Method Summary
`static java.lang.Object` | `deserialize(byte[] buf)`
`static java.lang.Object` | `deserialize(byte[] buf, java.lang.ClassLoader cl)`
`static java.lang.Object` | `deserialize(ClassBytes cb, java.lang.ClassLoader cl)`
`static java.lang.String` | `getArrayClassPart(java.lang.String className)`
`static byte[]` | `getClassBytes(java.lang.String className, java.lang.ClassLoader classbyteloader)` method is called to retrieve a byte array of a Class for a given class name
`static java.lang.Class[]` | `getInterfacesFor(java.lang.Class clazz)` given a class, recurse its dependency graph and find all its implemented interfaces
`static java.lang.String` | `getPackageName(java.lang.Class cl)`
`static java.lang.String` | `getShortClassName(java.lang.Class cl)`
`static boolean` | `isArrayClass(java.lang.String className)`
`protected static byte[]` | `read(java.io.InputStream in)` simple utility method for reading bytes from an input stream
`static byte[]` | `serialize(java.lang.Object obj)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### log

    protected static final org.jboss.logging.Logger log

Constructor Detail

### ClassUtil

    public ClassUtil()

Method Detail

### deserialize

    public static java.lang.Object deserialize(ClassBytes cb,
                                               java.lang.ClassLoader cl)
                                        throws java.io.IOException,
                                               java.lang.ClassNotFoundException

  Throws:
    `java.io.IOException`
    `java.lang.ClassNotFoundException`

### deserialize

    public static java.lang.Object deserialize(byte[] buf)
                                        throws java.io.IOException,
                                               java.lang.ClassNotFoundException

  Throws:
    `java.io.IOException`
    `java.lang.ClassNotFoundException`

### deserialize

    public static java.lang.Object deserialize(byte[] buf,
                                               java.lang.ClassLoader cl)
                                        throws java.io.IOException,
                                               java.lang.ClassNotFoundException

  Throws:
    `java.io.IOException`
    `java.lang.ClassNotFoundException`

### serialize

    public static byte[] serialize(java.lang.Object obj)
                            throws java.io.IOException

  Throws:
    `java.io.IOException`

### isArrayClass

    public static boolean isArrayClass(java.lang.String className)

### getArrayClassPart

    public static java.lang.String getArrayClassPart(java.lang.String className)

### getPackageName

    public static java.lang.String getPackageName(java.lang.Class cl)

### getShortClassName

    public static java.lang.String getShortClassName(java.lang.Class cl)

### getInterfacesFor

    public static java.lang.Class[] getInterfacesFor(java.lang.Class clazz)

  given a class, recurse its dependency graph and find all its implemented interfaces

  Parameters:
    `clazz` -
  Returns:
    array of interfaces

### getClassBytes

    public static byte[] getClassBytes(java.lang.String className,
                                       java.lang.ClassLoader classbyteloader)

  method is called to retrieve a byte array of a Class for a given class name

  Parameters:
    `className` -
  Returns:

### read

    protected static byte[] read(java.io.InputStream in)
                          throws java.io.IOException

  simple utility method for reading bytes from an input stream

  Parameters:
    `in` -
  Returns:
  Throws:
    `java.io.IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright ? 1998-2005 JBoss Inc . All Rights Reserved.