org.jboss.remoting.loading
Class ClassUtil
java.lang.Object
org.jboss.remoting.loading.ClassUtil
- public class ClassUtil
- extends Object
ClassUtil is a set of generic class utlities.
- Version:
- $Revision: 1.3 $
- Author:
- Jeff Haynie, Tom Elrod
Field Summary |
protected static org.jboss.logging.Logger |
log
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static final org.jboss.logging.Logger log
ClassUtil
public ClassUtil()
deserialize
public static Object deserialize(ClassBytes cb,
ClassLoader cl)
throws IOException,
ClassNotFoundException
- Throws:
IOException
ClassNotFoundException
deserialize
public static Object deserialize(byte[] buf)
throws IOException,
ClassNotFoundException
- Throws:
IOException
ClassNotFoundException
deserialize
public static Object deserialize(byte[] buf,
ClassLoader cl)
throws IOException,
ClassNotFoundException
- Throws:
IOException
ClassNotFoundException
serialize
public static byte[] serialize(Object obj)
throws IOException
- Throws:
IOException
isArrayClass
public static boolean isArrayClass(String className)
getArrayClassPart
public static String getArrayClassPart(String className)
getPackageName
public static String getPackageName(Class cl)
getShortClassName
public static String getShortClassName(Class cl)
getInterfacesFor
public static Class[] getInterfacesFor(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(String className,
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(InputStream in)
throws IOException
- simple utility method for reading bytes from an input stream
- Parameters:
in
-
- Returns:
-
- Throws:
IOException
Copyright © 2004 JBoss Inc. All Rights Reserved.