Top Description Fields Constructors Methods
org.jboss.marshalling.reflect

public final Class SerializableClassRegistry

extends Object
Class Inheritance
Static Imports
java.lang.System.getSecurityManager, java.security.AccessController.doPrivileged

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.

Field Summary

Modifier and TypeField and Description
private static final ClassValue<SerializableClass>
private static final SerializableClassRegistry
private static final SerializablePermission

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static SerializableClassRegistry

Returns:

the registry
getInstance
()

Get the serializable class registry instance, if allowed by the current security manager.

pack-priv static SerializableClassRegistry
public SerializableClass

Returns:

the serializable class information
lookup
(final Class<?>
the class to look up
subject
)

Look up serialization information for a class.

public void
release(ClassLoader
the class loader to release
classLoader
)

Deprecated No longer required.
Release all reflection information belonging to the given class loader.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

classValueback to summary
private static final ClassValue<SerializableClass> classValue
INSTANCEback to summary
private static final SerializableClassRegistry INSTANCE
PERMISSIONback to summary
private static final SerializablePermission PERMISSION

Constructor Detail

SerializableClassRegistryback to summary
private SerializableClassRegistry()

Method Detail

getInstanceback to summary
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:SerializableClassRegistry

the registry

Exceptions
SecurityException:
if the caller does not have sufficient privileges
getInstanceUncheckedback to summary
pack-priv static SerializableClassRegistry getInstanceUnchecked()
lookupback to summary
public SerializableClass lookup(final Class<?> subject)

Look up serialization information for a class. The resultant object will be cached.

Parameters
subject:Class<?>

the class to look up

Returns:SerializableClass

the serializable class information

releaseback to summary
public void release(ClassLoader classLoader)

Deprecated

No longer required.

Release all reflection information belonging to the given class loader.

Parameters
classLoader:ClassLoader

the class loader to release

Annotations
@SuppressWarnings:unused