com.thoughtworks.proxy.toys.privilege
Class Privileging<T>

java.lang.Object
  extended by com.thoughtworks.proxy.toys.privilege.Privileging<T>

public class Privileging<T>
extends Object

Toy factory to create proxies executing the method calls as privileged actions.

Since:
1.0
Author:
Jörg Schaible
See Also:
com.thoughtworks.proxy.toys.privilege

Nested Class Summary
static class Privileging.PrivilegingBuild<T>
           
static class Privileging.PrivilegingExecutedByOrBuild<T>
           
static class Privileging.PrivilegingWith<T>
           
 
Method Summary
static
<T> Privileging.PrivilegingWith<T>
proxy(Class<T> type)
          Creates a factory for proxy instances that allow a privileged execution of the methods of an object.
static
<T> Privileging.PrivilegingExecutedByOrBuild<T>
proxy(T target)
          Creates a factory for proxy instances that allow a privileged execution of the methods of an object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

proxy

public static <T> Privileging.PrivilegingWith<T> proxy(Class<T> type)
Creates a factory for proxy instances that allow a privileged execution of the methods of an object.

Parameters:
type - the type of the proxy when it is finally created.
Returns:
a factory that will proxy instances of the supplied type.
Since:
1.0

proxy

public static <T> Privileging.PrivilegingExecutedByOrBuild<T> proxy(T target)
Creates a factory for proxy instances that allow a privileged execution of the methods of an object.

Parameters:
target - the target object that is proxied.
Returns:
a factory that will proxy instances of the supplied type.
Since:
1.0


Copyright © 2005-2010 Codehaus. All Rights Reserved.