@Test public void testOriginType() throws Exception { Class<? extends Baz> baz = new ByteBuddy() .subclass(Baz.class) .method(isDeclaredBy(Baz.class)) .intercept(FixedValue.originType()) .make() .load(QuxBaz.class.getClassLoader(), ClassLoadingStrategy.Default.WRAPPER) .getLoaded(); assertThat(baz.getDeclaredFields().length, is(0)); assertThat(baz.getDeclaredMethods().length, is(1)); assertThat(baz.getDeclaredMethod(BAR).invoke(baz.getDeclaredConstructor().newInstance()), is((Object) Baz.class)); }
public static AssignerConfigurable originType() { return new ForOriginType(); }
FixedValue implements Implementation { public static AssignerConfigurable originType() { return new ForOriginType(); } }
FixedValue implements Implementation { public static AssignerConfigurable originType() { return new ForOriginType(); } protected  FixedValue(Assigner assigner, Assigner.Typing typing); }
FixedValue implements Implementation { public static AssignerConfigurable originType() { return new ForOriginType(); } protected  FixedValue(Assigner assigner, Assigner.Typing typing); static AssignerConfigurable value(Object fixedValue); static AssignerConfigurable reference(Object fixedValue); static AssignerConfigurable reference(Object fixedValue, String fieldName); static AssignerConfigurable value(TypeDescription fixedValue); static AssignerConfigurable value(JavaConstant fixedValue); static AssignerConfigurable argument(int index); static AssignerConfigurable self(); static Implementation nullValue(); static AssignerConfigurable originType(); }
FixedValue implements Implementation { public static AssignerConfigurable originType() { return new ForOriginType(); } protected  FixedValue(Assigner assigner, Assigner.Typing typing); static AssignerConfigurable value(Object fixedValue); static AssignerConfigurable reference(Object fixedValue); static AssignerConfigurable reference(Object fixedValue, String fieldName); static AssignerConfigurable value(TypeDescription fixedValue); static AssignerConfigurable value(JavaConstant fixedValue); static AssignerConfigurable argument(int index); static AssignerConfigurable self(); static Implementation nullValue(); static AssignerConfigurable originType();  }