Class Instantiator<T>
java.lang.Object
nl.jqno.equalsverifier.internal.reflection.Instantiator<T>
- Type Parameters:
T-Instantiatorinstantiates objects of this class, or of an anonymous subclass of this class.
Instantiates objects of a given class.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <S> net.bytebuddy.dynamic.loading.ClassLoadingStrategy<? super ClassLoader>getClassLoadingStrategy(Class<S> context) Instantiates an object of type T.Instantiates an anonymous subclass of T.static <T> Instantiator<T>Factory method.
-
Method Details
-
of
Factory method.- Type Parameters:
T- The class on whichInstantiatoroperates.- Parameters:
type- The class on whichInstantiatoroperates. Should be the same as T.- Returns:
- An
Instantiatorfortype.
-
instantiate
Instantiates an object of type T.All fields will be initialized to their initial values. I.e., 0 for ints, null for objects, etc.
- Returns:
- An object of type T.
-
instantiateAnonymousSubclass
Instantiates an anonymous subclass of T. The subclass is generated dynamically.- Returns:
- An instance of an anonymous subclass of T.
-
getClassLoadingStrategy
public static <S> net.bytebuddy.dynamic.loading.ClassLoadingStrategy<? super ClassLoader> getClassLoadingStrategy(Class<S> context)
-