info.magnolia.i18nsystem.proxytoys
Class I18nTextMethodDecorator<T>

java.lang.Object
  extended by com.thoughtworks.proxy.toys.decorate.Decorator<T>
      extended by info.magnolia.i18nsystem.proxytoys.I18nTextMethodDecorator<T>
Type Parameters:
T - the type of the decorated object.
All Implemented Interfaces:
Serializable

public class I18nTextMethodDecorator<T>
extends com.thoughtworks.proxy.toys.decorate.Decorator<T>

The Decorator which decorates methods by delegating to the given TranslationService.

See Also:
Serialized Form

Constructor Summary
I18nTextMethodDecorator(TranslationService translationService, LocaleProvider localeProvider, I18nKeyGenerator keyGenerator)
           
 
Method Summary
protected  Object decorate(String undecoratedResult, T proxiedObject, Method method)
           
 Object decorateResult(T proxy, Method method, Object[] args, Object result)
           
 
Methods inherited from class com.thoughtworks.proxy.toys.decorate.Decorator
beforeMethodStarts, decorateInvocationException, decorateTargetException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

I18nTextMethodDecorator

public I18nTextMethodDecorator(TranslationService translationService,
                               LocaleProvider localeProvider,
                               I18nKeyGenerator keyGenerator)
Method Detail

decorateResult

public Object decorateResult(T proxy,
                             Method method,
                             Object[] args,
                             Object result)
Overrides:
decorateResult in class com.thoughtworks.proxy.toys.decorate.Decorator<T>

decorate

protected Object decorate(String undecoratedResult,
                          T proxiedObject,
                          Method method)


Copyright © 2003-2014 Magnolia International Ltd.. All Rights Reserved.