JBoss Marshalling 1.3.0.CR9

org.jboss.marshalling.reflect
Class SerializableClassRegistry

java.lang.Object
  extended by org.jboss.marshalling.reflect.SerializableClassRegistry

public final class SerializableClassRegistry
extends Object

A registry for reflection information usable by serialization implementations. Objects returned from this registry can be used to invoke private methods without security checks, so it is important to be careful not to "leak" instances out of secured implementations.


Method Summary
static SerializableClassRegistry getInstance()
          Get the serializable class registry instance, if allowed by the current security manager.
 SerializableClass lookup(Class<?> subject)
          Look up serialization information for a class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static SerializableClassRegistry getInstance()
                                             throws SecurityException
Get the serializable class registry instance, if allowed by the current security manager. The caller must have the java.io.SerializablePermission "allowSerializationReflection" in order to invoke this method.

Returns:
the registry
Throws:
SecurityException - if the caller does not have sufficient privileges

lookup

public SerializableClass lookup(Class<?> subject)
Look up serialization information for a class. The resultant object will be cached.

Parameters:
subject - the class to look up
Returns:
the serializable class information

JBoss Marshalling 1.3.0.CR9

Copyright © 2011 JBoss, a division of Red Hat, Inc.