Package nl._42.beanie

Class BeanBuildCommandAdvice

java.lang.Object
nl._42.beanie.BeanBuildCommandAdvice
All Implemented Interfaces:
org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor

public final class BeanBuildCommandAdvice extends Object implements org.aopalliance.intercept.MethodInterceptor
Appends bean building logic to builders, allowing custom builder interfaces. Whenever a custom method is invoked, such as withName("henk") we will automatically decorate the bean with an "name" property value of "henk".

Providing no argument, such as withName(), we decorate the bean with a generated "name" property value. The property value is generated using the same bean builder.

Since:
Feb 14, 2014
Author:
Jeroen van Schagen
  • Constructor Details

  • Method Details

    • setProxy

      public void setProxy(Object proxy)
      Binds this advice to a proxy.
      Parameters:
      proxy - the new proxy
    • invoke

      public Object invoke(org.aopalliance.intercept.MethodInvocation invocation) throws Throwable
      Specified by:
      invoke in interface org.aopalliance.intercept.MethodInterceptor
      Throws:
      Throwable