Package org.objenesis.instantiator.gcj
Class GCJInstantiatorBase<T>
- java.lang.Object
-
- org.objenesis.instantiator.gcj.GCJInstantiatorBase<T>
-
- All Implemented Interfaces:
ObjectInstantiator<T>
- Direct Known Subclasses:
GCJInstantiator,GCJSerializationInstantiator
public abstract class GCJInstantiatorBase<T> extends java.lang.Object implements ObjectInstantiator<T>
Base class for GCJ-based instantiators. It initializes reflection access to method ObjectInputStream.newObject, as well as creating a dummy ObjectInputStream to be used as the "this" argument for the method.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classGCJInstantiatorBase.DummyStream
-
Field Summary
Fields Modifier and Type Field Description (package private) static java.io.ObjectInputStreamdummyStream(package private) static java.lang.reflect.MethodnewObjectMethodprotected java.lang.Class<T>type
-
Constructor Summary
Constructors Constructor Description GCJInstantiatorBase(java.lang.Class<T> type)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private static voidinitialize()abstract TnewInstance()Returns a new instance of an object.
-
-
-
Field Detail
-
newObjectMethod
static java.lang.reflect.Method newObjectMethod
-
dummyStream
static java.io.ObjectInputStream dummyStream
-
type
protected final java.lang.Class<T> type
-
-
Constructor Detail
-
GCJInstantiatorBase
public GCJInstantiatorBase(java.lang.Class<T> type)
-
-
Method Detail
-
initialize
private static void initialize()
-
newInstance
public abstract T newInstance()
Description copied from interface:ObjectInstantiatorReturns a new instance of an object. The returned object's class is defined by the implementation.- Specified by:
newInstancein interfaceObjectInstantiator<T>- Returns:
- A new instance of an object.
-
-