View Javadoc
1   /*
2    * Copyright (c) 2006 JMockit developers
3    * This file is subject to the terms of the MIT license (see LICENSE.txt).
4    */
5   package mockit.internal.expectations.mocking;
6   
7   import edu.umd.cs.findbugs.annotations.NonNull;
8   import edu.umd.cs.findbugs.annotations.Nullable;
9   
10  import java.lang.reflect.Type;
11  
12  public final class CascadingTypeRedefinition extends BaseTypeRedefinition {
13      @NonNull
14      private final Type mockedType;
15  
16      public CascadingTypeRedefinition(@NonNull String cascadingMethodName, @NonNull Type mockedType) {
17          super(new MockedType(cascadingMethodName, mockedType));
18          this.mockedType = mockedType;
19      }
20  
21      @Nullable
22      public InstanceFactory redefineType() {
23          return redefineType(mockedType);
24      }
25  }