/************************************************
 * Copyright (c) Shen Li. All rights reserved.  *
 * http://joyaop.sourceforge.net                *
 * -------------------------------------------- *
 * Distributable under LGPL license.            *
 * See terms of license at gnu.org.             *
 ************************************************/
package net.sf.joyaop.demo.simple;

/**
 * @author Shen Li
 */
public abstract class FooDecorator implements Foo {
    public void foo() {
        System.out.println();
        System.out.println("invoke FooDecorator...");
        System.out.println("method name: foo");
        System.out.println("argument array length: 0");
        System.out.println("paramter value: " + getParamName());
        // The decorator could directly invoke the target interface's methods
        // or use getFoo().someMethod() if the method has been defined in the decorator itself.
        // So it's not nessacery to get the proxy in most situations. 
        // If do need, the decorator could implement the JoinPoint interface,
        // then invoke the getProxy() method.
        getFoo().foo();
    }

    protected abstract Foo getFoo();

    protected abstract String getParamName();
}
