net.spy.util
Class ProxyInterfaceImplementor

java.lang.Object
  extended by net.spy.SpyObject
      extended by net.spy.util.InterfaceImplementor
          extended by net.spy.util.ProxyInterfaceImplementor

public class ProxyInterfaceImplementor
extends InterfaceImplementor

Create static proxy implementations of interfaces. This class is similiar to InterfaceImplementor, except it's used to create static proxy interface implementations which may be extended to override specific functionality (otherwise, the proxy would be kind of worthless, wouldn't it?).


Constructor Summary
ProxyInterfaceImplementor(java.lang.Class c)
          Get an instance of ProxyInterfaceImplementor.
 
Method Summary
protected  boolean buildConstructors()
          Don't create the default constructors.
protected  java.lang.String implement(java.lang.reflect.Method method)
          Implement this method as a proxy wrapper around the contained object.
static void main(java.lang.String[] args)
          Create a proxy class for the specified interface.
protected  java.lang.String preConstructors()
          Create the instance variables and constructor for the proxy.
protected  java.lang.String preMethods()
          Before the generated methods, include methods for accessing and setting the proxied object.
 
Methods inherited from class net.spy.util.InterfaceImplementor
getDocLink, getDocLink, getInterface, getOutClassName, getOutPackageName, getSignature, getSignature, getSuperclass, makeSource, setOutputClass, setSuperClass, writeSourceToFile
 
Methods inherited from class net.spy.SpyObject
getLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyInterfaceImplementor

public ProxyInterfaceImplementor(java.lang.Class c)
Get an instance of ProxyInterfaceImplementor.

Parameters:
c - the interface to be implemented
Throws:
java.lang.NullPointerException - if the passed in class is null
java.lang.IllegalArgumentException - if the passed in class is not an interface
Method Detail

buildConstructors

protected boolean buildConstructors()
Don't create the default constructors.

Overrides:
buildConstructors in class InterfaceImplementor

preConstructors

protected java.lang.String preConstructors()
Create the instance variables and constructor for the proxy.

Overrides:
preConstructors in class InterfaceImplementor

preMethods

protected java.lang.String preMethods()
Before the generated methods, include methods for accessing and setting the proxied object.

Overrides:
preMethods in class InterfaceImplementor

implement

protected java.lang.String implement(java.lang.reflect.Method method)
Implement this method as a proxy wrapper around the contained object.

Overrides:
implement in class InterfaceImplementor
Parameters:
method - the method to implement
Returns:
the text required to implement this method

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Create a proxy class for the specified interface.

Throws:
java.lang.Exception


Copyright © 1995-2006 SPY Internetworking. All Rights Reserved.