public static final class AtomicExternal.Factory extends Object
Modifier and Type | Method and Description |
---|---|
static <T> T |
instantiate(Class<T> type,
ObjectInput arg)
Convenience method for testing implementing class constructor
signature compliance.
|
public static <T> T instantiate(Class<T> type, ObjectInput arg) throws IOException
De-serializers are free to implement higher performance instantiation that complies with this contract.
Only public and package default constructors can be called by de-serializers. Package default constructors have been provided to prevent implementations from polluting public api, but should be treated as public constructors.
Constructors with private visibility cannot be called.
Constructors with protected visibility can only be called by subclasses, not de-serializers.
T
- AtomicExternal implementation type.type
- AtomicExternal implementing class.arg
- ObjectInput argument to pass to implementing constructor.InvalidClassException
- if constructor is non compliant
or doesn't exist.InvalidObjectException
- if invariant check failsNullPointerException
- if arg or type is null.IOException
Copyright © 2016–2018 The Apache Software Foundation. All rights reserved.