@Test public void annotation_on_named_method() { TargetBean bean = new TargetBean(); ComponentResources resources = newComponentResources(bean); Location l = mockLocation(); replay(); Binding binding = factory.newBinding("test binding", resources, null, "stringHolderMethod()", l); assertNotNull(binding.getAnnotation(BeforeRenderBody.class)); verify(); }
public Binding newBinding(String description, ComponentResources container, ComponentResources component, String expression, Location location) { Object target = container.getComponent(); Class targetClass = target.getClass(); PropertyConduit conduit = source.create(targetClass, expression); String toString = interner.format("PropBinding[%s %s(%s)]", description, container .getCompleteId(), expression); return new PropBinding(location, target, conduit, expression, toString); }
PropBindingFactory implements BindingFactory { public Binding newBinding(String description, ComponentResources container, ComponentResources component, String expression, Location location) { Object target = container.getComponent(); Class targetClass = target.getClass(); PropertyConduit conduit = source.create(targetClass, expression); String toString = interner.format("PropBinding[%s %s(%s)]", description, container .getCompleteId(), expression); return new PropBinding(location, target, conduit, expression, toString); } }
PropBindingFactory implements BindingFactory { public Binding newBinding(String description, ComponentResources container, ComponentResources component, String expression, Location location) { Object target = container.getComponent(); Class targetClass = target.getClass(); PropertyConduit conduit = source.create(targetClass, expression); String toString = interner.format("PropBinding[%s %s(%s)]", description, container .getCompleteId(), expression); return new PropBinding(location, target, conduit, expression, toString); } PropBindingFactory(PropertyConduitSource propertyConduitSource, StringInterner interner); }
PropBindingFactory implements BindingFactory { public Binding newBinding(String description, ComponentResources container, ComponentResources component, String expression, Location location) { Object target = container.getComponent(); Class targetClass = target.getClass(); PropertyConduit conduit = source.create(targetClass, expression); String toString = interner.format("PropBinding[%s %s(%s)]", description, container .getCompleteId(), expression); return new PropBinding(location, target, conduit, expression, toString); } PropBindingFactory(PropertyConduitSource propertyConduitSource, StringInterner interner); Binding newBinding(String description, ComponentResources container,
                              ComponentResources component, String expression, Location location); }
PropBindingFactory implements BindingFactory { public Binding newBinding(String description, ComponentResources container, ComponentResources component, String expression, Location location) { Object target = container.getComponent(); Class targetClass = target.getClass(); PropertyConduit conduit = source.create(targetClass, expression); String toString = interner.format("PropBinding[%s %s(%s)]", description, container .getCompleteId(), expression); return new PropBinding(location, target, conduit, expression, toString); } PropBindingFactory(PropertyConduitSource propertyConduitSource, StringInterner interner); Binding newBinding(String description, ComponentResources container,
                              ComponentResources component, String expression, Location location);  }