@Test(expected = IllegalStateException.class) public void testNonExistentField() throws Exception { new ByteBuddy() .subclass(Object.class) .defineMethod(FOO, void.class) .intercept(InvocationHandlerAdapter.toField(QUX)) .make(); }
public static InvocationHandlerAdapter toField(String name) { return toField(name, FieldLocator.ForClassHierarchy.Factory.INSTANCE); }
InvocationHandlerAdapter implements Implementation { public static InvocationHandlerAdapter toField(String name) { return toField(name, FieldLocator.ForClassHierarchy.Factory.INSTANCE); } }
InvocationHandlerAdapter implements Implementation { public static InvocationHandlerAdapter toField(String name) { return toField(name, FieldLocator.ForClassHierarchy.Factory.INSTANCE); } protected  InvocationHandlerAdapter(String fieldName, boolean cached, boolean privileged, Assigner assigner); }
InvocationHandlerAdapter implements Implementation { public static InvocationHandlerAdapter toField(String name) { return toField(name, FieldLocator.ForClassHierarchy.Factory.INSTANCE); } protected  InvocationHandlerAdapter(String fieldName, boolean cached, boolean privileged, Assigner assigner); static InvocationHandlerAdapter of(InvocationHandler invocationHandler); static InvocationHandlerAdapter of(InvocationHandler invocationHandler, String fieldName); static InvocationHandlerAdapter toField(String name); static InvocationHandlerAdapter toField(String name, FieldLocator.Factory fieldLocatorFactory); abstract WithoutPrivilegeConfiguration withoutMethodCache(); abstract Implementation withAssigner(Assigner assigner); abstract AssignerConfigurable withPrivilegedLookup(); }
InvocationHandlerAdapter implements Implementation { public static InvocationHandlerAdapter toField(String name) { return toField(name, FieldLocator.ForClassHierarchy.Factory.INSTANCE); } protected  InvocationHandlerAdapter(String fieldName, boolean cached, boolean privileged, Assigner assigner); static InvocationHandlerAdapter of(InvocationHandler invocationHandler); static InvocationHandlerAdapter of(InvocationHandler invocationHandler, String fieldName); static InvocationHandlerAdapter toField(String name); static InvocationHandlerAdapter toField(String name, FieldLocator.Factory fieldLocatorFactory); abstract WithoutPrivilegeConfiguration withoutMethodCache(); abstract Implementation withAssigner(Assigner assigner); abstract AssignerConfigurable withPrivilegedLookup();  }