public class InstanceCreator
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
InstanceCreator.ArgumentCreator |
static interface |
InstanceCreator.NoArgsCreator |
| Modifier and Type | Method and Description |
|---|---|
InstanceCreator.NoArgsCreator |
withConstructor()
Creates new instance using default no-args constructor
|
InstanceCreator.ArgumentCreator |
withConstructor(java.lang.Class<?>... argTypes)
Creates new instance using constructor with specified arguments types
|
InstanceCreator.NoArgsCreator |
withStaticMethod(java.lang.String name)
Creates new instance using static method of generated class without arguments
|
InstanceCreator.ArgumentCreator |
withStaticMethod(java.lang.String name,
java.lang.Class<?>... argTypes)
Creates new instance using static method of generated class with arguments
|
public InstanceCreator.NoArgsCreator withConstructor()
public InstanceCreator.ArgumentCreator withConstructor(java.lang.Class<?>... argTypes)
argTypes - array of Class objects that represent types of constructor's argumentspublic InstanceCreator.NoArgsCreator withStaticMethod(java.lang.String name)
name - name of the methodpublic InstanceCreator.ArgumentCreator withStaticMethod(java.lang.String name, java.lang.Class<?>... argTypes)
name - name of the methodargTypes - array of Class objects that represent types of method's arguments