net.sf.cglib
Class InterfaceMaker

java.lang.Object
  |
  +--net.sf.cglib.InterfaceMaker

public class InterfaceMaker
extends java.lang.Object

Generates interfaces from a list of classes or methods. By passing a generated interface to the Enhancer's list of interfaces to implement, you can make your enhanced classes handle an arbitrary set of method signatures.

Version:
$Id: InterfaceMaker.java,v 1.6 2003/07/15 16:38:46 herbyderby Exp $
Author:
Chris Nokleberg

Method Summary
static java.lang.Class create(java.lang.Class[] classes, java.lang.ClassLoader loader)
          Create a interface consisting of all the public methods of the specified classes.
static java.lang.Class create(java.lang.Class[] classes, MethodFilter filter, java.lang.ClassLoader loader)
          Create a interface consisting of all the public methods of the specified classes.
static java.lang.Class create(java.lang.reflect.Method[] methods, java.lang.ClassLoader loader)
          Create a interface consisting of all the specified methods.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static java.lang.Class create(java.lang.Class[] classes,
                                     java.lang.ClassLoader loader)
Create a interface consisting of all the public methods of the specified classes. Methods from superclasses are included, except for methods declared in the base Object class (e.g. getClass(), equals(), hashCode()).
Parameters:
classes - the class array
loader - ClassLoader for enhanced class, uses "current" if null

create

public static java.lang.Class create(java.lang.Class[] classes,
                                     MethodFilter filter,
                                     java.lang.ClassLoader loader)
Create a interface consisting of all the public methods of the specified classes. Methods from superclasses are included, including methods declared in the base Object class.
Parameters:
classes - the class array
filter - the MethodFilter used to limit which methods are generated in the interface
loader - ClassLoader for enhanced class, uses "current" if null
See Also:
NotFromObjectFilter

create

public static java.lang.Class create(java.lang.reflect.Method[] methods,
                                     java.lang.ClassLoader loader)
Create a interface consisting of all the specified methods. The access flags on the methods are ignored (all interface methods are by definition abstract and public).
Parameters:
methods - the methods to generate
loader - ClassLoader for enhanced class, uses "current" if null


Copyright © 2002-2003 cglib. All Rights Reserved.