public class Decorating<U,T> extends Object
An InvocationDecorator is used for the additional functionality. It is called before the original method is called, after the original method was called, after the original method has thrown an exception or when an exception occurs, calling the method of the decorated object.
com.thoughtworks.proxy.toys.decorate
Modifier and Type | Class and Description |
---|---|
static class |
Decorating.DecoratingBuild<U,T> |
static class |
Decorating.DecoratingVisitor<U,T> |
static class |
Decorating.DecoratingWith<T> |
Modifier and Type | Method and Description |
---|---|
static <T> Decorating.DecoratingWith<T> |
proxy(Class<T> type)
Creates a factory for proxy instances that allow decoration.
|
static <T> Decorating.DecoratingWith<T> |
proxy(Class<T> primaryType,
Class<?>... types)
Creates a factory for proxy instances that allow decoration.
|
static <U> Decorating.DecoratingVisitor<U,U> |
proxy(U delegate)
Creates a factory for proxy instances that allow decoration.
|
static <U,T> Decorating.DecoratingVisitor<U,T> |
proxy(U delegate,
Class<T> type)
Creates a factory for proxy instances that allow decoration.
|
static <U,T> Decorating.DecoratingVisitor<U,T> |
proxy(U delegate,
Class<T> primaryType,
Class<?>... types)
Creates a factory for proxy instances that allow decoration.
|
public static <T> Decorating.DecoratingWith<T> proxy(Class<T> type)
public static <T> Decorating.DecoratingWith<T> proxy(Class<T> primaryType, Class<?>... types)
primaryType
- the primary type implemented by the proxytypes
- other types that are implemented by the proxypublic static <U> Decorating.DecoratingVisitor<U,U> proxy(U delegate)
delegate
- the delegatepublic static <U,T> Decorating.DecoratingVisitor<U,T> proxy(U delegate, Class<T> type)
delegate
- the delegatetype
- the type of the proxy when it is finally created.public static <U,T> Decorating.DecoratingVisitor<U,T> proxy(U delegate, Class<T> primaryType, Class<?>... types)
delegate
- the delegateprimaryType
- the primary type implemented by the proxytypes
- other types that are implemented by the proxyCopyright © 2005–2019 Codehaus. All rights reserved.