Class SerializableClassRegistry
java.lang.Object
org.jboss.marshalling.reflect.SerializableClassRegistry
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
FieldsModifier and TypeFieldDescriptionprivate static final SerializableClassRegistryprivate static final SerializablePermissionprivate final ConcurrentMap<ClassLoader, ConcurrentMap<Class<?>, SerializableClass>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SerializableClassRegistryGet the serializable class registry instance, if allowed by the current security manager.(package private) static SerializableClassRegistryLook up serialization information for a class.voidrelease(ClassLoader classLoader) Release all reflection information belonging to the given class loader.
-
Field Details
-
INSTANCE
-
PERMISSION
-
registry
-
-
Constructor Details
-
SerializableClassRegistry
private SerializableClassRegistry()
-
-
Method Details
-
getInstance
Get the serializable class registry instance, if allowed by the current security manager. The caller must have thejava.io.SerializablePermission"allowSerializationReflection"in order to invoke this method.- Returns:
- the registry
- Throws:
SecurityException- if the caller does not have sufficient privileges
-
getInstanceUnchecked
-
lookup
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
-
release
Release all reflection information belonging to the given class loader.- Parameters:
classLoader- the class loader to release
-