public final class Bridge extends BridgeBase
All of these permissions are required to obtain and correctly initialize the instance of Bridge. No security checks are performed on calls made to Bridge instance methods, so access to the Bridge instance must be protected.
This class is a singleton (per ClassLoader of course). Access to the instance is obtained through the Bridge.get() method.
INVALID_FIELD_OFFSET| Modifier and Type | Method and Description |
|---|---|
static Bridge |
get()
Fetch the Bridge singleton.
|
ClassLoader |
getLatestUserDefinedLoader()
Obtain the latest user defined ClassLoader from the call stack.
|
boolean |
hasStaticInitializerForSerialization(Class<?> cl)
Returns true if the given class defines a static initializer method,
false otherwise.
|
<T> Constructor<T> |
newConstructorForExternalization(Class<T> cl)
Return a constructor that can be used to create an instance of the class for externalization.
|
<T> Constructor<T> |
newConstructorForSerialization(Class<T> aClass)
Return a no-arg constructor for the specified class, based on the default constructor
for its nearest non-serializable base class.
|
<T> Constructor<T> |
newConstructorForSerialization(Class<T> aClass,
Constructor<?> cons)
Return a no-arg constructor for the specified class which invokes the specified constructor.
|
OptionalDataException |
newOptionalDataExceptionForSerialization(boolean endOfData)
Return a new OptionalDataException instance.
|
MethodHandle |
readObjectForSerialization(Class<?> cl)
Returns a method handle to allow invocation of the specified class's readObject method.
|
MethodHandle |
readResolveForSerialization(Class<?> cl)
Returns a method handle to allow invocation of the specified class's readResolve method.
|
MethodHandle |
writeObjectForSerialization(Class<?> cl)
Returns a method handle to allow invocation of the specified class's writeObject method.
|
MethodHandle |
writeReplaceForSerialization(Class<?> cl)
Returns a method handle to allow invocation of the specified class's writeReplace method.
|
defineClass, ensureClassInitialized, getBoolean, getByte, getChar, getDouble, getFloat, getInt, getLong, getObject, getShort, objectFieldOffset, putBoolean, putByte, putChar, putDouble, putFloat, putInt, putLong, putObject, putShort, staticFieldOffset, throwException, toAccessibleField, toAccessibleMethodpublic static Bridge get()
SecurityException - if the caller does not have the
required permissions and the caller has a non-null security manager.public final ClassLoader getLatestUserDefinedLoader()
BridgeBasegetLatestUserDefinedLoader in class BridgeBasepublic final <T> Constructor<T> newConstructorForExternalization(Class<T> cl)
BridgeBasenewConstructorForExternalization in class BridgeBasecl - the classpublic final <T> Constructor<T> newConstructorForSerialization(Class<T> aClass, Constructor<?> cons)
BridgeBasenewConstructorForSerialization in class BridgeBaseaClass - the class for which a constructor should be returned.cons - the default constructor on which to model the new constructor.public <T> Constructor<T> newConstructorForSerialization(Class<T> aClass)
BridgeBasenewConstructorForSerialization in class BridgeBaseaClass - the class for which a constructor should be returned.public boolean hasStaticInitializerForSerialization(Class<?> cl)
BridgeBasehasStaticInitializerForSerialization in class BridgeBasepublic MethodHandle writeObjectForSerialization(Class<?> cl)
BridgeBasewriteObjectForSerialization in class BridgeBasecl - the class containing the methodpublic MethodHandle readObjectForSerialization(Class<?> cl)
BridgeBasereadObjectForSerialization in class BridgeBasecl - the class containing the methodpublic MethodHandle readResolveForSerialization(Class<?> cl)
BridgeBasereadResolveForSerialization in class BridgeBasecl - the class containing the methodpublic MethodHandle writeReplaceForSerialization(Class<?> cl)
BridgeBasewriteReplaceForSerialization in class BridgeBasecl - the class containing the methodpublic OptionalDataException newOptionalDataExceptionForSerialization(boolean endOfData)
BridgeBasenewOptionalDataExceptionForSerialization in class BridgeBaseCopyright © 2017 Oracle. All rights reserved.