## org.codehaus.groovy.grails.support.proxy
Interface ProxyHandler

All Known Implementing Classes:
  DefaultProxyHandler, HibernateProxyHandler

    public interface ProxyHandler

Interface that defines logic for handling proxied instances

Since:
  1.2.2
Author:
  Graeme Rocher

Method Summary
`void` `initialize(Object o)` Initializes an existing uninitialized proxy instance
`boolean` `isInitialized(Object o)` Returns whether a lazy proxied instance has been initialized
`boolean` `isInitialized(Object obj, String associationName)` Tests whether an association of the given object has been initialized or not
`boolean` `isProxy(Object o)` Returns true if the specified object is a proxy
`Object` `unwrapIfProxy(Object instance)` Returns the unwrapped proxy instance or the original object if not proxied

Method Detail

### isProxy

    boolean isProxy(Object o)

  Returns true if the specified object is a proxy

  Parameters:
    `o` - The object in question
  Returns:
    True if it is a proxy

### unwrapIfProxy

    Object unwrapIfProxy(Object instance)

  Returns the unwrapped proxy instance or the original object if not proxied

  Parameters:
    `instance` - The instance to unwrap
  Returns:
    The unwrapped instance

### isInitialized

    boolean isInitialized(Object o)

  Returns whether a lazy proxied instance has been initialized

  Parameters:
    `o` - The instance to test
  Returns:
    True if it has been initialized false otherwise

### initialize

    void initialize(Object o)

  Initializes an existing uninitialized proxy instance

  Parameters:
    `o` - The proxy instance

### isInitialized

    boolean isInitialized(Object obj,
                          String associationName)

  Tests whether an association of the given object has been initialized or not

  Parameters:
    `obj` - The object to check
    `associationName` - The association
  Returns:
    True if has been init

Copyright (c) 2005-2009 The Grails project