info.magnolia.i18nsystem.proxytoys
Class ProxytoysI18nizer

java.lang.Object
  extended by info.magnolia.i18nsystem.proxytoys.ProxytoysI18nizer
All Implemented Interfaces:
I18nizer
Direct Known Subclasses:
ToolingProxytoysI18nizer

public class ProxytoysI18nizer
extends Object
implements I18nizer

A implementation of I18nizer based on ProxyToys, using proxies to decorate the given objects.


Constructor Summary
ProxytoysI18nizer(TranslationService translationService, LocaleProvider localeProvider)
           
 
Method Summary
<C> C
decorate(C child)
           
protected
<P,C> C
decorateChild(C child, P parent)
           
protected
<T> T
decorateI18nTextMethods(T obj, Class<T> proxyPrimaryType, Class... proxyMoreTypes)
           
protected
<T> T
decorateI18nTextMethods(T obj, Class<T> proxyPrimaryType, Class[] proxyMoreTypes, com.thoughtworks.proxy.toys.decorate.Decorator<T> decorator)
           
protected
<T,P> T
injectParentableInterface(Class<? extends T> ct, T object, P parent)
           
protected
<T> T
interceptGetters(T o, Class<T> originalClass)
           
protected
<T> I18nTextMethodDecorator<T>
newI18nTextMethodDecorator(I18nKeyGenerator<T> keyGen)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxytoysI18nizer

@Inject
public ProxytoysI18nizer(TranslationService translationService,
                                LocaleProvider localeProvider)
Method Detail

decorate

public <C> C decorate(C child)
Specified by:
decorate in interface I18nizer

decorateChild

protected <P,C> C decorateChild(C child,
                                P parent)

injectParentableInterface

protected <T,P> T injectParentableInterface(Class<? extends T> ct,
                                            T object,
                                            P parent)

decorateI18nTextMethods

protected <T> T decorateI18nTextMethods(T obj,
                                        Class<T> proxyPrimaryType,
                                        Class... proxyMoreTypes)

newI18nTextMethodDecorator

protected <T> I18nTextMethodDecorator<T> newI18nTextMethodDecorator(I18nKeyGenerator<T> keyGen)

decorateI18nTextMethods

protected <T> T decorateI18nTextMethods(T obj,
                                        Class<T> proxyPrimaryType,
                                        Class[] proxyMoreTypes,
                                        com.thoughtworks.proxy.toys.decorate.Decorator<T> decorator)

interceptGetters

protected <T> T interceptGetters(T o,
                                 Class<T> originalClass)


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